Interface IDCallInfo
- All Superinterfaces:
IDElement,IDExpression,IDInvokeInfo,IInstructionOperand
- All Known Subinterfaces:
IDNewInfo
dexdec IR invocation information used by invoke
instructions to represent calls to methods.
Example:
result = ob.foo(1, "blah");
^^^^^^^^^^^^^^^^^
Also refer to the specialized sub-interface IDNewInfo, to represent high-level
"new-object" construction (= object allocation, followed by object
initialization).
-
Field Summary
Fields inherited from interface com.pnfsoftware.jeb.core.units.code.android.ir.IDElement
DEFAULT_COMPARE_WITH_FULL_EQUALITY -
Method Summary
Modifier and TypeMethodDescriptionDuplicate this element.getArgument(int index) Retrieve a method's argument.intGet the number of arguments.Get the invocation type.Convenience method to retrieve the target method simplename.Get the target method internal signature.booleanhasThis()Determine whether the first argument of this method should be the object'sthis.voidsetArgument(int i, IDExpression arg) Update a method argument.voidupgradeMistypedArguments(DTypeInfo ti, IDGlobalContext gctx) Apply types on the method parameters.Methods inherited from interface com.pnfsoftware.jeb.core.units.code.android.ir.IDElement
equalsEx, format, toString, toStringMethods inherited from interface com.pnfsoftware.jeb.core.units.code.android.ir.IDExpression
asArrayElt, asCallInfo, asImm, asInstanceField, asInstruction, asNewArrayInfo, asNewInfo, asOperation, asReferenceType, asStaticField, asVar, canThrow, checkType, collectAllPhysicalMethodIndices, collectAllPhysicalOffsets, collectSubExpressions, collectVarIds, copy, countVariable, evaluate, evaluate, evaluate, find, findByType, findByType, findParent, findParent, generateAST, getCustomCanThrow, getData, getOrigin, getPhysicalMethodIndex, getPhysicalOffset, getSubExpressions, getType, getVarIds, hasSideEffects, isArrayElt, isCallInfo, isCallInfo, isCastOperation, isCastOperation, isConstantImm, isConstantImm, isImm, isInstanceField, isInstruction, isNewArrayInfo, isNewInfo, isOperation, isOperation, isOperation, isOperation, isOperation, isOperation, isOperation, isReferenceType, isStaticField, isStringImm, isVar, isVar, removeData, replaceSubExpression, replaceVariable, setCustomCanThrow, setData, setOrigin, setPhysicalMethodIndex, setPhysicalOffset, setType, setType, setType, spawn, transferMetadataFrom, updateAllPhysicalMethodIndices, updateAllPhysicalOffsets, updateTypes, visitDepthPost, visitDepthPost, visitDepthPost, visitDepthPre, visitDepthPre, visitDepthPreMethods inherited from interface com.pnfsoftware.jeb.core.units.code.android.ir.IDInvokeInfo
getArgumentsMethods inherited from interface com.pnfsoftware.jeb.core.units.code.IInstructionOperand
format
-
Method Details
-
getMethodSignature
String getMethodSignature()Get the target method internal signature.- Returns:
- an internal sinature, e.g.
Lcom/abc/Foo;->bar(I)V
-
getMethodName
String getMethodName()Convenience method to retrieve the target method simplename.- Returns:
- the simple name, e.g.
barfor a methodLcom/abc/Foo;->bar(I)V
-
getCountOfArguments
int getCountOfArguments()Get the number of arguments. For non-static methods,thisis counted.- Returns:
-
hasThis
boolean hasThis()Determine whether the first argument of this method should be the object'sthis. That is, this method is a convenient way to determine whether the invocation type is eitherDInvokeType.DIRECT,DInvokeType.SUPER,DInvokeType.VIRTUAL, orDInvokeType.INTERFACE.- Returns:
-
getInvokeType
DInvokeType getInvokeType()Get the invocation type. Note that this differs slightly from the JLS or Dalvikinvoke-xxxsemantics. Refer to the enumration for details.- Returns:
-
setArgument
Update a method argument.- Parameters:
i-arg-
-
getArgument
Retrieve a method's argument.- Parameters:
index-- Returns:
-
upgradeMistypedArguments
Apply types on the method parameters.Important note: at the IR level, casts should be explicit. Implicit promotions, not requiring a cast, are reserved for AST generation.
- Parameters:
ti- optional type information object, used to record type updates and conflictsgctx- global IR context (mandatory)
-
duplicate
IDCallInfo duplicate()Description copied from interface:IDElementDuplicate this element.- Specified by:
duplicatein interfaceIDElement- Specified by:
duplicatein interfaceIDExpression- Specified by:
duplicatein interfaceIDInvokeInfo- Returns:
- a deep copy of this element; the type of the duplicated element should be the same as this element's type
-