com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IMasterOptimizer<T extends com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IOptimizerTarget> |
Known Indirect Subclasses |
Definition of a master optimizer, whose role is to manage and orchestrate the execution of individual optimizers.
Implementation note: the master optimizer may call optimizers repeatedly until no more optimizations are performed.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | DEFAULT_GROUP |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract OptimizerMode |
getMode()
Retrieve the current operating mode for this MO.
| ||||||||||
abstract int | getOptimizationCount(boolean deobfuscationOnly) | ||||||||||
abstract OptimizerEntry<T> | getOptimizer(Class<? extends IOptimizer<T>> clazz) | ||||||||||
abstract IOptimizer<T> | getOptimizerObject(Class<? extends IOptimizer<T>> clazz) | ||||||||||
abstract List<OptimizerEntry<T>> |
getRegisteredOptimizers(int groupId)
Get a copy of the lists of optimizer entries registered with this MO and belonging to the
provided optimizer group.
| ||||||||||
abstract List<OptimizerEntry<T>> |
getRegisteredOptimizers()
Get a copy of the list of optimizer entries registered with this MO.
| ||||||||||
abstract T |
getTarget()
Get the target onto which the optimizations will be performed.
| ||||||||||
abstract int | getTotalOptimizationCount() | ||||||||||
abstract int |
perform()
Perform an optimization pass.
| ||||||||||
abstract int |
performMultiple(List<OptimizerEntry<T>> list)
Run the list of optimizers, in sequence.
| ||||||||||
abstract int |
performSingle(OptimizerEntry<T> e)
Perform a single optimization, using the provided optimizer (which must have been previously
registered).
| ||||||||||
abstract void |
registerInstrumenter(IMasterOptimizerInstrumenter<T> instrumenter)
Register an instrumenter.
| ||||||||||
abstract OptimizerEntry<T> |
registerOptimizer(int group, IOptimizer<T> opt)
Register an optimizer, using the optimizer's provided default priority.
| ||||||||||
abstract OptimizerEntry<T> |
registerOptimizer(IOptimizer<T> opt)
Register an optimizer to the
main group , using the optimizer's
provided default priority. | ||||||||||
abstract OptimizerMode | setMode(OptimizerMode optimizerMode) | ||||||||||
abstract void |
setPolicyForOptimizerTag(String tag, boolean allowed)
Set the running policy associated to a tag or group of tags.
| ||||||||||
abstract void |
setTarget(T t)
Set the optimizer's target.
| ||||||||||
abstract boolean |
unregisterInstrumenter(IMasterOptimizerInstrumenter<T> instrumenter)
Unregister an instrumenter
| ||||||||||
abstract boolean |
unregisterOptimizer(OptimizerEntry<T> entry)
Remove an optimizer.
|
Retrieve the current operating mode for this MO.
Get a copy of the lists of optimizer entries registered with this MO and belonging to the provided optimizer group.
Get a copy of the list of optimizer entries registered with this MO.
Get the target onto which the optimizations will be performed.
Perform an optimization pass. All the optimizers will be run according to this master's schedule. They may be run multiple times.
Run the list of optimizers, in sequence. Each optimizer is run once.
list | a list of optimizers |
---|
Perform a single optimization, using the provided optimizer (which must have been previously registered).
e | an optimizer |
---|
Register an instrumenter. Instrumenters will be called following their registration order.
Register an optimizer, using the optimizer's provided default priority. Refer to IOptimizer#getDefaultPriority().
Register an optimizer to the main group
, using the optimizer's
provided default priority. Refer to IOptimizer#getDefaultPriority().
Set the running policy associated to a tag or group of tags. Policy checks when deciding
whether an optimizer should be run works as follow: 1) the tag must be allowed, 2) if passed,
the tag must not be blocked. By default, all tags are allowed, none are blocked. To reset to
that default policy: first invoke this method with ("*", true)
, then invoke it with
(null,
false)
.
tag | tag name; the special name "*" means all tags; the special name ""
(empty string) or null string means no tag |
---|---|
allowed | true to allow the master optimizer to run the optimizer with the specified tag; false to block it |
Set the optimizer's target.
Unregister an instrumenter