Class DexlibAbstractInstruction

    • 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
    • Constructor Detail

      • DexlibAbstractInstruction

        public DexlibAbstractInstruction​(org.jf.dexlib2.iface.instruction.Instruction instruction,
                                         int codeAddress)
        Parameters:
        instruction - the underlying dexlib instruction
        codeAddress - the bytecode address of this instruction
    • 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
      • getUsedRegistersNums

        protected List<Integer> getUsedRegistersNums​(org.jf.dexlib2.iface.instruction.FiveRegisterInstruction instruction)
        Return the indices used in the given instruction.
        Parameters:
        instruction - a invocation instruction
        Returns:
        a list of register indices