/** * Obtains the name of the enum constant value. */ public String getValue() { return cp.getUtf8Info(valueIndex); }
/** * Returns an attribute name. */ public String getName() { return constPool.getUtf8Info(name); }
/** * Writes the value. */ public void write(AnnotationsWriter writer) throws IOException { writer.classInfoIndex(cp.getUtf8Info(valueIndex)); }
/** * Obtains the name of the annotation type. * * @return the type name */ public String getTypeName() { return Descriptor.toClassName(pool.getUtf8Info(typeIndex)); }
/** * Reads <code>CONSTANT_String_info</code> structure * at the given index. * * @return the string specified by <code>string_index</code>. */ public String getStringInfo(int index) { StringInfo si = (StringInfo)getItem(index); return getUtf8Info(si.string); }
/** * Obtains the enum type name. * * @return a fully-qualified type name. */ public String getType() { return Descriptor.toClassName(cp.getUtf8Info(typeIndex)); }
public int copy(ConstPool src, ConstPool dest, Map map) { String classname = src.getUtf8Info(name); if (map != null) { String newname = (String)map.get(classname); if (newname != null) classname = newname; } return dest.addClassInfo(classname); }
public int copy(ConstPool src, ConstPool dest, Map map) { String mname = src.getUtf8Info(memberName); String tdesc = src.getUtf8Info(typeDescriptor); tdesc = Descriptor.rename(tdesc, map); return dest.addNameAndTypeInfo(dest.addUtf8Info(mname), dest.addUtf8Info(tdesc)); }
/** * Returns the name of the local variable * specified by <code>local_variable_table[i].name_index</code>. * * @param i the i-th entry. */ public String variableName(int i) { return getConstPool().getUtf8Info(nameIndex(i)); }
public void renameClass(ConstPool cp, Map map, HashMap cache) { String type = cp.getUtf8Info(typeDescriptor); String type2 = Descriptor.rename(type, map); if (type != type2) if (cache == null) typeDescriptor = cp.addUtf8Info(type2); else { cache.remove(this); typeDescriptor = cp.addUtf8Info(type2); cache.put(this, this); } }
public void renameClass(ConstPool cp, Map map, HashMap cache) { String desc = cp.getUtf8Info(descriptor); String desc2 = Descriptor.rename(desc, map); if (desc != desc2) if (cache == null) descriptor = cp.addUtf8Info(desc2); else { cache.remove(this); descriptor = cp.addUtf8Info(desc2); cache.put(this, this); } }
/** * Writes the value. */ public void write(AnnotationsWriter writer) throws IOException { writer.enumConstValue(cp.getUtf8Info(typeIndex), getValue()); }
public void renameClass(ConstPool cp, String oldName, String newName, HashMap cache) { String type = cp.getUtf8Info(typeDescriptor); String type2 = Descriptor.rename(type, oldName, newName); if (type != type2) if (cache == null) typeDescriptor = cp.addUtf8Info(type2); else { cache.remove(this); typeDescriptor = cp.addUtf8Info(type2); cache.put(this, this); } }
public void renameClass(ConstPool cp, String oldName, String newName, HashMap cache) { String desc = cp.getUtf8Info(descriptor); String desc2 = Descriptor.rename(desc, oldName, newName); if (desc != desc2) if (cache == null) descriptor = cp.addUtf8Info(desc2); else { cache.remove(this); descriptor = cp.addUtf8Info(desc2); cache.put(this, this); } }
private void renameType(int pos, int index) { String name = cpool.getUtf8Info(index); String newName = Descriptor.rename(name, classnames); if (!name.equals(newName)) { int index2 = cpool.addUtf8Info(newName); ByteArray.write16bit(index2, info, pos); } } }
public int copy(ConstPool src, ConstPool dest, Map map) { String desc = src.getUtf8Info(descriptor); desc = Descriptor.rename(desc, map); return dest.addMethodTypeInfo(dest.addUtf8Info(desc)); }
/** * Returns the name of the called method. */ public String getMethodName() { ConstPool cp = getConstPool(); int nt = getNameAndType(cp); return cp.getUtf8Info(cp.getNameAndTypeName(nt)); }
/** * Returns the file name indicated by <code>sourcefile_index</code>. */ public String getFileName() { return getConstPool().getUtf8Info(ByteArray.readU16bit(get(), 0)); }
/** * Returns the method descriptor specified by <code>method_index</code>. */ public String methodDescriptor() { ConstPool cp = getConstPool(); int mi = methodIndex(); int ti = cp.getNameAndTypeDescriptor(mi); return cp.getUtf8Info(ti); }
private int computeMethodref(int typedesc, ConstPool cp) { int classIndex = cp.addClassInfo(trapClass); int mnameIndex = cp.addUtf8Info(trapMethod); typedesc = cp.addUtf8Info( Descriptor.changeReturnType(classname, cp.getUtf8Info(typedesc))); return cp.addMethodrefInfo(classIndex, cp.addNameAndTypeInfo(mnameIndex, typedesc)); } }