java.lang.Object | |||
↳ | com.pnfsoftware.jeb.core.AbstractPlugin | ||
↳ | com.pnfsoftware.jeb.core.units.code.java.AbstractJOptimizer | ||
↳ | com.pnfsoftware.jeb.core.units.code.java.AbstractJBlockOptimizer |
A specialized skeleton implementation for a method
AST optimizer meant to run
on every block
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AbstractJBlockOptimizer()
Create a standard optimizer.
| |||||||||||
AbstractJBlockOptimizer(JOptimizerType type)
Create an optimizer.
| |||||||||||
AbstractJBlockOptimizer(JOptimizerType type, String name)
Create an optimizer.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract int |
optimizeBlock(IJavaBlock b, IJavaElement parent)
Optimize a block of AST code.
| ||||||||||
int |
perform()
The default implementation calls
performInternal(IJavaBlock, IJavaElement) on the
input AST method, if the element to be optimized is a method. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int |
performInternal(IJavaBlock b, IJavaElement parent)
The default implementation calls
optimizeBlock(IJavaBlock, IJavaElement) on all
blocks 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 a block of AST code. Optimizers must implement this method.
b | block to be optimized |
---|---|
parent | the parent element of the block to be optimized |
The default implementation calls performInternal(IJavaBlock, IJavaElement)
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 optimizeBlock(IJavaBlock, IJavaElement)
on all
blocks of the AST method to be optimized. The method tree is visited in depth, blocks are
optimized post-visit.
It may be overridden, although it is not recommended.
b | the current block to optimize |
---|---|
parent | the parent of the block to be optimized( |