Types used to manipulate dexdec-generated (Dex decompiler) Java Abstract Syntax Tree
(AST) objects. dexdec returns Java units built upon the interfaces defined in this package. Users can use this API to write
custom AST optimizers, that will be run by dexdec in later phases of code decompilation.
Interfaces and classes/enums in this package start with IJava... or J...,
respectively.
dexdec AST optimizer plugins may be written in Python or Java.
A sample skeleton plugin, in Python:
#?type=dexdec-ast
from com.pnfsoftware.jeb.core.units.code.java import AbstractJOptimizer
class JOptSamplePython(AbstractJOptimizer):
def perform(self):
return 0 # no optimization is performed
The same sample plugin, in Java:
//?type=dexdec-ast
import com.pnfsoftware.jeb.core.units.code.java.AbstractJOptimizer;
public class JOptSampleJava extends AbstractJOptimizer {
// note: implicit no-arg constructor is calling super()
@Override
public int perform() {
// no optimization performed
return 0;
}
}
Refer to the sub-directory coreplugins/, located in the JEB installation folder, for
examples.