|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectproguard.classfile.editor.AttributesEditor
public class 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.
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
void |
addAttribute(Attribute attribute)
Adds the given attribute to the target. |
void |
deleteAttribute(java.lang.String attributeName)
Deletes the specified attribute from the target. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AttributesEditor(ProgramClass targetClass,
boolean replaceAttributes)
public AttributesEditor(ProgramClass targetClass,
ProgramMember targetMember,
boolean replaceAttributes)
public AttributesEditor(ProgramClass targetClass,
ProgramMember targetMember,
CodeAttribute targetAttribute,
boolean replaceAttributes)
| Method Detail |
|---|
public void addAttribute(Attribute attribute)
public void deleteAttribute(java.lang.String attributeName)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||