static ConstantUtf8 getInstance(final DataInput input) throws IOException { return new ConstantUtf8(input.readUTF()); }
/** * @return the annotation type name */ public String getAnnotationType() { final ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(type_index, CONSTANT_Utf8); return c.getBytes(); }
static ConstantUtf8 getInstance(DataInputStream file) throws IOException { return getInstance(file.readUTF()); }
private static ConstantUtf8 getInstance(String s) { return getCachedInstance(s); }
/** * @return PMG name. */ public final String getPMGName() { ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(pmg_index, Constants.CONSTANT_Utf8); return c.getBytes(); }
private static synchronized ConstantUtf8 getCachedInstance(String s) { if (s.length() > 200) { return new ConstantUtf8(s); } if (cache == null) { cache = new LinkedHashMap<String, ConstantUtf8>(INITIAL_CACHE_CAPACITY, 0.75f, true) { private static final long serialVersionUID = 1L; @Override protected boolean removeEldestEntry(Map.Entry<String, ConstantUtf8> eldest) { return size() > MAX_CACHE_ENTRIES; } }; } ConstantUtf8 result = cache.get(s); if (result != null) { return result; } result = new ConstantUtf8(s); cache.put(s, result); return result; }
return new ConstantDouble(dataInput); case Const.CONSTANT_Utf8: return ConstantUtf8.getInstance(dataInput); case Const.CONSTANT_String: case Const.CONSTANT_MethodType:
/** * @return Name of object, i.e., method name or field name */ public final String getName() { ConstantUtf8 c; c = (ConstantUtf8) constant_pool.getConstant(name_index, Constants.CONSTANT_Utf8); return c.getBytes(); }
return new ConstantNameAndType(file); case Constants.CONSTANT_Utf8: return new ConstantUtf8(file); default: throw new ClassFormatException("Invalid byte tag in constant pool: " + b);
return new ConstantNameAndType(file); case Constants.CONSTANT_Utf8: return ConstantUtf8.getInstance(file); case Constants.CONSTANT_MethodHandle: return new ConstantMethodHandle(file);
/** * @return Name of attribute */ public String getName() { ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(name_index, Constants.CONSTANT_Utf8); return c.getBytes(); }
return new ConstantNameAndType(file); case Constants.CONSTANT_Utf8: return new ConstantUtf8(file); default: throw new ClassFormatException("Invalid byte tag in constant pool: " + b);
/** * @return Variable name. */ public final String getName() { ConstantUtf8 c; c = (ConstantUtf8) constant_pool.getConstant(name_index, CONSTANT_Utf8); return c.getBytes(); }
return new ConstantNameAndType(file); case Constants.CONSTANT_Utf8: return new ConstantUtf8(file); case Constants.CONSTANT_MethodHandle: return new ConstantMethodHandle(file);
@Override public String stringifyValue() { ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(idx, Constants.CONSTANT_Utf8); return cu8.getBytes(); }
/** * @return String representation of object's type signature (java style) */ public final String getSignature() { ConstantUtf8 c; c = (ConstantUtf8) constant_pool.getConstant(signature_index, Constants.CONSTANT_Utf8); return c.getBytes(); }
@Override public String stringifyValue() { ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(idx, Constants.CONSTANT_Utf8); return cu8.getBytes(); } }
@Override public String stringifyValue() { ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(idx, Constants.CONSTANT_Utf8); return cu8.getBytes(); }
/** * @return the annotation type name */ public String getAnnotationType() { final ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(type_index, CONSTANT_Utf8); return c.getBytes(); }
/** * @return the annotation type name */ public String getAnnotationType() { final ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(type_index, CONSTANT_Utf8); return c.getBytes(); }