# Interface: com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IOptimizer

Plugin interface for generic code optimizer. This interface is currently used to define IR and AST optimizers used by JEB Native Analysis Pipeline components. Optimizers are managed and invoked by a [master\-optimizer](IMasterOptimizer). 

 Refer to the two specialized interfaces, [IEOptimizer](IEOptimizer) for IR codes; [ICOptimizer](ICOptimizer) for AST trees.

## Static Field: DEAD_CODE_REMOVER
Type: `java.lang.String`

Constant value: `dcr`
Description: A well\-known optimizer tag used to indicate that an optimizer is removing code it deems useless or dead.

## Static Field: DEOBFUSCATOR
Type: `java.lang.String`

Constant value: `deobfuscator`
Description: A well\-known optimizer tag used to indicate that an optimizer is categorized as an explicit deobfuscator.

## Static Field: PRIORITY_HIGH
Type: `double`

Constant value: `10.0`
Description: A priority value well\-suited for high\-priority optimizers.

## Static Field: PRIORITY_LOW
Type: `double`

Constant value: `-10.0`
Description: A priority value well\-suited for low\-priority optimizers.

## Static Field: PRIORITY_STANDARD
Type: `double`

Constant value: `0.0`
Description: A priority value well\-suited for normal\-priority optimizers.

## Method: getMasterOptimizer
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IMasterOptimizer<T>`

Description: Retrieve the optional master optimizer that manages this optimizer.
return: optional reference

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

Description: This method is used for on\-demand optimizers only.
return: the preferred execution stage

## Method: getPriority
- return type: `double`

Description: Get the optimizer priority. A higher value means higher priority. Priorities are used by [master optimizers](IMasterOptimizer) to order optimizers.
return: the optimizer priority

## Method: getRequiredModeThreshold
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.OptimizerMode`

Description: Specify the minimum bar requested from the orchestrator in order to run. If that bar is not met, the orchestrator should not run the optimizer. Refer to [AbstractMasterOptimizer](AbstractMasterOptimizer) for existing thresholds.
return: the minimum optimizer mode required to run this optimizer

## Method: getTags
- return type: `java.util.Set<java.lang.String>`

Description: Get the optimizer tags. An optimizer may have 0, 1, or more tags. A tag is a non\-null, non\-empty string.
return: a collection of tags; may be empty \(tags are optional\), but never null

## Method: getType
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.OptimizerType`

Description: Retrieve the type of this optimizer.
return: the optimizer type

## Method: performOnTarget
- parameter: `target`, type: `T`
- return type: `int`

Description: Perform the optimization pass.
parameter: target: target to optimize
return: the number of optimizations performed; if negative, an error has occurred and the         optimizing process should be aborted

## Method: setMasterOptimizer
- parameter: `mo`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IMasterOptimizer<T>`

Description: Set an optional master optimizer that manages this optimizer.
parameter: mo: optional

