类 MethodCreator
- java.lang.Object
-
- proguard.classfile.visitor.MethodCreator
-
- 所有已实现的接口:
ClassVisitor
public class MethodCreator extends java.lang.Object implements ClassVisitor
This class visitor is able to create a method and add it to a program class in case it does not exist yet.
-
-
构造器概要
构造器 构造器 说明 MethodCreator(ClassPool programClassPool, ClassPool libraryClassPool, java.lang.String name, java.lang.String descriptor, int requiredSetAccessFlags, int processingFlags, boolean callSuper)Create a new MethodCreator.
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static voidaddReturnInstructions(InstructionSequenceBuilder builder, java.lang.String returnType)Adds a return instruction to this builder for a super call that resulted in the given return type.ProgramMethodgetMethod()voidvisitAnyClass(Clazz clazz)Visits any Clazz instance.voidvisitProgramClass(ProgramClass programClass)-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 proguard.classfile.visitor.ClassVisitor
visitLibraryClass
-
-
-
-
构造器详细资料
-
MethodCreator
public MethodCreator(ClassPool programClassPool, ClassPool libraryClassPool, java.lang.String name, java.lang.String descriptor, int requiredSetAccessFlags, int processingFlags, boolean callSuper)
Create a new MethodCreator.- 参数:
programClassPool- The program class pool.libraryClassPool- The library class pool.name- The name of the method to add.descriptor- The descriptor of the method to add.requiredSetAccessFlags- The access flags of the method to add.processingFlags- The processing flags to attach to the method.callSuper- Whether the method should call a super method.
-
-
方法详细资料
-
visitAnyClass
public void visitAnyClass(Clazz clazz)
从接口复制的说明:ClassVisitorVisits any Clazz instance. The more specific default implementations of this interface delegate to this method.- 指定者:
visitAnyClass在接口中ClassVisitor
-
visitProgramClass
public void visitProgramClass(ProgramClass programClass)
- 指定者:
visitProgramClass在接口中ClassVisitor
-
addReturnInstructions
public static void addReturnInstructions(InstructionSequenceBuilder builder, java.lang.String returnType)
Adds a return instruction to this builder for a super call that resulted in the given return type.
-
getMethod
public ProgramMethod getMethod()
-
-