|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectproguard.classfile.util.SimplifiedVisitor
proguard.evaluation.BasicInvocationUnit
public class BasicInvocationUnit
This InvocationUnit sets up the variables for entering a method, and it updates the stack for the invocation of a class member, using simple values.
| Field Summary | |
|---|---|
protected ValueFactory |
valueFactory
|
| Constructor Summary | |
|---|---|
BasicInvocationUnit(ValueFactory valueFactory)
Creates a new BasicInvocationUnit with the given value factory. |
|
| Method Summary | |
|---|---|
void |
enterMethod(Clazz clazz,
Method method,
Variables variables)
Sets up the given variables for entering the given method. |
void |
exitMethod(Clazz clazz,
Method method,
Value returnValue)
Exits the given method with the given return value. |
protected Value |
getFieldClassValue(Clazz clazz,
RefConstant refConstant,
java.lang.String type)
Returns the class though which the specified field is accessed. |
protected Value |
getFieldValue(Clazz clazz,
RefConstant refConstant,
java.lang.String type)
Returns the value of the specified field. |
protected Value |
getMethodParameterValue(Clazz clazz,
Method method,
int parameterIndex,
java.lang.String type,
Clazz referencedClass)
Returns the value of the specified method parameter. |
protected Value |
getMethodReturnValue(Clazz clazz,
RefConstant refConstant,
java.lang.String type)
Returns the return value of the specified method. |
void |
invokeMember(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
ConstantInstruction constantInstruction,
Stack stack)
Updates the given stack corresponding to the execution of the given field or method reference instruction. |
protected void |
setFieldClassValue(Clazz clazz,
RefConstant refConstant,
ReferenceValue value)
Sets the class through which the specified field is accessed. |
protected void |
setFieldValue(Clazz clazz,
RefConstant refConstant,
Value value)
Sets the value of the specified field. |
protected void |
setMethodParameterValue(Clazz clazz,
RefConstant refConstant,
int parameterIndex,
Value value)
Sets the value of the specified method parameter. |
protected void |
setMethodReturnValue(Clazz clazz,
Method method,
Value value)
Sets the return value of the specified method. |
void |
visitAnyMethodrefConstant(Clazz clazz,
RefConstant methodrefConstant)
Visits any type of method RefConstant of the given class. |
void |
visitFieldrefConstant(Clazz clazz,
FieldrefConstant fieldrefConstant)
|
void |
visitLibraryField(LibraryClass programClass,
LibraryField programField)
|
void |
visitLibraryMethod(LibraryClass programClass,
LibraryMethod programMethod)
|
void |
visitProgramField(ProgramClass programClass,
ProgramField programField)
|
void |
visitProgramMethod(ProgramClass programClass,
ProgramMethod programMethod)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface proguard.classfile.constant.visitor.ConstantVisitor |
|---|
visitClassConstant, visitDoubleConstant, visitFloatConstant, visitIntegerConstant, visitInterfaceMethodrefConstant, visitLongConstant, visitMethodrefConstant, visitNameAndTypeConstant, visitStringConstant, visitUtf8Constant |
| Field Detail |
|---|
protected final ValueFactory valueFactory
| Constructor Detail |
|---|
public BasicInvocationUnit(ValueFactory valueFactory)
| Method Detail |
|---|
public void enterMethod(Clazz clazz,
Method method,
Variables variables)
InvocationUnit
enterMethod in interface InvocationUnit
public void exitMethod(Clazz clazz,
Method method,
Value returnValue)
InvocationUnit
exitMethod in interface InvocationUnit
public void invokeMember(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
ConstantInstruction constantInstruction,
Stack stack)
InvocationUnit
invokeMember in interface InvocationUnit
public void visitFieldrefConstant(Clazz clazz,
FieldrefConstant fieldrefConstant)
visitFieldrefConstant in interface ConstantVisitorvisitFieldrefConstant in class SimplifiedVisitor
public void visitAnyMethodrefConstant(Clazz clazz,
RefConstant methodrefConstant)
SimplifiedVisitor
visitAnyMethodrefConstant in class SimplifiedVisitor
protected void setFieldClassValue(Clazz clazz,
RefConstant refConstant,
ReferenceValue value)
protected Value getFieldClassValue(Clazz clazz,
RefConstant refConstant,
java.lang.String type)
protected void setFieldValue(Clazz clazz,
RefConstant refConstant,
Value value)
protected Value getFieldValue(Clazz clazz,
RefConstant refConstant,
java.lang.String type)
protected void setMethodParameterValue(Clazz clazz,
RefConstant refConstant,
int parameterIndex,
Value value)
protected Value getMethodParameterValue(Clazz clazz,
Method method,
int parameterIndex,
java.lang.String type,
Clazz referencedClass)
protected void setMethodReturnValue(Clazz clazz,
Method method,
Value value)
protected Value getMethodReturnValue(Clazz clazz,
RefConstant refConstant,
java.lang.String type)
public void visitProgramField(ProgramClass programClass,
ProgramField programField)
visitProgramField in interface MemberVisitorvisitProgramField in class SimplifiedVisitor
public void visitProgramMethod(ProgramClass programClass,
ProgramMethod programMethod)
visitProgramMethod in interface MemberVisitorvisitProgramMethod in class SimplifiedVisitor
public void visitLibraryField(LibraryClass programClass,
LibraryField programField)
visitLibraryField in interface MemberVisitorvisitLibraryField in class SimplifiedVisitor
public void visitLibraryMethod(LibraryClass programClass,
LibraryMethod programMethod)
visitLibraryMethod in interface MemberVisitorvisitLibraryMethod in class SimplifiedVisitor
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||