/** * Deletes the specified attribute from the target. */ public void deleteAttribute(String attributeName) { // What's the target? if (targetAttribute != null) { targetAttribute.u2attributesCount = deleteAttribute(targetAttribute.u2attributesCount, targetAttribute.attributes, attributeName); } else if (targetMember != null) { targetMember.u2attributesCount = deleteAttribute(targetMember.u2attributesCount, targetMember.attributes, attributeName); } else { targetClass.u2attributesCount = deleteAttribute(targetClass.u2attributesCount, targetClass.attributes, attributeName); } }
/** * Deletes the specified attribute from the target. */ public void deleteAttribute(String attributeName) { // What's the target? if (targetAttribute != null) { targetAttribute.u2attributesCount = deleteAttribute(targetAttribute.u2attributesCount, targetAttribute.attributes, attributeName); } else if (targetMember != null) { targetMember.u2attributesCount = deleteAttribute(targetMember.u2attributesCount, targetMember.attributes, attributeName); } else { targetClass.u2attributesCount = deleteAttribute(targetClass.u2attributesCount, targetClass.attributes, attributeName); } }
/** * Deletes the specified attribute from the target. */ public void deleteAttribute(String attributeName) { // What's the target? if (targetAttribute != null) { targetAttribute.u2attributesCount = deleteAttribute(targetAttribute.u2attributesCount, targetAttribute.attributes, attributeName); } else if (targetMember != null) { targetMember.u2attributesCount = deleteAttribute(targetMember.u2attributesCount, targetMember.attributes, attributeName); } else { targetClass.u2attributesCount = deleteAttribute(targetClass.u2attributesCount, targetClass.attributes, attributeName); } }
/** * Deletes the specified attribute from the target. */ public void deleteAttribute(String attributeName) { // What's the target? if (targetAttribute != null) { targetAttribute.u2attributesCount = deleteAttribute(targetAttribute.u2attributesCount, targetAttribute.attributes, attributeName); } else if (targetMember != null) { targetMember.u2attributesCount = deleteAttribute(targetMember.u2attributesCount, targetMember.attributes, attributeName); } else { targetClass.u2attributesCount = deleteAttribute(targetClass.u2attributesCount, targetClass.attributes, attributeName); } }
public void visitProgramClass(ProgramClass programClass) { new AttributesEditor(programClass, false).deleteAttribute(attributeName); } }
public void visitProgramMember(ProgramClass programClass, ProgramMember programMember) { new AttributesEditor(programClass, programMember, false).deleteAttribute(attributeName); }
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) { new AttributesEditor((ProgramClass)clazz, (ProgramMember)method, codeAttribute, false).deleteAttribute(attributeName); } }
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) { new AttributesEditor((ProgramClass)clazz, (ProgramMember)method, codeAttribute, false).deleteAttribute(attributeName); } }
public void visitProgramMember(ProgramClass programClass, ProgramMember programMember) { new AttributesEditor(programClass, programMember, false).deleteAttribute(attributeName); }
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) { new AttributesEditor((ProgramClass)clazz, (ProgramMember)method, codeAttribute, false).deleteAttribute(attributeName); } }
public void visitProgramClass(ProgramClass programClass) { new AttributesEditor(programClass, false).deleteAttribute(attributeName); }
public void visitProgramClass(ProgramClass programClass) { new AttributesEditor(programClass, false).deleteAttribute(attributeName); }
public void visitProgramClass(ProgramClass programClass) { new AttributesEditor(programClass, false).deleteAttribute(attributeName); }
public void visitProgramMember(ProgramClass programClass, ProgramMember programMember) { new AttributesEditor(programClass, programMember, false).deleteAttribute(attributeName); }
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) { deleteLocalVariableTableAttribute = false; deleteLocalVariableTypeTableAttribute = false; // Trim the local variable table and the local variable type table. codeAttribute.attributesAccept(clazz, method, this); // Delete the local variable table if it ended up empty. if (deleteLocalVariableTableAttribute) { AttributesEditor editor = new AttributesEditor((ProgramClass)clazz, (ProgramMember)method, codeAttribute, true); editor.deleteAttribute(ClassConstants.ATTR_LocalVariableTable); } // Delete the local variable type table if it ended up empty. if (deleteLocalVariableTypeTableAttribute) { AttributesEditor editor = new AttributesEditor((ProgramClass)clazz, (ProgramMember)method, codeAttribute, true); editor.deleteAttribute(ClassConstants.ATTR_LocalVariableTypeTable); } }
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) { deleteLocalVariableTableAttribute = false; deleteLocalVariableTypeTableAttribute = false; // Trim the local variable table and the local variable type table. codeAttribute.attributesAccept(clazz, method, this); // Delete the local variable table if it ended up empty. if (deleteLocalVariableTableAttribute) { AttributesEditor editor = new AttributesEditor((ProgramClass)clazz, (ProgramMember)method, codeAttribute, true); editor.deleteAttribute(ClassConstants.ATTR_LocalVariableTable); } // Delete the local variable type table if it ended up empty. if (deleteLocalVariableTypeTableAttribute) { AttributesEditor editor = new AttributesEditor((ProgramClass)clazz, (ProgramMember)method, codeAttribute, true); editor.deleteAttribute(ClassConstants.ATTR_LocalVariableTypeTable); } }
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) { deleteLocalVariableTableAttribute = false; deleteLocalVariableTypeTableAttribute = false; // Trim the local variable table and the local variable type table. codeAttribute.attributesAccept(clazz, method, this); // Delete the local variable table if it ended up empty. if (deleteLocalVariableTableAttribute) { AttributesEditor editor = new AttributesEditor((ProgramClass)clazz, (ProgramMember)method, codeAttribute, true); editor.deleteAttribute(ClassConstants.ATTR_LocalVariableTable); } // Delete the local variable type table if it ended up empty. if (deleteLocalVariableTypeTableAttribute) { AttributesEditor editor = new AttributesEditor((ProgramClass)clazz, (ProgramMember)method, codeAttribute, true); editor.deleteAttribute(ClassConstants.ATTR_LocalVariableTypeTable); } }
public void visitInnerClassesAttribute(Clazz clazz, InnerClassesAttribute innerClassesAttribute) { // Mark inner class infos that refer to Lookup. innerClassesAttribute.innerClassEntriesAccept(clazz, this); // Remove all marked inner classes. InnerClassesAttributeEditor editor = new InnerClassesAttributeEditor(innerClassesAttribute); for (int index = innerClassesAttribute.u2classesCount - 1; index >= 0; index--) { InnerClassesInfo innerClassesInfo = innerClassesAttribute.classes[index]; if (shouldBeRemoved(innerClassesInfo)) { editor.removeInnerClassesInfo(innerClassesInfo); } } // Remove the attribute if it is empty. if (innerClassesAttribute.u2classesCount == 0) { attributesEditor.deleteAttribute(ClassConstants.ATTR_InnerClasses); } }
public void visitInnerClassesAttribute(Clazz clazz, InnerClassesAttribute innerClassesAttribute) { // Mark inner class infos that refer to Lookup. innerClassesAttribute.innerClassEntriesAccept(clazz, this); // Remove all marked inner classes. InnerClassesAttributeEditor editor = new InnerClassesAttributeEditor(innerClassesAttribute); for (int index = innerClassesAttribute.u2classesCount - 1; index >= 0; index--) { InnerClassesInfo innerClassesInfo = innerClassesAttribute.classes[index]; if (shouldBeRemoved(innerClassesInfo)) { editor.removeInnerClassesInfo(innerClassesInfo); } } // Remove the attribute if it is empty. if (innerClassesAttribute.u2classesCount == 0) { attributesEditor.deleteAttribute(ClassConstants.ATTR_InnerClasses); } }
public void visitInnerClassesAttribute(Clazz clazz, InnerClassesAttribute innerClassesAttribute) { // Mark inner class infos that refer to Lookup. innerClassesAttribute.innerClassEntriesAccept(clazz, this); // Remove all marked inner classes. InnerClassesAttributeEditor editor = new InnerClassesAttributeEditor(innerClassesAttribute); for (int index = innerClassesAttribute.u2classesCount - 1; index >= 0; index--) { InnerClassesInfo innerClassesInfo = innerClassesAttribute.classes[index]; if (shouldBeRemoved(innerClassesInfo)) { editor.removeInnerClassesInfo(innerClassesInfo); } } // Remove the attribute if it is empty. if (innerClassesAttribute.u2classesCount == 0) { attributesEditor.deleteAttribute(ClassConstants.ATTR_InnerClasses); } }