/** * Makes a copy. Class names are replaced according to the * given <code>Map</code> object. * * @param newCp the constant pool table used by the new copy. * @param classnames pairs of replaced and substituted * class names. */ public AttributeInfo copy(ConstPool newCp, Map classnames) { BootstrapMethod[] methods = getMethods(); ConstPool thisCp = getConstPool(); for (int i = 0; i < methods.length; i++) { BootstrapMethod m = methods[i]; m.methodRef = thisCp.copy(m.methodRef, newCp, classnames); for (int k = 0; k < m.arguments.length; k++) m.arguments[k] = thisCp.copy(m.arguments[k], newCp, classnames); } return new BootstrapMethodsAttribute(newCp, methods); } }
return new AnnotationDefaultAttribute(cp, name, in); else if (nameStr.equals(BootstrapMethodsAttribute.tag)) return new BootstrapMethodsAttribute(cp, name, in); else if (nameStr.equals(CodeAttribute.tag)) return new CodeAttribute(cp, name, in);
/** * Makes a copy. Class names are replaced according to the * given <code>Map</code> object. * * @param newCp the constant pool table used by the new copy. * @param classnames pairs of replaced and substituted * class names. */ @Override public AttributeInfo copy(ConstPool newCp, Map<String,String> classnames) { BootstrapMethod[] methods = getMethods(); ConstPool thisCp = getConstPool(); for (int i = 0; i < methods.length; i++) { BootstrapMethod m = methods[i]; m.methodRef = thisCp.copy(m.methodRef, newCp, classnames); for (int k = 0; k < m.arguments.length; k++) m.arguments[k] = thisCp.copy(m.arguments[k], newCp, classnames); } return new BootstrapMethodsAttribute(newCp, methods); } }
return new AnnotationDefaultAttribute(cp, name, in); else if (nameStr.equals(BootstrapMethodsAttribute.tag)) return new BootstrapMethodsAttribute(cp, name, in); else if (nameStr.equals(CodeAttribute.tag)) return new CodeAttribute(cp, name, in);
return new AnnotationDefaultAttribute(cp, name, in); else if (nameStr.equals(BootstrapMethodsAttribute.tag)) return new BootstrapMethodsAttribute(cp, name, in); else if (nameStr.equals(CodeAttribute.tag)) return new CodeAttribute(cp, name, in);
return new AnnotationDefaultAttribute(cp, name, in); else if (nameStr.equals(BootstrapMethodsAttribute.tag)) return new BootstrapMethodsAttribute(cp, name, in); else if (nameStr.equals(CodeAttribute.tag)) return new CodeAttribute(cp, name, in);
return new AnnotationDefaultAttribute(cp, name, in); else if (nameStr.equals(BootstrapMethodsAttribute.tag)) return new BootstrapMethodsAttribute(cp, name, in); else if (nameStr.equals(CodeAttribute.tag)) return new CodeAttribute(cp, name, in);
/** * Makes a copy. Class names are replaced according to the * given <code>Map</code> object. * * @param newCp the constant pool table used by the new copy. * @param classnames pairs of replaced and substituted * class names. */ public AttributeInfo copy(ConstPool newCp, Map classnames) { BootstrapMethod[] methods = getMethods(); ConstPool thisCp = getConstPool(); for (int i = 0; i < methods.length; i++) { BootstrapMethod m = methods[i]; m.methodRef = thisCp.copy(m.methodRef, newCp, classnames); for (int k = 0; k < m.arguments.length; k++) m.arguments[k] = thisCp.copy(m.arguments[k], newCp, classnames); } return new BootstrapMethodsAttribute(newCp, methods); } }
/** * Makes a copy. Class names are replaced according to the * given <code>Map</code> object. * * @param newCp the constant pool table used by the new copy. * @param classnames pairs of replaced and substituted * class names. */ public AttributeInfo copy(ConstPool newCp, Map classnames) { BootstrapMethod[] methods = getMethods(); ConstPool thisCp = getConstPool(); for (int i = 0; i < methods.length; i++) { BootstrapMethod m = methods[i]; m.methodRef = thisCp.copy(m.methodRef, newCp, classnames); for (int k = 0; k < m.arguments.length; k++) m.arguments[k] = thisCp.copy(m.arguments[k], newCp, classnames); } return new BootstrapMethodsAttribute(newCp, methods); } }
/** * Makes a copy. Class names are replaced according to the * given <code>Map</code> object. * * @param newCp the constant pool table used by the new copy. * @param classnames pairs of replaced and substituted * class names. */ public AttributeInfo copy(ConstPool newCp, Map classnames) { BootstrapMethod[] methods = getMethods(); ConstPool thisCp = getConstPool(); for (int i = 0; i < methods.length; i++) { BootstrapMethod m = methods[i]; m.methodRef = thisCp.copy(m.methodRef, newCp, classnames); for (int k = 0; k < m.arguments.length; k++) m.arguments[k] = thisCp.copy(m.arguments[k], newCp, classnames); } return new BootstrapMethodsAttribute(newCp, methods); } }
file.addAttribute(new BootstrapMethodsAttribute(file.getConstPool(), replacement));