# Interface: com.pnfsoftware.jeb.core.units.code.android.ir.IDMasterOptimizerInstrumenter

Instrumenter interface for IR [master optimizer](IDMasterOptimizer) \(MO\). An instrumenter is used to examine and guide the optimization process of a method IR.

## Method: afterFailedPass
- parameter: `opt`, type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDOptimizer`
- parameter: `ctx`, type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDMethodContext`
- parameter: `ex`, type: `java.lang.Exception`
- return type: `int`

Description: This method is called by the MO after a method\-optimizer failed.
parameter: opt: the method optimizer
parameter: ctx: the IR context
parameter: ex: the exception that was thrown by the optimizer
return: 0=no control code, let a subsequent instrumenter decide; \-1=stop the entire         optimization process

## Method: afterPass
- parameter: `opt`, type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDOptimizer`
- parameter: `ctx`, type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDMethodContext`
- parameter: `optcnt`, type: `int`
- return type: `int`

Description: This method is called by the MO after a method\-optimizer successfully returned.
parameter: opt: the method optimizer
parameter: ctx: the IR context
parameter: optcnt: the number of optimizations performed; may be 0
return: 0=no control code, let a subsequent instrumenter decide; \-1=stop the entire         optimization process

## Method: beforePass
- parameter: `opt`, type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDOptimizer`
- parameter: `ctx`, type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDMethodContext`
- return type: `int`

Description: This method is called by the MO before a method\-optimizer is about to be executed.
parameter: opt: the method optimizer
parameter: ctx: the IR context
return: 0=no control code, let a subsequent instrumenter decide; \-1=stop the entire         optimization process; 1=skip this optimizer

