# Interface: com.pnfsoftware.jeb.core.units.code.java.IJMasterOptimizer

A manager of [AST optimizers](IJOptimizer). A master optimizer \(MO\) orchestrates and executes optimizers. This class is currently not meant to be implemented by third\-party code. 

 Implementation note: the master optimizer may call optimizers repeatedly until no more optimizations are performed.

## Method: add
- parameter: `optimizer`, type: `com.pnfsoftware.jeb.core.units.code.java.IJOptimizer`
- return type: `boolean`

Description: Register an optimizer.
parameter: optimizer: 
return: 

## Method: getTarget
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaDecompilableElement`

Description: Retrieve the target AST element to be optimized.
return: 

## Method: isSafeMode
- return type: `boolean`

Description: Determine whether safe mode is enabled. In safe mode, the only optimizers that are run are those whose [type](IJOptimizer#getType()) is [JOptimizerType#NORMAL](JOptimizerType#NORMAL).
return: 

## Method: perform
- return type: `int`

Description: Perform optimizations on the [target](#getTarget()).
return: the number of optimizations performed

## Method: remove
- parameter: `optimizer`, type: `com.pnfsoftware.jeb.core.units.code.java.IJOptimizer`
- return type: `boolean`

Description: Unregister an optimizer.
parameter: optimizer: 
return: 

## Method: setSafeMode
- parameter: `enabled`, type: `boolean`

Description: Enable or disable safe mode. In safe mode, the only optimizers that are run are those whose [type](IJOptimizer#getType()) is [JOptimizerType#NORMAL](JOptimizerType#NORMAL).
parameter: enabled: 

