# Interface: com.pnfsoftware.jeb.core.units.code.android.ir.IDOptimizer
- Super interfaces: `com.pnfsoftware.jeb.core.IPlugin`

Plugin interface for `dexdec` \(DEX decompiler\) IR optimizer plugins. They are used to  optimize a method's IR or a collection of methods IRs.  

  Implementors should not implement this interface directly: extend [AbstractDOptimizer](com.pnfsoftware.jeb.core.units.code.android.ir.AbstractDOptimizer.md)  instead.

## Static Final 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 Final Field: INLINER
Type: `java.lang.String`

Constant value: `inliner`
Description: A well\-known optimizer tag used to indicate that an optimizer inlines method invocations.

## Static Final Field: REORDERER
Type: `java.lang.String`

Constant value: `reorderer`
Description: A well\-known optimizer tag indicating that this optimizer, as part of its work, reorders the  graph's nodes into a more natural way, better suitable for AST generation. That process is  also called "layouting". Note that such optimizers may report no\-optimizations performed but  still have reordered the graph.

## Static Final Field: SLOW
Type: `java.lang.String`

Constant value: `slow`
Description: A well\-known optimizer tag used to indicate that an optimizer is likely to perform slowly on  large graphs.

## Abstract Method: getName
- return type: `java.lang.String`

Description: Retrieve the plugin name. Should be consistent with the value returned by  `getPluginInformation().getName()`.
return: optimizer name

## Abstract Method: getPriority
- return type: `double`

Description: Get the optimizer priority. A higher value means a higher priority. Priorities are used by  [optimizer orchestrators](com.pnfsoftware.jeb.core.units.code.android.ir.IDMasterOptimizer.md) to determine in which order optimizers  should be executed.
return: the default priority

## Abstract 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

## Abstract Method: getType
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.DOptimizerType`

Description: Get the optimizer type. Types are used by [optimizer orchestrators](com.pnfsoftware.jeb.core.units.code.android.ir.IDMasterOptimizer.md)  to determine whether an optimizer should run.
return: optimizer type

## Abstract Method: isCollectionOptimizer
- return type: `boolean`

Description: Determine whether this optimizer performs on a single method or an a collection of methods.
return: true for collection optimizers, false for single\-method optimizers

## Abstract Method: isEnabled
- return type: `boolean`

Description: Determine whether the optimizer is enabled or not. This method is used by  [optimizer orchestrators](com.pnfsoftware.jeb.core.units.code.android.ir.IDMasterOptimizer.md) to determine whether an optimizer can be  scheduled for execution.
return: true if this optimizer is enabled

## Abstract Method: perform
- parameter: `ctx`, type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDMethodContext`
- return type: `int`

Description: Run the optimizer on the provided target method.  

  For this method to be called by an [orchestrator](com.pnfsoftware.jeb.core.units.code.android.ir.IDMasterOptimizer.md),  [#isCollectionOptimizer()](#isCollectionOptimizer()) must return `false`.
parameter: ctx: a method context
return: number of optimizations performed

## Abstract Method: performOnCollection
- parameter: `ctxlist`, type: `java.util.List<com.pnfsoftware.jeb.core.units.code.android.ir.IDMethodContext>`
- parameter: `pmcntmap`, type: `java.util.Map<com.pnfsoftware.jeb.core.units.code.android.ir.IDMethodContext,java.lang.Integer>`
- return type: `int`

Description: Run the optimizer on the provided collection of methods.  

  For this method to be called by an [orchestrator](com.pnfsoftware.jeb.core.units.code.android.ir.IDMasterOptimizer.md),  [#isCollectionOptimizer()](#isCollectionOptimizer()) must return `true`.
parameter: ctxlist: a collection of method contexts
parameter: pmcntmap: optional output map that will receive the per\-method optimization counts
return: number of optimizations performed

