Package proguard.classfile.editor
Class LibraryClassEditor
java.lang.Object
proguard.classfile.editor.LibraryClassEditor
This class can add interfaces and class members to a given class. Elements to be added must be
filled out beforehand, including their references to the constant pool.
-
Constructor Summary
ConstructorsConstructorDescriptionLibraryClassEditor(LibraryClass targetClass) Creates a new ClassEditor that will edit elements in the given target class. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the given field.voidaddInterface(String interfaceName, Clazz referencedInterface) Adds the given interface.voidAdds the given method.voidremoveField(Field field) Removes the given field.voidremoveInterface(String interfaceName) Removes the given interface.voidremoveMethod(Method method) Removes the given method.
-
Constructor Details
-
LibraryClassEditor
Creates a new ClassEditor that will edit elements in the given target class.
-
-
Method Details
-
addInterface
Adds the given interface. -
removeInterface
Removes the given interface. -
addField
Adds the given field. -
removeField
Removes the given field. Note that removing a field that is still being referenced can cause unpredictable effects. -
addMethod
Adds the given method. -
removeMethod
Removes the given method. Note that removing a method that is still being referenced can cause unpredictable effects.
-