public class BasicInvocationUnit extends SimplifiedInvocationUnit implements InvocationUnit, MemberVisitor
InvocationUnit
sets up the variables for entering a method, and it updates the stack
for the invocation of a class member, using simple values.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 |
---|---|
Value |
getExceptionValue(Clazz clazz,
ClassConstant catchClassConstant)
Returns the value of the specified exception.
|
Value |
getFieldClassValue(Clazz clazz,
FieldrefConstant fieldrefConstant,
java.lang.String type)
Returns the class though which the specified field is accessed.
|
Value |
getFieldValue(Clazz clazz,
FieldrefConstant fieldrefConstant,
java.lang.String type)
Returns the value of the specified field.
|
Value |
getMethodParameterValue(Clazz clazz,
Method method,
int parameterIndex,
java.lang.String type,
Clazz referencedClass)
Returns the value of the specified method parameter.
|
Value |
getMethodReturnValue(Clazz clazz,
AnyMethodrefConstant anyMethodrefConstant,
java.lang.String type)
Returns the return value of the specified method.
|
Value |
getMethodReturnValue(Clazz clazz,
InvokeDynamicConstant invokeDynamicConstant,
java.lang.String type)
Returns the return value of the specified method.
|
void |
setFieldClassValue(Clazz clazz,
FieldrefConstant fieldrefConstant,
ReferenceValue value)
Sets the class through which the specified field is accessed.
|
void |
setFieldValue(Clazz clazz,
FieldrefConstant fieldrefConstant,
Value value)
Sets the value of the specified field.
|
void |
setMethodParameterValue(Clazz clazz,
AnyMethodrefConstant anyMethodrefConstant,
int parameterIndex,
Value value)
Sets the value of the specified method parameter.
|
void |
setMethodReturnValue(Clazz clazz,
Method method,
Value value)
Sets the return value of the specified method.
|
void |
visitLibraryField(LibraryClass programClass,
LibraryField libraryField) |
void |
visitLibraryMethod(LibraryClass libraryClass,
LibraryMethod libraryMethod) |
void |
visitProgramField(ProgramClass programClass,
ProgramField programField) |
void |
visitProgramMethod(ProgramClass programClass,
ProgramMethod programMethod) |
enterExceptionHandler, enterMethod, exitMethod, invokeMember, methodMayHaveSideEffects, visitAnyMethodrefConstant, visitFieldrefConstant, visitInvokeDynamicConstant, visitParameter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
enterExceptionHandler, enterMethod, exitMethod, invokeMember
visitAnyMember, visitLibraryMember, visitProgramMember
visitAnyConstant, visitAnyRefConstant, visitClassConstant, visitDoubleConstant, visitDynamicConstant, visitFloatConstant, visitIntegerConstant, visitInterfaceMethodrefConstant, visitLongConstant, visitMethodHandleConstant, visitMethodrefConstant, visitMethodTypeConstant, visitModuleConstant, visitNameAndTypeConstant, visitPackageConstant, visitPrimitiveArrayConstant, visitStringConstant, visitUtf8Constant
protected final ValueFactory valueFactory
public BasicInvocationUnit(ValueFactory valueFactory)
public Value getExceptionValue(Clazz clazz, ClassConstant catchClassConstant)
SimplifiedInvocationUnit
getExceptionValue
in class SimplifiedInvocationUnit
public void setFieldClassValue(Clazz clazz, FieldrefConstant fieldrefConstant, ReferenceValue value)
SimplifiedInvocationUnit
setFieldClassValue
in class SimplifiedInvocationUnit
public Value getFieldClassValue(Clazz clazz, FieldrefConstant fieldrefConstant, java.lang.String type)
SimplifiedInvocationUnit
getFieldClassValue
in class SimplifiedInvocationUnit
public void setFieldValue(Clazz clazz, FieldrefConstant fieldrefConstant, Value value)
SimplifiedInvocationUnit
setFieldValue
in class SimplifiedInvocationUnit
public Value getFieldValue(Clazz clazz, FieldrefConstant fieldrefConstant, java.lang.String type)
SimplifiedInvocationUnit
getFieldValue
in class SimplifiedInvocationUnit
public void setMethodParameterValue(Clazz clazz, AnyMethodrefConstant anyMethodrefConstant, int parameterIndex, Value value)
SimplifiedInvocationUnit
setMethodParameterValue
in class SimplifiedInvocationUnit
public Value getMethodParameterValue(Clazz clazz, Method method, int parameterIndex, java.lang.String type, Clazz referencedClass)
SimplifiedInvocationUnit
getMethodParameterValue
in class SimplifiedInvocationUnit
public void setMethodReturnValue(Clazz clazz, Method method, Value value)
SimplifiedInvocationUnit
setMethodReturnValue
in class SimplifiedInvocationUnit
public Value getMethodReturnValue(Clazz clazz, AnyMethodrefConstant anyMethodrefConstant, java.lang.String type)
SimplifiedInvocationUnit
getMethodReturnValue
in class SimplifiedInvocationUnit
public Value getMethodReturnValue(Clazz clazz, InvokeDynamicConstant invokeDynamicConstant, java.lang.String type)
getMethodReturnValue
in class SimplifiedInvocationUnit
public void visitProgramField(ProgramClass programClass, ProgramField programField)
visitProgramField
in interface MemberVisitor
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
visitProgramMethod
in interface MemberVisitor
public void visitLibraryField(LibraryClass programClass, LibraryField libraryField)
visitLibraryField
in interface MemberVisitor
public void visitLibraryMethod(LibraryClass libraryClass, LibraryMethod libraryMethod)
visitLibraryMethod
in interface MemberVisitor