Interface IJOptimizer
- All Superinterfaces:
IPlugin
- All Known Implementing Classes:
AbstractJBlockOptimizer,AbstractJElementOptimizer,AbstractJOptimizer,AbstractJStatementOptimizer
Plugin interface for
dexdec (DEX decompiler) AST optimizer plugins. They are used to
optimize a class or method AST.
Implementors should not implement this interface directly: instead, extend
AbstractJOptimizer, AbstractJBlockOptimizer, or
AbstractJStatementOptimizer.
-
Method Summary
Methods inherited from interface com.pnfsoftware.jeb.core.IPlugin
dispose, getData, getPluginInformation, setData
-
Method Details
-
getName
String getName()Retrieve the plugin name. Should be consistent with the value returned bygetPluginInformation().getName().- Returns:
-
getType
JOptimizerType getType()Get the optimizer type. Types are used byoptimizer orchestratorsto determine whether an optimizer should run.- Returns:
-
getPriority
double getPriority()Get the optimizer priority. A higher value means a higher priority. Priorities are used byoptimizer orchestratorsto determine in which order optimizers should be executed.- Returns:
- the default priority
-
isEnabled
boolean isEnabled()Determine whether the optimizer is enabled or not. This method is used byoptimizer orchestratorsto determine whether an optimizer can be scheduled for execution.- Returns:
- true if this optimizer is enabled
-
perform
Run the optimizer on the provided target element (method or class).- Parameters:
elt- an AST element, such as anIJavaMethodorIJavaClass- Returns:
- number of optimizations performed
-