Class ConditionalJumpInstruction

All Implemented Interfaces:
DeferableInstruction
Direct Known Subclasses:
IfTestInstruction, IfTestzInstruction

public abstract class ConditionalJumpInstruction extends JumpInstruction implements DeferableInstruction
  • Constructor Details

    • ConditionalJumpInstruction

      public ConditionalJumpInstruction(org.jf.dexlib2.iface.instruction.Instruction instruction, int codeAddress)
      Parameters:
      instruction - the underlying dexlib instruction
      codeAddress - the bytecode address of this instruction
  • Method Details

    • ifStatement

      protected abstract JIfStmt ifStatement(DexBody dexBody)
    • jimplify

      public void jimplify(DexBody body)
      Description copied from class: DexLibAbstractInstruction
      Jimplify this instruction.
      Specified by:
      jimplify in class DexLibAbstractInstruction
      Parameters:
      body - to jimplify into.
    • getComparisonExpr

      protected AbstractConditionExpr getComparisonExpr(DexBody body, int reg)
    • getComparisonExpr

      protected AbstractConditionExpr getComparisonExpr(Immediate one, Immediate other)
      Get comparison expression depending on opcode between two immediates
      Parameters:
      one - first immediate
      other - second immediate
      Returns:
      the conditional expression statement based on the opcode fromm the given instruction
      Throws:
      RuntimeException - if this is not a IfTest or IfTestz instruction.
    • deferredJimplify

      public void deferredJimplify(DexBody body)
      Description copied from interface: DeferableInstruction
      Jimplify this instruction with the guarantee that every other (non-deferred) instruction has been jimplified.
      Specified by:
      deferredJimplify in interface DeferableInstruction
      Parameters:
      body - to jimplify into