类 LibraryClassEditor
- java.lang.Object
-
- proguard.classfile.editor.LibraryClassEditor
-
public class LibraryClassEditor extends java.lang.ObjectThis 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.
-
-
构造器概要
构造器 构造器 说明 LibraryClassEditor(LibraryClass targetClass)Creates a new ClassEditor that will edit elements in the given target class.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddField(Field field)Adds the given field.voidaddInterface(java.lang.String interfaceName, Clazz referencedInterface)Adds the given interface.voidaddMethod(Method method)Adds the given method.voidremoveField(Field field)Removes the given field.voidremoveInterface(java.lang.String interfaceName)Removes the given interface.voidremoveMethod(Method method)Removes the given method.
-
-
-
构造器详细资料
-
LibraryClassEditor
public LibraryClassEditor(LibraryClass targetClass)
Creates a new ClassEditor that will edit elements in the given target class.
-
-
方法详细资料
-
addInterface
public void addInterface(java.lang.String interfaceName, Clazz referencedInterface)Adds the given interface.
-
removeInterface
public void removeInterface(java.lang.String interfaceName)
Removes the given interface.
-
addField
public void addField(Field field)
Adds the given field.
-
removeField
public void removeField(Field field)
Removes the given field. Note that removing a field that is still being referenced can cause unpredictable effects.
-
addMethod
public void addMethod(Method method)
Adds the given method.
-
removeMethod
public void removeMethod(Method method)
Removes the given method. Note that removing a method that is still being referenced can cause unpredictable effects.
-
-