Class Call
- Direct Known Subclasses:
ConcreteCall,SymbolicCall
Method that is present in the class
pool, a ConcreteCall is instantiated. If the call target is not a known method, a SymbolicCall is the appropriate subclass.-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal CodeLocationThe location where the call was invoked.final booleanIf false, control flow in the calling method will always reach this call.final InstructionThe instruction performing this call.final booleanIf true, this call might only be one of several alternative targets, depending on the actual type of the called object during runtime.final intDescribes whether this call will throw aNullPointerExceptionat runtime. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCall(CodeLocation caller, Value instance, List<Value> arguments, Value returnValue, int throwsNullptr, Instruction instruction, boolean controlFlowDependent, boolean runtimeTypeDependent) -
Method Summary
Modifier and TypeMethodDescriptionvoidClear allValueobject references from this call.booleangetArgument(int index) Get the value for a specific argument index.intReturns the number of arguments.If this is a virtual call, this describes thethispointer of the object whose method is called, usually anIdentifiedReferenceValue.intReturns the number of elements that need to be popped from the JVM stack for this call.Get the return value of this call.abstract MethodSignatureTheMethodSignatureof the method that is being called.inthashCode()abstract booleanCheck if this call's target is fully known or only parts of it (e.g.booleanReturns true if this call is always executed, no matter which branch in the methods are taken and which type the called object has during runtime.booleanisStatic()Check if this call is static (no implicitinstanceset) or not.voidsetArguments(List<Value> arguments) voidsetInstance(Value instance) voidsetReturnValue(Value returnValue) voidtargetMethodAccept(MemberVisitor memberVisitor) Prints a shorter version of the regular `toString()` without the caller or null pointer information.toString()
-
Field Details
-
caller
The location where the call was invoked. -
throwsNullptr
public final int throwsNullptrDescribes whether this call will throw aNullPointerExceptionat runtime. EitherValue.NEVER,Value.MAYBEorValue.ALWAYS. -
instruction
The instruction performing this call. There are several different ways of invoking a method call in the JVM:Instruction.OP_INVOKESTATICInstruction.OP_INVOKEVIRTUALInstruction.OP_INVOKEINTERFACEInstruction.OP_INVOKESPECIALInstruction.OP_INVOKEDYNAMIC
CallResolverfor more details. -
controlFlowDependent
public final boolean controlFlowDependentIf false, control flow in the calling method will always reach this call. Otherwise, whether the call will be invoked at runtime might depend on e.g. specific branches being taken. -
runtimeTypeDependent
public final boolean runtimeTypeDependentIf true, this call might only be one of several alternative targets, depending on the actual type of the called object during runtime. Otherwise, this call is the only possible target.
-
-
Constructor Details
-
Call
protected Call(CodeLocation caller, Value instance, List<Value> arguments, Value returnValue, int throwsNullptr, Instruction instruction, boolean controlFlowDependent, boolean runtimeTypeDependent)
-
-
Method Details
-
isStatic
public boolean isStatic()Check if this call is static (no implicitinstanceset) or not. -
getTarget
TheMethodSignatureof the method that is being called. -
hasIncompleteTarget
public abstract boolean hasIncompleteTarget()Check if this call's target is fully known or only parts of it (e.g. only the descriptor). -
getArgumentCount
public int getArgumentCount()Returns the number of arguments. -
getJvmArgumentSize
public int getJvmArgumentSize()Returns the number of elements that need to be popped from the JVM stack for this call. -
getArgument
Get the value for a specific argument index.Note: This is only to be used in implementations of
CallHandler.handleCall(Call, TracedStack, TracedVariables). Afterwards, the values will have been cleared to reduce unnecessary memory usage, as argument values are not needed for the full call graph reconstruction. -
setArguments
-
getInstance
If this is a virtual call, this describes thethispointer of the object whose method is called, usually anIdentifiedReferenceValue. For static calls this is null.Note: This is only to be used in implementations of
CallHandler.handleCall(Call, TracedStack, TracedVariables). Afterwards, the value will have been cleared to reduce unnecessary memory usage, as the instance value is not needed for the full call graph reconstruction. -
setInstance
-
getReturnValue
Get the return value of this call.Note: This is only to be used in implementations of
CallHandler.handleCall(Call, TracedStack, TracedVariables). Afterwards, the value will have been cleared to reduce unnecessary memory usage, as the return value is not needed for the full call graph reconstruction. -
setReturnValue
-
clearValues
public void clearValues()Clear allValueobject references from this call. -
isCertainlyCalled
public boolean isCertainlyCalled()Returns true if this call is always executed, no matter which branch in the methods are taken and which type the called object has during runtime. -
toString
-
toSimpleString
Prints a shorter version of the regular `toString()` without the caller or null pointer information. -
targetMethodAccept
-
equals
-
hashCode
public int hashCode()
-