类 MemberAdder
java.lang.Object
proguard.classfile.editor.MemberAdder
- 所有已实现的接口:
MemberVisitor
This
MemberVisitor copies all class members that it visits to the given target class.
Their processing info is set to the class members from which they were copied.-
构造器概要
构造器构造器说明MemberAdder(ProgramClass targetClass) Creates a new MemberAdder that will copy methods into the given target class.MemberAdder(ProgramClass targetClass, MemberVisitor extraMemberVisitor) Creates a new MemberAdder that will copy methods into the given target class.MemberAdder(ProgramClass targetClass, StringFunction nameTransformer, MemberVisitor extraMemberVisitor) Creates a new MemberAdder that will copy methods into the given target class. -
方法概要
修饰符和类型方法说明static voidThis main method illustrates and tests the class, by reading an input class file and copying its class members into a new class that it writes to an output class file.voidvisitProgramField(ProgramClass programClass, ProgramField programField) voidvisitProgramMethod(ProgramClass programClass, ProgramMethod programMethod) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 proguard.classfile.visitor.MemberVisitor
visitAnyMember, visitLibraryField, visitLibraryMember, visitLibraryMethod, visitProgramMember
-
构造器详细资料
-
MemberAdder
Creates a new MemberAdder that will copy methods into the given target class.- 参数:
targetClass- the class to which all visited class members will be added.
-
MemberAdder
Creates a new MemberAdder that will copy methods into the given target class.- 参数:
targetClass- the class to which all visited class members will be added.extraMemberVisitor- an optional member visitor that visits each new member right after it has been added. This allows changing the processing info, for instance.
-
MemberAdder
public MemberAdder(ProgramClass targetClass, StringFunction nameTransformer, MemberVisitor extraMemberVisitor) Creates a new MemberAdder that will copy methods into the given target class.- 参数:
targetClass- the class to which all visited class members will be added.nameTransformer- the transformer to be applied to each member's name before copying. If null, the original name will be used.extraMemberVisitor- an optional member visitor that visits each new member right after it has been added. This allows changing the processing info, for instance.
-
-
方法详细资料
-
visitProgramField
- 指定者:
visitProgramField在接口中MemberVisitor
-
visitProgramMethod
- 指定者:
visitProgramMethod在接口中MemberVisitor
-
main
This main method illustrates and tests the class, by reading an input class file and copying its class members into a new class that it writes to an output class file.
-