public interface

IDOptimizer

implements IPlugin
com.pnfsoftware.jeb.core.units.code.android.ir.IDOptimizer
Known Indirect Subclasses

Class Overview

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 instead.

Summary

Constants
String DEOBFUSCATOR A well-known optimizer tag used to indicate that an optimizer is categorized as an explicit deobfuscator.
Public Methods
abstract String getName()
Retrieve the plugin name.
abstract double getPriority()
Get the optimizer priority.
abstract Set<String> getTags()
Get the optimizer tags.
abstract DOptimizerType getType()
Get the optimizer type.
abstract boolean isCollectionOptimizer()
Determine whether this optimizer performs on a single method or an a collection of methods.
abstract boolean isEnabled()
Determine whether the optimizer is enabled or not.
abstract int perform(IDMethodContext ctx)
Run the optimizer on the provided target method.
abstract int performOnCollection(List<IDMethodContext> ctxlist)
Run the optimizer on the provided collection of methods.
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.IPlugin

Constants

public static final String DEOBFUSCATOR

A well-known optimizer tag used to indicate that an optimizer is categorized as an explicit deobfuscator.

Constant Value: "deobfuscator"

Public Methods

public abstract String getName ()

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

public abstract double getPriority ()

Get the optimizer priority. A higher value means a higher priority. Priorities are used by optimizer orchestrators to determine in which order optimizers should be executed.

Returns
  • the default priority

public abstract Set<String> getTags ()

Get the optimizer tags. An optimizer may have 0, 1, or more tags. A tag is a non-null, non-empty string.

Returns
  • a collection of tags; may be empty (tags are optional), but never null

public abstract DOptimizerType getType ()

Get the optimizer type. Types are used by optimizer orchestrators to determine whether an optimizer should run.

public abstract boolean isCollectionOptimizer ()

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

public abstract boolean isEnabled ()

Determine whether the optimizer is enabled or not. This method is used by optimizer orchestrators to determine whether an optimizer can be scheduled for execution.

Returns
  • true if this optimizer is enabled

public abstract int perform (IDMethodContext ctx)

Run the optimizer on the provided target method.

For this method to be called by an orchestrator, isCollectionOptimizer() must return false.

Parameters
ctx a method context
Returns
  • number of optimizations performed

public abstract int performOnCollection (List<IDMethodContext> ctxlist)

Run the optimizer on the provided collection of methods.

For this method to be called by an orchestrator, isCollectionOptimizer() must return true.

Parameters
ctxlist a collection of method contexts
Returns
  • number of optimizations performed