# Class: com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractOptimizer

Skeleton for a generic artifact optimizer.

## Constructor: AbstractOptimizer

Description: Create an optimizer.

## Constructor: AbstractOptimizer
- parameter: `target`, type: `T`

Description: Create an optimizer.
parameter: target: optional optimization target

## Static Field: logger
Type: `com.pnfsoftware.jeb.util.logging.ILogger`
Description: Public logger accessible by the implementing optimizer. Writing to the logger should be favored over writing directly to `stdout`.

## Protected Method: addTag
- parameter: `tag`, type: `java.lang.String`


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


## Method: getName
- return type: `java.lang.String`

Description: Retrieve the optimizer name.
return: optimizer name

## Method: getPluginInformation
- return type: `com.pnfsoftware.jeb.core.EditablePluginInformation`


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


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

Description: The standard implementation provides a [standard priority of 0](IOptimizer#PRIORITY_STANDARD).

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


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


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


## Protected Method: removeTag
- parameter: `tag`, type: `java.lang.String`


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


## Protected Method: setName
- parameter: `name`, type: `java.lang.String`


## Protected Method: setPreferredExecutionStage
- parameter: `preferredExecStage`, type: `int`

Description: Use only for type [OptimizerType#ON_DEMAND](OptimizerType#ON_DEMAND). Disregarded for other types. Leave to 0 for pure on\-demand.
parameter: preferredExecStage: id such that abs\(id\) is in \[1, 99\] ; use positive value for            post\-stage execution, negative value for pre\-stage execution

## Protected Method: setPriority
- parameter: `priority`, type: `double`

Description: Set the optimizer priority. To be used by the constructor.
parameter: priority: the new priority \(high means higher priority\). When optimizers are managed            and run by an orchestrator, the optimizers with a higher priority are run before            those having a lower priority. The default priority is 0.

## Protected Method: setRequiredModeThreshold
- parameter: `threshold`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.OptimizerMode`

Description: Set the threshold. The default value is [OptimizerMode#NORMAL](OptimizerMode#NORMAL).
parameter: threshold: minimum optimizer mode required to run this optimizer

## Protected Method: setType
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.OptimizerType`

Description: Set the type of optimizer. The default is [OptimizerType#NORMAL](OptimizerType#NORMAL). Optimizers with a type [OptimizerType#ON_DEMAND](OptimizerType#ON_DEMAND) must also set their [preferred execution stage](#setPreferredExecutionStage(int)) \(else they will never run\).
parameter: type: optimizer type, or null for [OptimizerType#NORMAL](OptimizerType#NORMAL)

