public final enum

DOpcodeType

extends Enum<E extends Enum<E>>
java.lang.Object
   ↳ java.lang.Enum<E extends java.lang.Enum<E>>
     ↳ com.pnfsoftware.jeb.core.units.code.android.ir.DOpcodeType

Class Overview

This enumeration defines the opcode types of the intermediate representation (IR) instructions used by dexdec. An IR instruction has two optional operands, noted opnd1 and opnd2.

Note that the IR_STORE_EXCEPTION opcode can only be the first instruction of an exception handler block. The IR_JUMP, IR_JCOND, IR_SWITCH, IR_RETURN, IR_THROW can only be the last instruction of a basic block.

See Also

Summary

Enum Values
DOpcodeType  IR_ASSIGN  Assignment. 
DOpcodeType  IR_INVOKE  General method invocation
- opnd1: null
- opnd2: an IDInvokeInfo expression (call, new, new-array, alloc-object)  
DOpcodeType  IR_JCOND  Conditional jump
- opnd1: the IDTarget, branched to if the conditional expression is true
- opnd2: the conditional expression, IDPredicate  
DOpcodeType  IR_JUMP  Unconditional jump
- opnd1: the IDTarget
- opnd2: null  
DOpcodeType  IR_MONITOR_ENTER  Notify the beginning of a synchronized block of code. 
DOpcodeType  IR_MONITOR_EXIT  Notify the end of a synchronized block of code. 
DOpcodeType  IR_NOP  No-operation instruction
- opnd1: null
- opnd2: null  
DOpcodeType  IR_RETURN  Method return
- opnd1: null
- opnd2: optional IDExpression return value (may be null)  
DOpcodeType  IR_STORE_EXCEPTION  Store a caught typed exception to a variable
Very restrictive opcode, to be used only at the beginning of exception handlers blocks. 
DOpcodeType  IR_SWITCH  Switch (n-way conditional jump)
- opnd1: the IDSwitchData
- opnd2: the switched-on IDExpression  
DOpcodeType  IR_THROW  Raise an error or exception
- opnd1: null
- opnd2: non-null throwable, an IDExpression (should be typed as java.lang.Throwable or any of its sub-types)  
Public Methods
final int indexOf(DOpcodeType... candidates)
Determine whether this opcode matches one of the provided candidate opcodes.
final boolean isAnyOf(DOpcodeType... candidates)
Determine whether this opcode matches one of the provided candidate opcodes.
static DOpcodeType valueOf(String name)
final static DOpcodeType[] values()
[Expand]
Inherited Methods
From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum Values

public static final DOpcodeType IR_ASSIGN

Assignment.
- opnd1: destination (left) member, IDExpression
- opnd2: source (right) member, IDExpression

public static final DOpcodeType IR_INVOKE

General method invocation
- opnd1: null
- opnd2: an IDInvokeInfo expression (call, new, new-array, alloc-object)

public static final DOpcodeType IR_JCOND

Conditional jump
- opnd1: the IDTarget, branched to if the conditional expression is true
- opnd2: the conditional expression, IDPredicate

public static final DOpcodeType IR_JUMP

Unconditional jump
- opnd1: the IDTarget
- opnd2: null

public static final DOpcodeType IR_MONITOR_ENTER

Notify the beginning of a synchronized block of code.
Ideally, should not be translated to opcodes: instead the structurer should combine these opcodes with try-catch block to build synchronized code blocks.
However, if this is not possible, invalid statements (similar to 'goto') should be issued.
- opnd1: null
- opnd2: the lock object IDExpression

public static final DOpcodeType IR_MONITOR_EXIT

Notify the end of a synchronized block of code.
Ideally, should not be translated to opcodes: instead the structurer should combine these opcodes with try-catch block to build synchronized code blocks.
However, if this is not possible, invalid statements (similar to 'goto') should be issued.
- opnd1: null
- opnd2: the lock object IDExpression

public static final DOpcodeType IR_NOP

No-operation instruction
- opnd1: null
- opnd2: null

public static final DOpcodeType IR_RETURN

Method return
- opnd1: null
- opnd2: optional IDExpression return value (may be null)

public static final DOpcodeType IR_STORE_EXCEPTION

Store a caught typed exception to a variable
Very restrictive opcode, to be used only at the beginning of exception handlers blocks. (equivalent to Dalvik's move-exception.)
- opnd1: IDVar
- opnd2: null

public static final DOpcodeType IR_SWITCH

Switch (n-way conditional jump)
- opnd1: the IDSwitchData
- opnd2: the switched-on IDExpression

public static final DOpcodeType IR_THROW

Raise an error or exception
- opnd1: null
- opnd2: non-null throwable, an IDExpression (should be typed as java.lang.Throwable or any of its sub-types)

Public Methods

public final int indexOf (DOpcodeType... candidates)

Determine whether this opcode matches one of the provided candidate opcodes.

Parameters
candidates candidate opcodes
Returns
  • an index, -1 if not found

public final boolean isAnyOf (DOpcodeType... candidates)

Determine whether this opcode matches one of the provided candidate opcodes.

Parameters
candidates candidate opcodes

public static DOpcodeType valueOf (String name)

public static final DOpcodeType[] values ()