Interface IDVar
- All Superinterfaces:
Comparable<IDVar>,IDElement,IDExpression,IInstructionOperand
dexdec IR interface used to represent a variable (a.k.a. an identifier). Variables are
factory-created by an IR context. Within a context, two variables with
the same id are the same object.
Variables may be single-slot (encoded using a single register) or double-slot (encoded using a pair of registers).
Examples:
int x = 1;
^ // single-slot register
long y = 2L;
^ // double-slot register
-
Field Summary
Fields inherited from interface com.pnfsoftware.jeb.core.units.code.android.ir.IDElement
DEFAULT_COMPARE_WITH_FULL_EQUALITY -
Method Summary
Modifier and TypeMethodDescriptionPseudo-duplication.intgetId()Get this variable id.Retrieve the preferred name of this identifier, if there is one.voidsetPreferredName(String name) Set the optional preferred name of this identifier.booleanDetermine whether this variable uses two slots (registers).booleanDetermine whether this variable uses one slot (register) only.Methods inherited from interface java.lang.Comparable
compareToMethods 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.IInstructionOperand
format
-
Method Details
-
getId
int getId()Get this variable id.- Returns:
-
usesSingleRegister
boolean usesSingleRegister()Determine whether this variable uses one slot (register) only.- Returns:
-
usesPairOfRegisters
boolean usesPairOfRegisters()Determine whether this variable uses two slots (registers).- Returns:
-
getPreferredName
String getPreferredName()Retrieve the preferred name of this identifier, if there is one. Typically, the preferred is set to the debug name, if one is provided.- Returns:
- preferred name, may be null (in which case, a name would be auto-generated)
-
setPreferredName
Set the optional preferred name of this identifier.- Parameters:
name- optional preferred name
-
duplicate
IDVar duplicate()Pseudo-duplication. For variables, this method returnsthis.- Specified by:
duplicatein interfaceIDElement- Specified by:
duplicatein interfaceIDExpression- Returns:
- a deep copy of this element; the type of the duplicated element should be the same as this element's type
-