类 SimplifiedInvocationUnit
- java.lang.Object
-
- proguard.evaluation.SimplifiedInvocationUnit
-
- 所有已实现的接口:
ConstantVisitor,ParameterVisitor,InvocationUnit
public abstract class SimplifiedInvocationUnit extends java.lang.Object implements InvocationUnit, ParameterVisitor, ConstantVisitor
ThisInvocationUnitsets up the variables for entering a method, and it updates the stack for the invocation of a class member, using simple values.
-
-
构造器概要
构造器 构造器 说明 SimplifiedInvocationUnit()
-
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 voidenterExceptionHandler(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, int catchType, Stack stack)Sets up the given stack for entering the given exception handler.voidenterMethod(Clazz clazz, Method method, Variables variables)Sets up the given variables for entering the given method.voidexitMethod(Clazz clazz, Method method, Value returnValue)Exits the given method with the given return value.abstract ValuegetExceptionValue(Clazz clazz, ClassConstant catchClassConstant)Returns the value of the specified exception.abstract ValuegetFieldClassValue(Clazz clazz, FieldrefConstant fieldrefConstant, java.lang.String type)Returns the class though which the specified field is accessed.abstract ValuegetFieldValue(Clazz clazz, FieldrefConstant fieldrefConstant, java.lang.String type)Returns the value of the specified field.abstract ValuegetMethodParameterValue(Clazz clazz, Method method, int parameterIndex, java.lang.String type, Clazz referencedClass)Returns the value of the specified method parameter.abstract ValuegetMethodReturnValue(Clazz clazz, AnyMethodrefConstant anyMethodrefConstant, java.lang.String type)Returns the return value of the specified method.abstract ValuegetMethodReturnValue(Clazz clazz, InvokeDynamicConstant invokeDynamicConstant, java.lang.String type)Returns the return value of the specified method.voidinvokeMember(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction, Stack stack, Variables variables)Updates the given stack corresponding to the execution of the given field or method reference instruction.protected booleanmethodMayHaveSideEffects(Clazz clazz, AnyMethodrefConstant anyMethodrefConstant, java.lang.String returnType)Returns true if the method itself can modify the stack/variables and therefore needs to be executed even if it returns void.abstract voidsetFieldClassValue(Clazz clazz, FieldrefConstant fieldrefConstant, ReferenceValue value)Sets the class through which the specified field is accessed.abstract voidsetFieldValue(Clazz clazz, FieldrefConstant fieldrefConstant, Value value)Sets the value of the specified field.abstract voidsetMethodParameterValue(Clazz clazz, AnyMethodrefConstant anyMethodrefConstant, int parameterIndex, Value value)Sets the value of the specified method parameter.abstract voidsetMethodReturnValue(Clazz clazz, Method method, Value value)Sets the return value of the specified method.voidvisitAnyMethodrefConstant(Clazz clazz, AnyMethodrefConstant anyMethodrefConstant)Visits any RefConstant instance.voidvisitFieldrefConstant(Clazz clazz, FieldrefConstant fieldrefConstant)voidvisitInvokeDynamicConstant(Clazz clazz, InvokeDynamicConstant invokeDynamicConstant)voidvisitParameter(Clazz clazz, Member member, int parameterIndex, int parameterCount, int parameterOffset, int parameterSize, java.lang.String parameterType, Clazz referencedClass)Visits the given parameter.-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 proguard.classfile.constant.visitor.ConstantVisitor
visitAnyConstant, visitAnyRefConstant, visitClassConstant, visitDoubleConstant, visitDynamicConstant, visitFloatConstant, visitIntegerConstant, visitInterfaceMethodrefConstant, visitLongConstant, visitMethodHandleConstant, visitMethodrefConstant, visitMethodTypeConstant, visitModuleConstant, visitNameAndTypeConstant, visitPackageConstant, visitPrimitiveArrayConstant, visitStringConstant, visitUtf8Constant
-
-
-
-
方法详细资料
-
enterMethod
public void enterMethod(Clazz clazz, Method method, Variables variables)
从接口复制的说明:InvocationUnitSets up the given variables for entering the given method.- 指定者:
enterMethod在接口中InvocationUnit
-
visitParameter
public void visitParameter(Clazz clazz, Member member, int parameterIndex, int parameterCount, int parameterOffset, int parameterSize, java.lang.String parameterType, Clazz referencedClass)
从接口复制的说明:ParameterVisitorVisits the given parameter.- 指定者:
visitParameter在接口中ParameterVisitor- 参数:
clazz- the class of the method.member- the field or method of the parameter.parameterIndex- the index of the parameter.parameterCount- the total number of parameters.parameterOffset- the offset of the parameter, accounting for longs and doubles taking up two entries.parameterSize- the total size of the parameters, accounting for longs and doubles taking up two entries.parameterType- the parameter type.referencedClass- the class contained in the parameter type, if any.
-
exitMethod
public void exitMethod(Clazz clazz, Method method, Value returnValue)
从接口复制的说明:InvocationUnitExits the given method with the given return value.- 指定者:
exitMethod在接口中InvocationUnit
-
enterExceptionHandler
public void enterExceptionHandler(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, int catchType, Stack stack)
从接口复制的说明:InvocationUnitSets up the given stack for entering the given exception handler.- 指定者:
enterExceptionHandler在接口中InvocationUnit
-
invokeMember
public void invokeMember(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction, Stack stack, Variables variables)
从接口复制的说明:InvocationUnitUpdates the given stack corresponding to the execution of the given field or method reference instruction.- 指定者:
invokeMember在接口中InvocationUnit
-
visitFieldrefConstant
public void visitFieldrefConstant(Clazz clazz, FieldrefConstant fieldrefConstant)
- 指定者:
visitFieldrefConstant在接口中ConstantVisitor
-
visitAnyMethodrefConstant
public void visitAnyMethodrefConstant(Clazz clazz, AnyMethodrefConstant anyMethodrefConstant)
从接口复制的说明:ConstantVisitorVisits any RefConstant instance. The more specific default implementations of this interface delegate to this method.- 指定者:
visitAnyMethodrefConstant在接口中ConstantVisitor
-
visitInvokeDynamicConstant
public void visitInvokeDynamicConstant(Clazz clazz, InvokeDynamicConstant invokeDynamicConstant)
- 指定者:
visitInvokeDynamicConstant在接口中ConstantVisitor
-
getExceptionValue
public abstract Value getExceptionValue(Clazz clazz, ClassConstant catchClassConstant)
Returns the value of the specified exception.
-
setFieldClassValue
public abstract void setFieldClassValue(Clazz clazz, FieldrefConstant fieldrefConstant, ReferenceValue value)
Sets the class through which the specified field is accessed.
-
getFieldClassValue
public abstract Value getFieldClassValue(Clazz clazz, FieldrefConstant fieldrefConstant, java.lang.String type)
Returns the class though which the specified field is accessed.
-
setFieldValue
public abstract void setFieldValue(Clazz clazz, FieldrefConstant fieldrefConstant, Value value)
Sets the value of the specified field.
-
getFieldValue
public abstract Value getFieldValue(Clazz clazz, FieldrefConstant fieldrefConstant, java.lang.String type)
Returns the value of the specified field.
-
setMethodParameterValue
public abstract void setMethodParameterValue(Clazz clazz, AnyMethodrefConstant anyMethodrefConstant, int parameterIndex, Value value)
Sets the value of the specified method parameter.
-
getMethodParameterValue
public abstract Value getMethodParameterValue(Clazz clazz, Method method, int parameterIndex, java.lang.String type, Clazz referencedClass)
Returns the value of the specified method parameter.
-
setMethodReturnValue
public abstract void setMethodReturnValue(Clazz clazz, Method method, Value value)
Sets the return value of the specified method.
-
getMethodReturnValue
public abstract Value getMethodReturnValue(Clazz clazz, AnyMethodrefConstant anyMethodrefConstant, java.lang.String type)
Returns the return value of the specified method.
-
getMethodReturnValue
public abstract Value getMethodReturnValue(Clazz clazz, InvokeDynamicConstant invokeDynamicConstant, java.lang.String type)
Returns the return value of the specified method.
-
methodMayHaveSideEffects
protected boolean methodMayHaveSideEffects(Clazz clazz, AnyMethodrefConstant anyMethodrefConstant, java.lang.String returnType)
Returns true if the method itself can modify the stack/variables and therefore needs to be executed even if it returns void.
-
-