protected int copy2(ConstPool dest, int cindex, int ntindex) { return dest.addFieldrefInfo(cindex, ntindex); } }
@Override protected int copy2(ConstPool dest, int cindex, int ntindex) { return dest.addFieldrefInfo(cindex, ntindex); } }
/** * Adds a new <code>CONSTANT_Fieldref_info</code> structure. * * <p>This also adds a new <code>CONSTANT_NameAndType_info</code> * structure. * * @param classInfo <code>class_index</code> * @param name <code>name_index</code> * of <code>CONSTANT_NameAndType_info</code>. * @param type <code>descriptor_index</code> * of <code>CONSTANT_NameAndType_info</code>. * @return the index of the added entry. */ public int addFieldrefInfo(int classInfo, String name, String type) { int nt = addNameAndTypeInfo(name, type); return addFieldrefInfo(classInfo, nt); }
/** * Adds a new <code>CONSTANT_Fieldref_info</code> structure. * * <p>This also adds a new <code>CONSTANT_NameAndType_info</code> * structure. * * @param classInfo <code>class_index</code> * @param name <code>name_index</code> * of <code>CONSTANT_NameAndType_info</code>. * @param type <code>descriptor_index</code> * of <code>CONSTANT_NameAndType_info</code>. * @return the index of the added entry. */ public int addFieldrefInfo(int classInfo, String name, String type) { int nt = addNameAndTypeInfo(name, type); return addFieldrefInfo(classInfo, nt); }
private int addFieldrefInfo(CtField f, FieldInfo finfo) { ConstPool cp = bytecode.getConstPool(); String cname = f.getDeclaringClass().getName(); int ci = cp.addClassInfo(cname); String name = finfo.getName(); String type = finfo.getDescriptor(); return cp.addFieldrefInfo(ci, name, type); }
private int addFieldrefInfo(CtField f, FieldInfo finfo) { ConstPool cp = bytecode.getConstPool(); String cname = f.getDeclaringClass().getName(); int ci = cp.addClassInfo(cname); String name = finfo.getName(); String type = finfo.getDescriptor(); return cp.addFieldrefInfo(ci, name, type); }
/** * Appends GETSTATIC. * * @param c the fully-qualified class name * @param name the field name * @param type the descriptor of the field type. * * @see Descriptor#of(CtClass) */ public void addGetstatic(String c, String name, String type) { add(GETSTATIC); int ci = constPool.addClassInfo(c); addIndex(constPool.addFieldrefInfo(ci, name, type)); growStack(Descriptor.dataSize(type)); }
/** * Appends GETSTATIC. * * @param c the class * @param name the field name * @param type the descriptor of the field type. * * @see Descriptor#of(CtClass) */ public void addGetstatic(CtClass c, String name, String type) { add(GETSTATIC); int ci = constPool.addClassInfo(c); addIndex(constPool.addFieldrefInfo(ci, name, type)); growStack(Descriptor.dataSize(type)); }
/** * Appends GETFIELD. * * @param c the fully-qualified class name. * @param name the field name. * @param type the descriptor of the field type. * * @see Descriptor#of(CtClass) */ public void addGetfield(String c, String name, String type) { add(GETFIELD); int ci = constPool.addClassInfo(c); addIndex(constPool.addFieldrefInfo(ci, name, type)); growStack(Descriptor.dataSize(type) - 1); }
/** * Appends GETFIELD. * * @param c the class. * @param name the field name. * @param type the descriptor of the field type. * * @see Descriptor#of(CtClass) */ public void addGetfield(CtClass c, String name, String type) { add(GETFIELD); int ci = constPool.addClassInfo(c); addIndex(constPool.addFieldrefInfo(ci, name, type)); growStack(Descriptor.dataSize(type) - 1); }
private void addPutfield0(CtClass target, String classname, String name, String desc) { add(PUTFIELD); // target is null if it represents THIS. int ci = classname == null ? constPool.addClassInfo(target) : constPool.addClassInfo(classname); addIndex(constPool.addFieldrefInfo(ci, name, desc)); growStack(-1 - Descriptor.dataSize(desc)); }
private void addPutstatic0(CtClass target, String classname, String fieldName, String desc) { add(PUTSTATIC); // target is null if it represents THIS. int ci = classname == null ? constPool.addClassInfo(target) : constPool.addClassInfo(classname); addIndex(constPool.addFieldrefInfo(ci, fieldName, desc)); growStack(-Descriptor.dataSize(desc)); }
/** * Appends GETSTATIC. * * @param c the fully-qualified class name * @param name the field name * @param type the descriptor of the field type. * * @see Descriptor#of(CtClass) */ public void addGetstatic(String c, String name, String type) { add(GETSTATIC); int ci = constPool.addClassInfo(c); addIndex(constPool.addFieldrefInfo(ci, name, type)); growStack(Descriptor.dataSize(type)); }
/** * Appends GETFIELD. * * @param c the fully-qualified class name. * @param name the field name. * @param type the descriptor of the field type. * * @see Descriptor#of(CtClass) */ public void addGetfield(String c, String name, String type) { add(GETFIELD); int ci = constPool.addClassInfo(c); addIndex(constPool.addFieldrefInfo(ci, name, type)); growStack(Descriptor.dataSize(type) - 1); }
/** * Appends GETFIELD. * * @param c the class. * @param name the field name. * @param type the descriptor of the field type. * * @see Descriptor#of(CtClass) */ public void addGetfield(CtClass c, String name, String type) { add(GETFIELD); int ci = constPool.addClassInfo(c); addIndex(constPool.addFieldrefInfo(ci, name, type)); growStack(Descriptor.dataSize(type) - 1); }
/** * Appends GETSTATIC. * * @param c the class * @param name the field name * @param type the descriptor of the field type. * * @see Descriptor#of(CtClass) */ public void addGetstatic(CtClass c, String name, String type) { add(GETSTATIC); int ci = constPool.addClassInfo(c); addIndex(constPool.addFieldrefInfo(ci, name, type)); growStack(Descriptor.dataSize(type)); }
private void addPutfield0(CtClass target, String classname, String name, String desc) { add(PUTFIELD); // target is null if it represents THIS. int ci = classname == null ? constPool.addClassInfo(target) : constPool.addClassInfo(classname); addIndex(constPool.addFieldrefInfo(ci, name, desc)); growStack(-1 - Descriptor.dataSize(desc)); }
private void addPutstatic0(CtClass target, String classname, String fieldName, String desc) { add(PUTSTATIC); // target is null if it represents THIS. int ci = classname == null ? constPool.addClassInfo(target) : constPool.addClassInfo(classname); addIndex(constPool.addFieldrefInfo(ci, fieldName, desc)); growStack(-Descriptor.dataSize(desc)); }
int nt = cp.addNameAndTypeInfo(newFieldname, typedesc); newIndex = cp.addFieldrefInfo( cp.addClassInfo(newClassname), nt); constPool = cp;
int nt = cp.addNameAndTypeInfo(newFieldname, typedesc); newIndex = cp.addFieldrefInfo( cp.addClassInfo(newClassname), nt); constPool = cp;