Package soot.dexpler.instructions
Class DexlibAbstractInstruction
- java.lang.Object
-
- soot.dexpler.instructions.DexlibAbstractInstruction
-
- Direct Known Subclasses:
AgetInstruction,ArrayLengthInstruction,CheckCastInstruction,ConstClassInstruction,ConstInstruction,ConstStringInstruction,FieldInstruction,FilledArrayInstruction,InstanceOfInstruction,JumpInstruction,MethodInvocationInstruction,MonitorEnterInstruction,MonitorExitInstruction,MoveExceptionInstruction,MoveInstruction,MoveResultInstruction,NewArrayInstruction,NewInstanceInstruction,NopInstruction,PseudoInstruction,ReturnInstruction,ReturnVoidInstruction,TaggedInstruction,ThrowInstruction
public abstract class DexlibAbstractInstruction extends Object
This class represents a wrapper around dexlib instruction.
-
-
Field Summary
Fields Modifier and Type Field Description protected intcodeAddressprotected org.jf.dexlib2.iface.instruction.Instructioninstructionprotected intlineNumberprotected Unitunit
-
Constructor Summary
Constructors Constructor Description DexlibAbstractInstruction(org.jf.dexlib2.iface.instruction.Instruction instruction, int codeAddress)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddTags(Host host)Tag the passed host with: - this instructions line number (if one is set) - the original bytecode offsetorg.jf.dexlib2.iface.instruction.InstructiongetInstruction()intgetLineNumber()UnitgetUnit()protected List<Integer>getUsedRegistersNums(org.jf.dexlib2.iface.instruction.FiveRegisterInstruction instruction)Return the indices used in the given instruction.protected List<Integer>getUsedRegistersNums(org.jf.dexlib2.iface.instruction.RegisterRangeInstruction instruction)Return the indices used in the given instruction.Set<Type>introducedTypes()Return the types that are be introduced by this instruction.abstract voidjimplify(DexBody body)Jimplify this instruction.voidsetLineNumber(int lineNumber)protected voidsetUnit(Unit u)Set the Jimple Unit, that comprises this instruction.
-
-
-
Field Detail
-
lineNumber
protected int lineNumber
-
instruction
protected final org.jf.dexlib2.iface.instruction.Instruction instruction
-
codeAddress
protected final int codeAddress
-
unit
protected Unit unit
-
-
Method Detail
-
getInstruction
public org.jf.dexlib2.iface.instruction.Instruction getInstruction()
-
jimplify
public abstract void jimplify(DexBody body)
Jimplify this instruction.- Parameters:
body- to jimplify into.
-
introducedTypes
public Set<Type> introducedTypes()
Return the types that are be introduced by this instruction. Instructions that may introduce types should override this.
-
getLineNumber
public int getLineNumber()
-
setLineNumber
public void setLineNumber(int lineNumber)
-
addTags
protected void addTags(Host host)
Tag the passed host with: - this instructions line number (if one is set) - the original bytecode offset- Parameters:
host- the host to tag
-
getUnit
public Unit getUnit()
-
setUnit
protected void setUnit(Unit u)
Set the Jimple Unit, that comprises this instruction. Does not override already set units.
-
getUsedRegistersNums
protected List<Integer> getUsedRegistersNums(org.jf.dexlib2.iface.instruction.RegisterRangeInstruction instruction)
Return the indices used in the given instruction.- Parameters:
instruction- a range invocation instruction- Returns:
- a list of register indices
-
-