public class BasicInvocationUnit extends SimplifiedVisitor implements InvocationUnit, ConstantVisitor, MemberVisitor
| Modifier and Type | Field and Description |
|---|---|
protected ValueFactory |
valueFactory |
| Constructor and Description |
|---|
BasicInvocationUnit(ValueFactory valueFactory)
Creates a new BasicInvocationUnit with the given value factory.
|
| Modifier and Type | Method and Description |
|---|---|
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,
String type)
Returns the class though which the specified field is accessed.
|
protected Value |
getFieldValue(Clazz clazz,
RefConstant refConstant,
String type)
Returns the value of the specified field.
|
protected Value |
getMethodParameterValue(Clazz clazz,
Method method,
int parameterIndex,
String type,
Clazz referencedClass)
Returns the value of the specified method parameter.
|
protected Value |
getMethodReturnValue(Clazz clazz,
InvokeDynamicConstant invokeDynamicConstant,
String type)
Returns the return value of the specified method.
|
protected Value |
getMethodReturnValue(Clazz clazz,
RefConstant refConstant,
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 |
visitInvokeDynamicConstant(Clazz clazz,
InvokeDynamicConstant invokeDynamicConstant) |
void |
visitLibraryField(LibraryClass programClass,
LibraryField programField) |
void |
visitLibraryMethod(LibraryClass libraryClass,
LibraryMethod libraryMethod) |
void |
visitProgramField(ProgramClass programClass,
ProgramField programField) |
void |
visitProgramMethod(ProgramClass programClass,
ProgramMethod programMethod) |
visitAnnotation, visitAnnotation, visitAnnotation, visitAnnotation, visitAnnotation, visitAnnotation, visitAnnotationDefaultAttribute, visitAnnotationElementValue, visitAnyAnnotationsAttribute, visitAnyAttribute, visitAnyClass, visitAnyConstant, visitAnyElementValue, visitAnyInstruction, visitAnyMember, visitAnyParameterAnnotationsAttribute, visitAnyRefConstant, visitAnyStackMapFrame, visitAnySwitchInstruction, visitAnyTargetInfo, visitAnyTypeAnnotationsAttribute, visitAnyVerificationType, visitArrayElementValue, visitBootstrapMethodsAttribute, visitBranchInstruction, visitCatchTargetInfo, visitClassConstant, visitClassElementValue, visitCodeAttribute, visitConstantElementValue, visitConstantInstruction, visitConstantValueAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitDoubleConstant, visitDoubleType, visitEmptyTargetInfo, visitEmptyTargetInfo, visitEmptyTargetInfo, visitEnclosingMethodAttribute, visitEnumConstantElementValue, visitExceptionsAttribute, visitFloatConstant, visitFloatType, visitFormalParameterTargetInfo, visitFullFrame, visitInnerClassesAttribute, visitIntegerConstant, visitIntegerType, visitInterfaceMethodrefConstant, visitLessZeroFrame, visitLibraryClass, visitLibraryMember, visitLineNumberTableAttribute, visitLocalVariableTableAttribute, visitLocalVariableTargetInfo, visitLocalVariableTypeTableAttribute, visitLongConstant, visitLongType, visitLookUpSwitchInstruction, visitMethodHandleConstant, visitMethodParametersAttribute, visitMethodrefConstant, visitMethodTypeConstant, visitMoreZeroFrame, visitNameAndTypeConstant, visitNullType, visitObjectType, visitOffsetTargetInfo, visitProgramClass, visitProgramMember, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleParameterAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleParameterAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitSameOneFrame, visitSameZeroFrame, visitSignatureAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSimpleInstruction, visitSourceDirAttribute, visitSourceFileAttribute, visitStackDoubleType, visitStackFloatType, visitStackIntegerType, visitStackLongType, visitStackMapAttribute, visitStackMapTableAttribute, visitStackNullType, visitStackObjectType, visitStackTopType, visitStackUninitializedThisType, visitStackUninitializedType, visitStringConstant, visitSuperTypeTargetInfo, visitSyntheticAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitTableSwitchInstruction, visitThrowsTargetInfo, visitTopType, visitTypeAnnotation, visitTypeAnnotation, visitTypeAnnotation, visitTypeAnnotation, visitTypeAnnotation, visitTypeAnnotation, visitTypeArgumentTargetInfo, visitTypeParameterBoundTargetInfo, visitTypeParameterBoundTargetInfo, visitTypeParameterBoundTargetInfo, visitTypeParameterBoundTargetInfo, visitTypeParameterTargetInfo, visitTypeParameterTargetInfo, visitTypePathInfo, visitTypePathInfo, visitTypePathInfo, visitTypePathInfo, visitTypePathInfo, visitUninitializedThisType, visitUninitializedType, visitUnknownAttribute, visitUtf8Constant, visitVariableInstruction, visitVariablesDoubleType, visitVariablesFloatType, visitVariablesIntegerType, visitVariablesLongType, visitVariablesNullType, visitVariablesObjectType, visitVariablesTopType, visitVariablesUninitializedThisType, visitVariablesUninitializedTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitvisitClassConstant, visitDoubleConstant, visitFloatConstant, visitIntegerConstant, visitInterfaceMethodrefConstant, visitLongConstant, visitMethodHandleConstant, visitMethodrefConstant, visitMethodTypeConstant, visitNameAndTypeConstant, visitStringConstant, visitUtf8Constantprotected final ValueFactory valueFactory
public BasicInvocationUnit(ValueFactory valueFactory)
public void enterMethod(Clazz clazz, Method method, Variables variables)
InvocationUnitenterMethod in interface InvocationUnitpublic void exitMethod(Clazz clazz, Method method, Value returnValue)
InvocationUnitexitMethod in interface InvocationUnitpublic void invokeMember(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction, Stack stack)
InvocationUnitinvokeMember in interface InvocationUnitpublic void visitFieldrefConstant(Clazz clazz, FieldrefConstant fieldrefConstant)
visitFieldrefConstant in interface ConstantVisitorvisitFieldrefConstant in class SimplifiedVisitorpublic void visitAnyMethodrefConstant(Clazz clazz, RefConstant methodrefConstant)
SimplifiedVisitorvisitAnyMethodrefConstant in class SimplifiedVisitorpublic void visitInvokeDynamicConstant(Clazz clazz, InvokeDynamicConstant invokeDynamicConstant)
visitInvokeDynamicConstant in interface ConstantVisitorvisitInvokeDynamicConstant in class SimplifiedVisitorprotected void setFieldClassValue(Clazz clazz, RefConstant refConstant, ReferenceValue value)
protected Value getFieldClassValue(Clazz clazz, RefConstant refConstant, String type)
protected void setFieldValue(Clazz clazz, RefConstant refConstant, Value value)
protected Value getFieldValue(Clazz clazz, RefConstant refConstant, String type)
protected void setMethodParameterValue(Clazz clazz, RefConstant refConstant, int parameterIndex, Value value)
protected Value getMethodParameterValue(Clazz clazz, Method method, int parameterIndex, String type, Clazz referencedClass)
protected void setMethodReturnValue(Clazz clazz, Method method, Value value)
protected Value getMethodReturnValue(Clazz clazz, RefConstant refConstant, String type)
protected Value getMethodReturnValue(Clazz clazz, InvokeDynamicConstant invokeDynamicConstant, String type)
public void visitProgramField(ProgramClass programClass, ProgramField programField)
visitProgramField in interface MemberVisitorvisitProgramField in class SimplifiedVisitorpublic void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
visitProgramMethod in interface MemberVisitorvisitProgramMethod in class SimplifiedVisitorpublic void visitLibraryField(LibraryClass programClass, LibraryField programField)
visitLibraryField in interface MemberVisitorvisitLibraryField in class SimplifiedVisitorpublic void visitLibraryMethod(LibraryClass libraryClass, LibraryMethod libraryMethod)
visitLibraryMethod in interface MemberVisitorvisitLibraryMethod in class SimplifiedVisitorCopyright © 2015. All Rights Reserved.