public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute) { // Let the visitor visit the class of the enclosing method. enclosingMethodAttribute.referencedClassAccept(classVisitor); }
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute) { if (optionalAttributeVisitor != null) { enclosingMethodAttribute.accept(clazz, optionalAttributeVisitor); } }
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute) { Member referencedMember = enclosingMethodAttribute.referencedMethod; if (referencedMember != null) { Clazz referencedClass = enclosingMethodAttribute.referencedClass; // Does it have a new class? if (!enclosingMethodAttribute.getClassName(clazz).equals(referencedClass.getName())) { // Update the class index. enclosingMethodAttribute.u2classIndex = new ConstantPoolEditor((ProgramClass)clazz).addClassConstant(referencedClass); } // Does it have a new name or type? if (!enclosingMethodAttribute.getName(clazz).equals(referencedMember.getName(referencedClass)) || !enclosingMethodAttribute.getType(clazz).equals(referencedMember.getDescriptor(referencedClass))) { // Update the name and type index. enclosingMethodAttribute.u2nameAndTypeIndex = new ConstantPoolEditor((ProgramClass)clazz).addNameAndTypeConstant(referencedMember.getName(referencedClass), referencedMember.getDescriptor(referencedClass)); } } }
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute) { Member referencedMember = enclosingMethodAttribute.referencedMethod; if (referencedMember != null) { Clazz referencedClass = enclosingMethodAttribute.referencedClass; // Does it have a new name or type? String newName = referencedMember.getName(referencedClass); String newType = referencedMember.getDescriptor(referencedClass); if (!enclosingMethodAttribute.getName(clazz).equals(newName) || !enclosingMethodAttribute.getType(clazz).equals(newType)) { // Update the name and type index. enclosingMethodAttribute.u2nameAndTypeIndex = new ConstantPoolEditor((ProgramClass)clazz).addNameAndTypeConstant(newName, newType); } } }
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute) { // Create a copy of the attribute. EnclosingMethodAttribute newEnclosingMethodAttribute = new EnclosingMethodAttribute(constantAdder.addConstant(clazz, enclosingMethodAttribute.u2attributeNameIndex), constantAdder.addConstant(clazz, enclosingMethodAttribute.u2classIndex), enclosingMethodAttribute.u2nameAndTypeIndex == 0 ? 0 : constantAdder.addConstant(clazz, enclosingMethodAttribute.u2nameAndTypeIndex)); newEnclosingMethodAttribute.referencedClass = enclosingMethodAttribute.referencedClass; newEnclosingMethodAttribute.referencedMethod = enclosingMethodAttribute.referencedMethod; // Add it to the target class. attributesEditor.addAttribute(newEnclosingMethodAttribute); }
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute) String enclosingClassName = enclosingMethodAttribute.getClassName(clazz); String name = enclosingMethodAttribute.getName(clazz); String type = enclosingMethodAttribute.getType(clazz);
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute) { Member referencedMember = enclosingMethodAttribute.referencedMethod; if (referencedMember != null) { Clazz referencedClass = enclosingMethodAttribute.referencedClass; // Does it have a new name or type? String newName = referencedMember.getName(referencedClass); String newType = referencedMember.getDescriptor(referencedClass); if (!enclosingMethodAttribute.getName(clazz).equals(newName) || !enclosingMethodAttribute.getType(clazz).equals(newType)) { // Update the name and type index. enclosingMethodAttribute.u2nameAndTypeIndex = new ConstantPoolEditor((ProgramClass)clazz).addNameAndTypeConstant(newName, newType); } } }
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute) { // Create a copy of the attribute. EnclosingMethodAttribute newEnclosingMethodAttribute = new EnclosingMethodAttribute(constantAdder.addConstant(clazz, enclosingMethodAttribute.u2attributeNameIndex), constantAdder.addConstant(clazz, enclosingMethodAttribute.u2classIndex), enclosingMethodAttribute.u2nameAndTypeIndex == 0 ? 0 : constantAdder.addConstant(clazz, enclosingMethodAttribute.u2nameAndTypeIndex)); newEnclosingMethodAttribute.referencedClass = enclosingMethodAttribute.referencedClass; newEnclosingMethodAttribute.referencedMethod = enclosingMethodAttribute.referencedMethod; // Add it to the target class. attributesEditor.addAttribute(newEnclosingMethodAttribute); }
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute) String enclosingClassName = enclosingMethodAttribute.getClassName(clazz); String name = enclosingMethodAttribute.getName(clazz); String type = enclosingMethodAttribute.getType(clazz);
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute) { Member referencedMember = enclosingMethodAttribute.referencedMethod; if (referencedMember != null) { Clazz referencedClass = enclosingMethodAttribute.referencedClass; // Does it have a new name or type? String newName = referencedMember.getName(referencedClass); String newType = referencedMember.getDescriptor(referencedClass); if (!enclosingMethodAttribute.getName(clazz).equals(newName) || !enclosingMethodAttribute.getType(clazz).equals(newType)) { // Update the name and type index. enclosingMethodAttribute.u2nameAndTypeIndex = new ConstantPoolEditor((ProgramClass)clazz).addNameAndTypeConstant(newName, newType); } } }
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute) { // Let the visitor visit the class of the enclosing method. enclosingMethodAttribute.referencedClassAccept(classVisitor); }
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute) { // Create a copy of the attribute. EnclosingMethodAttribute newEnclosingMethodAttribute = new EnclosingMethodAttribute(constantAdder.addConstant(clazz, enclosingMethodAttribute.u2attributeNameIndex), constantAdder.addConstant(clazz, enclosingMethodAttribute.u2classIndex), enclosingMethodAttribute.u2nameAndTypeIndex == 0 ? 0 : constantAdder.addConstant(clazz, enclosingMethodAttribute.u2nameAndTypeIndex)); newEnclosingMethodAttribute.referencedClass = enclosingMethodAttribute.referencedClass; newEnclosingMethodAttribute.referencedMethod = enclosingMethodAttribute.referencedMethod; // Add it to the target class. attributesEditor.addAttribute(newEnclosingMethodAttribute); }
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute) { if (accepted(clazz, enclosingMethodAttribute)) { enclosingMethodAttribute.accept(clazz, attributeVisitor); } }
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute) String enclosingClassName = enclosingMethodAttribute.getClassName(clazz); String name = enclosingMethodAttribute.getName(clazz); String type = enclosingMethodAttribute.getType(clazz);
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute) { // Let the visitor visit the class of the enclosing method. enclosingMethodAttribute.referencedClassAccept(classVisitor); }
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute) { // Create a copy of the attribute. EnclosingMethodAttribute newEnclosingMethodAttribute = new EnclosingMethodAttribute(constantAdder.addConstant(clazz, enclosingMethodAttribute.u2attributeNameIndex), constantAdder.addConstant(clazz, enclosingMethodAttribute.u2classIndex), enclosingMethodAttribute.u2nameAndTypeIndex == 0 ? 0 : constantAdder.addConstant(clazz, enclosingMethodAttribute.u2nameAndTypeIndex)); newEnclosingMethodAttribute.referencedClass = enclosingMethodAttribute.referencedClass; newEnclosingMethodAttribute.referencedMethod = enclosingMethodAttribute.referencedMethod; // Add it to the target class. attributesEditor.addAttribute(newEnclosingMethodAttribute); }
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute) String enclosingClassName = enclosingMethodAttribute.getClassName(clazz); String name = enclosingMethodAttribute.getName(clazz); String type = enclosingMethodAttribute.getType(clazz);
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute) { // Let the visitor visit the class of the enclosing method. enclosingMethodAttribute.referencedClassAccept(classVisitor); }
attributeName.equals(ClassConstants.ATTR_SourceDir) ? (Attribute)new SourceDirAttribute(): attributeName.equals(ClassConstants.ATTR_InnerClasses) ? (Attribute)new InnerClassesAttribute(): attributeName.equals(ClassConstants.ATTR_EnclosingMethod) ? (Attribute)new EnclosingMethodAttribute(): attributeName.equals(ClassConstants.ATTR_Deprecated) ? (Attribute)new DeprecatedAttribute(): attributeName.equals(ClassConstants.ATTR_Synthetic) ? (Attribute)new SyntheticAttribute():
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute) { // Make sure the enclosing class has a name. enclosingMethodAttribute.referencedClassAccept(this); String innerClassName = clazz.getName(); String outerClassName = clazz.getClassName(enclosingMethodAttribute.u2classIndex); numericClassName = isNumericClassName(innerClassName, outerClassName); }