类 AttributesEditor
java.lang.Object
proguard.classfile.editor.AttributesEditor
This class can add and delete attributes to and from classes, fields, methods, and code
attributes. Attributes to be added must be filled out beforehand, including their references to
the constant pool. Existing attributes of the same type are always replaced.
-
构造器概要
构造器构造器说明AttributesEditor(ProgramClass targetClass, boolean replaceAttributes) Creates a new AttributeAdder that will edit attributes in the given target class.AttributesEditor(ProgramClass targetClass, ProgramMember targetMember, boolean replaceAttributes) Creates a new AttributeAdder that will edit attributes in the given target class member.AttributesEditor(ProgramClass targetClass, ProgramMember targetMember, CodeAttribute targetAttribute, boolean replaceAttributes) Creates a new AttributeAdder that will edit attributes in the given target code attribute. -
方法概要
修饰符和类型方法说明voidaddAttribute(Attribute attribute) Adds the given attribute to the target.voiddeleteAttribute(String attributeName) Deletes the specified attribute from the target.findAttribute(String attributeName) Finds the specified attribute in the target.
-
构造器详细资料
-
AttributesEditor
Creates a new AttributeAdder that will edit attributes in the given target class. -
AttributesEditor
public AttributesEditor(ProgramClass targetClass, ProgramMember targetMember, boolean replaceAttributes) Creates a new AttributeAdder that will edit attributes in the given target class member. -
AttributesEditor
public AttributesEditor(ProgramClass targetClass, ProgramMember targetMember, CodeAttribute targetAttribute, boolean replaceAttributes) Creates a new AttributeAdder that will edit attributes in the given target code attribute.
-
-
方法详细资料
-
findAttribute
Finds the specified attribute in the target. -
addAttribute
Adds the given attribute to the target. -
deleteAttribute
Deletes the specified attribute from the target.
-