Class InstructionFactory


  • public class InstructionFactory
    extends Object
    Factory that returns an appropriate Instruction instances for given dexlib instructions and opcodes.
    • Constructor Detail

      • InstructionFactory

        public InstructionFactory()
    • Method Detail

      • fromInstruction

        public static DexlibAbstractInstruction fromInstruction​(org.jf.dexlib2.iface.instruction.Instruction instruction,
                                                                int codeAddress)
        Resolve an Instruction from a dexlib instruction.
        Parameters:
        instruction - the corresponding dexlib instruction
        codeAddress - the byte code address of the instruction
      • fromOpcode

        public static DexlibAbstractInstruction fromOpcode​(org.jf.dexlib2.Opcode op,
                                                           org.jf.dexlib2.iface.instruction.Instruction instruction,
                                                           int codeAddress)
        Resolve an Instruction from an dex opcode.
        Parameters:
        op - the opcode of the instruction
        instruction - the corresponding dexlib instruction
        codeAddress - the byte code address of the instruction