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

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](AbstractDOptimizer) instead.

## 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: INLINER
Type: `java.lang.String`

Constant value: `inliner`
Description: A well\-known optimizer tag used to indicate that an optimizer inlines method invocations.

## Static 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 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.

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

Description: Retrieve the plugin name. Should be consistent with the value returned by `getPluginInformation().getName()`.
return: 

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

Description: Get the optimizer priority. A higher value means a higher priority. Priorities are used by [optimizer orchestrators](IDMasterOptimizer) to determine in which order optimizers should be executed.
return: the default priority

## 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.android.ir.DOptimizerType`

Description: Get the optimizer type. Types are used by [optimizer orchestrators](IDMasterOptimizer) to determine whether an optimizer should run.
return: 

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

Description: Determine whether this optimizer performs on a single method or an a collection of methods.
return: 

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

Description: Determine whether the optimizer is enabled or not. This method is used by [optimizer orchestrators](IDMasterOptimizer) to determine whether an optimizer can be scheduled for execution.
return: true if this optimizer is enabled

## 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](IDMasterOptimizer), [#isCollectionOptimizer()](#isCollectionOptimizer()) must return `false`.
parameter: ctx: a method context
return: number of optimizations performed

## 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](IDMasterOptimizer), [#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

