This package contains types used to publicly access and manipulate JEB's DEX Decompiler (referred to as dexdec) Intermediate Representation (IR) objects. Users can use this API to write custom IR optimizers, that will be run by dexdec when decompiling code. Interfaces and classes/enums in this package start with ID... or D..., respectively -- for "(Interface) dexdec" (or dex/dalvik)). Exception classes are named DexDec...Exception.

Design note: Note the symmetry with JEB's Generic Decompiler (gendec) naming conventions, whose public interfaces and types start with IE... or E.... That symmetry does not extend to naming only: dexdec IR type structure closely mirror, whenever possible, gendec's.

dexdec IR optimizer plugins may be written in Python or Java.

A sample skeleton plugin, in Python:

 # file:
 from import AbstractDOptimizer
 class DexDecIRPluginSample(AbstractDOptimizer):
   def perform(self):
     # do not perform optimizations, simply print out each IR instruction of the current IR CFG
     for blk in self.cfg:  # BasicBlock (of IDInstruction)
       for insn in blk:  # IDInstruction"%04X: %s" % (insn.getOffset(), insn))
     # no optimization performed
     return 0

The same sample plugin, in Java:

 # file:
 public class DexDecIRPluginSample extends AbstractDOptimizer {
     // note: implicit no-arg constructor is calling super()
     public int perform() {
         // do not perform optimizations, simply print out each IR instruction of the current IR CFG
         for(BasicBlock<IDInstruction> b: cfg) {
             for(IDInstruction insn: b) {
       "%04X: %s", insn.getOffset(), insn);
         // no optimization performed
         return 0;
Refer to the sub-directory coreplugins/, located in the JEB installation folder, for examples. Additional resources: refer to the User Manual and Technical Blogs, at


IDArrayElt dexdec IR array element. 
IDCallInfo dexdec IR invocation information used by invoke instructions
IDElement Base interface for all dexdec IR elements. 
IDEmulatorHooks An interface for user-defined hooks called by dexdec's IR emulator when executing internal (in DEX) code. 
IDExceptionHandler dexdec exception handler definition. 
IDExceptionItem dexdec exception item definition. 
IDExpression Base interface for all dexdec IR expressions, such as IR instructions, fields/attributes, immediates, variables/identifiers, operations, etc. 
IDField dexdec IR generic interface for field elements, that is, static fields and instance fields. 
IDGlobalContext dexdec IR global context. 
IDImm This dual-purpose dexdec IR element serves to encode immediate values (primitives and pooled strings) and evaluated values (primitives and objects). 
IDIndex dexdec IR interface for objects representing a pool index (e.g. 
IDInstanceField dexdec IR instance field. 
IDInstruction dexdec IR instruction object. 
IDInvokeInfo dexdec IR generic interface holding invocation information for IDCallInfo, IDNewInfo, IDNewArrayInfo
IDMasterOptimizer A manager of IR optimizers
IDMethodContext dexdec IR method context. 
IDMethodExecutionHelper Method execution helper interface, to be registered with a {@dexdec } IR state
IDNewArrayInfo dexdec IR element holding new array creation information. 
IDNewInfo dexdec IR new (alloc+init) information used by invoke instructions
IDOperation dexdec IR operation expression. 
IDOptimizer Plugin interface for dexdec (DEX decompiler) IR optimizer plugins. 
IDPredicate Special operation typed as boolean and used as conditions for IR_JCOND instructions. 
IDReferenceType dexdec IR reference type object. 
IDSandboxHooks An interface for user-defined hooks called by dexdec's IR sandbox when executing external (not in DEX) code. 
IDState dexdec IR state (referred as "State"), used to perform IR evaluations, emulation and sandboxing. 
IDStaticField dexdec IR static field, including a type's class pseudo-attribute. 
IDSwitchData dexdec IR switch data, used to specify the case and target values of a high-level switch instruction
IDTarget dexdec IR target information, containing an intra-method IR offset. 
IDTryData dexdec exception handling information, optionally provided by an IR method context
IDVar dexdec IR interface used to represent a variable (identifier). 
IDVisitor Specialized tree node visitor interface for dexdec IR expressions


AbstractDOptimizer Base class for dexdec (DEX decompiler) IR optimizer plugins. 
DCopyOptions IR element copy() options. 
DExecutionParameters dexdec IR emulation parameters object. 
DFormattingContext dexdec IR formatting context, providing an output sink and specifications for the output. 
DTreeVisitResults Visit result object, provided to the call-back methods of a dexdec IR visitor object. 
DUtil dexdec IR access and manipulation utility methods. 


DInvokeType dexdec IR types of invocation, used to specify IDCallInfo
DOpcodeType This enumeration defines the opcode types of the intermediate representation (IR) instructions used by dexdec
DOptimizerType dexdec IR optimizer type. 


DexDecConversionException A Dalvik-to-IR conversion exception. 
DexDecEvalCodeThrownException Those objects are used to wrap throwables raised by the emulated code. 
DexDecEvalItercountExceededException The emulation is taking too long (maximum iteration count exceeded). 
DexDecEvalSandboxExecutionException An error occurred while executing code in the emulator-controlled sandbox. 
DexDecEvalTimeoutExceededException The emulation is taking too long (timeout exceeded). 
DexDecEvaluationException This exception and its sub-types are throw by the State components and evaluate methods.