类 Call
- java.lang.Object
-
- proguard.analysis.datastructure.callgraph.Call
-
- 直接已知子类:
ConcreteCall,SymbolicCall
public abstract class Call extends java.lang.ObjectRepresents a method call. If the call target is aMethodthat is present in the class pool, aConcreteCallis instantiated. If the call target is not a known method, aSymbolicCallis the appropriate subclass.
-
-
字段概要
字段 修饰符和类型 字段 说明 CodeLocationcallerThe location where the call was invoked.booleancontrolFlowDependentIf false, control flow in the calling method will always reach this call.InstructioninstructionThe instruction performing this call.booleanruntimeTypeDependentIf true, this call might only be one of several alternative targets, depending on the actual type of the called object during runtime.intthrowsNullptrDescribes whether this call will throw aNullPointerExceptionat runtime.
-
构造器概要
构造器 限定符 构造器 说明 protectedCall(CodeLocation caller, Value instance, java.util.List<Value> arguments, Value returnValue, int throwsNullptr, Instruction instruction, boolean controlFlowDependent, boolean runtimeTypeDependent)
-
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 voidclearValues()Clear allValueobject references from this call.booleanequals(java.lang.Object o)ValuegetArgument(int index)Get the value for a specific argument index.intgetArgumentCount()Returns the number of arguments.ValuegetInstance()If this is a virtual call, this describes thethispointer of the object whose method is called, usually anIdentifiedReferenceValue.intgetJvmArgumentSize()Returns the number of elements that need to be popped from the JVM stack for this call.ValuegetReturnValue()Get the return value of this call.abstract MethodSignaturegetTarget()TheMethodSignatureof the method that is being called.inthashCode()abstract booleanhasIncompleteTarget()Check if this call's target is fully known or only parts of it (e.g. only the descriptor).booleanisCertainlyCalled()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.booleanisStatic()Check if this call is static (no implicitinstanceset) or not.voidsetArguments(java.util.List<Value> arguments)voidsetInstance(Value instance)voidsetReturnValue(Value returnValue)voidtargetMethodAccept(MemberVisitor memberVisitor)java.lang.StringtoSimpleString()Prints a shorter version of the regular `toString()` without the caller or null pointer information.java.lang.StringtoString()
-
-
-
字段详细资料
-
caller
public final CodeLocation caller
The location where the call was invoked.
-
throwsNullptr
public final int throwsNullptr
Describes whether this call will throw aNullPointerExceptionat runtime. EitherValue.NEVER,Value.MAYBEorValue.ALWAYS.
-
instruction
public final Instruction 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 controlFlowDependent
If 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 runtimeTypeDependent
If 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.
-
-
构造器详细资料
-
Call
protected Call(CodeLocation caller, Value instance, java.util.List<Value> arguments, Value returnValue, int throwsNullptr, Instruction instruction, boolean controlFlowDependent, boolean runtimeTypeDependent)
-
-
方法详细资料
-
isStatic
public boolean isStatic()
Check if this call is static (no implicitinstanceset) or not.
-
getTarget
public abstract MethodSignature 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
public Value getArgument(int index)
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
public void setArguments(java.util.List<Value> arguments)
-
getInstance
public Value 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
public void setInstance(Value instance)
-
getReturnValue
public Value 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
public void setReturnValue(Value returnValue)
-
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
public java.lang.String toString()
- 覆盖:
toString在类中java.lang.Object
-
toSimpleString
public java.lang.String toSimpleString()
Prints a shorter version of the regular `toString()` without the caller or null pointer information.
-
targetMethodAccept
public void targetMethodAccept(MemberVisitor memberVisitor)
-
equals
public boolean equals(java.lang.Object o)
- 覆盖:
equals在类中java.lang.Object
-
hashCode
public int hashCode()
- 覆盖:
hashCode在类中java.lang.Object
-
-