java.lang.Object | |||
↳ | com.pnfsoftware.jeb.core.AbstractPlugin | ||
↳ | com.pnfsoftware.jeb.core.units.code.java.AbstractJOptimizer | ||
↳ | com.pnfsoftware.jeb.core.units.code.java.AbstractJStatementOptimizer |
A specialized skeleton implementation for a method
AST optimizer meant to run
on every statement
of AST code of the method, recursively. This optimizer
may be used to optimize AST methods only, not AST classes.
Refer to the javadoc of the parent types for more information.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pnfsoftware.jeb.core.units.code.java.AbstractJOptimizer
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AbstractJStatementOptimizer()
Create a standard optimizer.
| |||||||||||
AbstractJStatementOptimizer(JOptimizerType type)
Create an optimizer.
| |||||||||||
AbstractJStatementOptimizer(JOptimizerType type, String name)
Create an optimizer.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract int |
optimizeStatement(IJavaStatement stm)
Optimize an AST statement.
| ||||||||||
int |
perform()
The default implementation calls
performInternal(IJavaBlock) on the input AST
method, if the element to be optimized is a method. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int |
performInternal(IJavaBlock b)
The default implementation calls
optimizeStatement(IJavaStatement) on all statements
of the AST method to be optimized. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pnfsoftware.jeb.core.units.code.java.AbstractJOptimizer
| |||||||||||
From class
com.pnfsoftware.jeb.core.AbstractPlugin
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.pnfsoftware.jeb.core.IPlugin
| |||||||||||
From interface
com.pnfsoftware.jeb.core.units.code.java.IJOptimizer
|
Create a standard optimizer.
Optimize an AST statement. Optimizers must implement this method.
stm | statement to be optimized |
---|
The default implementation calls performInternal(IJavaBlock)
on the input AST
method, if the element to be optimized is a method.
It may be overridden, although it is not recommended.
The default implementation calls optimizeStatement(IJavaStatement)
on all statements
of the AST method to be optimized. The method tree is visited in depth, statements are
optimized pre-visit.
It may be overridden, although it is not recommended.