public abstract class MethodInvocationInstruction extends DexlibAbstractInstruction implements DanglingInstruction
Modifier and Type | Field and Description |
---|---|
protected AssignStmt |
assign |
protected InvokeExpr |
invocation |
codeAddress, instruction, lineNumber, unit
Constructor and Description |
---|
MethodInvocationInstruction(org.jf.dexlib2.iface.instruction.Instruction instruction,
int codeAddress) |
Modifier and Type | Method and Description |
---|---|
protected List<Local> |
buildParameters(DexBody body,
List<? extends CharSequence> paramTypes,
boolean isStatic)
Build the local parameters of the invocation.
|
protected SootClass |
convertClassName(String name,
MethodHandle.Kind kind)
Converts a given string class name into a SootClass.
|
protected List<Type> |
convertParameterTypes(List<? extends CharSequence> paramTypes)
Converts a list of dex string parameter types to soot types.
|
void |
finalize(DexBody body,
DexlibAbstractInstruction successor)
Finalize this instruction taking the successor into consideration.
|
protected SootMethodRef |
getInterfaceSootMethodRef()
Return the static SootMethodRef for the invoked method.
|
protected SootMethodRef |
getNormalSootMethodRef(MethodHandle.Kind kind)
Return the SootMethodRef for the invoked method.
|
protected SootFieldRef |
getSootFieldRef(org.jf.dexlib2.iface.reference.FieldReference mItem,
MethodHandle.Kind kind)
Return a SootFieldRef for the given data.
|
protected SootFieldRef |
getSootFieldRef(SootClass sc,
String name,
String type,
MethodHandle.Kind kind)
Return a SootFieldRef for the given data.
|
protected SootMethodRef |
getSootMethodRef(org.jf.dexlib2.iface.reference.MethodReference mItem,
MethodHandle.Kind kind)
Return a SootMethodRef for the given MethodReference dependent on the InvocationType passed in.
|
protected SootMethodRef |
getSootMethodRef(SootClass sc,
String name,
String returnType,
List<? extends CharSequence> paramTypes,
MethodHandle.Kind kind)
Return a SootMethodRef for the given data.
|
protected SootMethodRef |
getStaticSootMethodRef()
Return the static SootMethodRef for the invoked method.
|
protected List<Integer> |
getUsedRegistersNums()
Return the indices used in this instruction.
|
protected SootMethodRef |
getVirtualSootMethodRef()
Return the virtual SootMethodRef for the invoked method.
|
Set<Type> |
introducedTypes()
Return the types that are be introduced by this instruction.
|
protected boolean |
isUsedAsFloatingPoint(DexBody body,
int register,
boolean isStatic)
Determine if register is used as floating point.
|
protected boolean |
isUsedAsObject(DexBody body,
int register,
boolean isStatic)
Determine if register is used as object.
|
protected void |
jimplifyInterface(DexBody body)
Executes the "jimplify" operation for an interface invocation
|
protected void |
jimplifySpecial(DexBody body)
Executes the "jimplify" operation for a special invocation
|
protected void |
jimplifyStatic(DexBody body)
Executes the "jimplify" operation for a static invocation
|
protected void |
jimplifyVirtual(DexBody body)
Executes the "jimplify" operation for a virtual invocation
|
addTags, getInstruction, getLineNumber, getUnit, getUsedRegistersNums, getUsedRegistersNums, jimplify, setLineNumber, setUnit
protected InvokeExpr invocation
protected AssignStmt assign
public MethodInvocationInstruction(org.jf.dexlib2.iface.instruction.Instruction instruction, int codeAddress)
public void finalize(DexBody body, DexlibAbstractInstruction successor)
DanglingInstruction
finalize
in interface DanglingInstruction
body
- to finalize intosuccessor
- the direct successor of this instructionpublic Set<Type> introducedTypes()
DexlibAbstractInstruction
introducedTypes
in class DexlibAbstractInstruction
protected boolean isUsedAsFloatingPoint(DexBody body, int register, boolean isStatic)
isStatic
- if this method is staticprotected boolean isUsedAsObject(DexBody body, int register, boolean isStatic)
isStatic
- if this method is staticprotected SootMethodRef getVirtualSootMethodRef()
protected SootMethodRef getStaticSootMethodRef()
protected SootMethodRef getInterfaceSootMethodRef()
protected SootMethodRef getNormalSootMethodRef(MethodHandle.Kind kind)
kind
- The type of the invocation in terms of MethodHandle.Kindprotected SootMethodRef getSootMethodRef(org.jf.dexlib2.iface.reference.MethodReference mItem, MethodHandle.Kind kind)
mItem
- The MethodReference included in the invoke instructionkind
- The type of the invocation in terms of MethodHandle.Kindprotected SootMethodRef getSootMethodRef(SootClass sc, String name, String returnType, List<? extends CharSequence> paramTypes, MethodHandle.Kind kind)
sc
- The SootClass that the method is declared inname
- The name of the method being invokedreturnType
- The return type of the method being invokedparamTypes
- The parameter types of the method being invokedkind
- The type of the invocation in terms of MethodHandle.Kindprotected SootFieldRef getSootFieldRef(org.jf.dexlib2.iface.reference.FieldReference mItem, MethodHandle.Kind kind)
mItem
- The FieldReference included in the invoke instructionkind
- The type of the field access in terms of MethodHandle.Kindprotected SootFieldRef getSootFieldRef(SootClass sc, String name, String type, MethodHandle.Kind kind)
sc
- The SootClass that the field is declared inname
- The name of the fieldtype
- The type of the fieldkind
- The type of the field access in terms of MethodHandle.Kindprotected List<Type> convertParameterTypes(List<? extends CharSequence> paramTypes)
paramTypes
- The dex parameter typesprotected SootClass convertClassName(String name, MethodHandle.Kind kind)
name
- The dex string representation of the classkind
- The MethodHandle.Kind of the MethodHandle this class is coming fromprotected List<Local> buildParameters(DexBody body, List<? extends CharSequence> paramTypes, boolean isStatic)
body
- the body to build for and intoparamTypes
- the parameter types as stringsisStatic
- if the method is staticprotected List<Integer> getUsedRegistersNums()
protected void jimplifyVirtual(DexBody body)
protected void jimplifyInterface(DexBody body)
protected void jimplifySpecial(DexBody body)
protected void jimplifyStatic(DexBody body)
Copyright © 2021 Soot OSS. All rights reserved.