package

com.pnfsoftware.jeb.core.units.code.java

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.
Additional resources: refer to the User Manual and Technical Blogs, at https://www.pnfsoftware.com.

Interfaces

IDynamicContentManager A dynamic content manager is used by AST output sinks to customize the generated output. 
IJavaAnnotation Java AST interface to represent a Java annotation. 
IJavaAnnotationElement Java AST interface to represent a Java annotation element. 
IJavaArrayElt Java AST interface to represent the element of an array. 
IJavaAssignment Java AST interface to represent assignments. 
IJavaBlock Java AST interface to represent a sequence of statements
IJavaBreak Java AST interface to represent a break statement. 
IJavaCall Java AST interface to represent a method invocation. 
IJavaCatchBlock Interface to represent a catch-block used by IJavaTry AST elements. 
IJavaClass Java AST interface to represent a Java class or interface. 
IJavaClassFactory AST IJavaClass factory. 
IJavaCompound Java AST interface to represent compound statements. 
IJavaConditionalExpression Java AST interface to represent a conditional expression. 
IJavaConstant Java AST interface to represent a literal or constant value. 
IJavaConstantFactory Builder for Java AST constants. 
IJavaContinue Java AST interface to represent a continue statement. 
IJavaDecompilableElement High-level Java AST interface to represent a decompilable Java element (a class, method, or field). 
IJavaDefinition Java AST interface to represent a definition statement. 
IJavaDoWhile Java AST interface to represent a do-while loop statement. 
IJavaElement Top-level interface for all elements of a Java Abstract Syntax Tree
IJavaElementFactory A collection of Java AST element factories. 
IJavaExpression High-level interface implemented by Java AST elements representing expressions. 
IJavaField Java AST interface to represent a Java field. 
IJavaFieldFactory AST IJavaField factory. 
IJavaFor Java AST interface used to represent a standard for loop statement. 
IJavaForEach Java AST interface used to represent a for-each (Java 5+) loop statement. 
IJavaGlobalContext dexdec global context for AST generation. 
IJavaGoto Java AST interface to represent a "goto" statement. 
IJavaIdentifier Java AST interface to represent a Java identifier, or variable. 
IJavaIdentifierManager A manager of IJavaIdentifier (and IJavaDefinition). 
IJavaIf Java AST interface to represent a conditional "if" statement. 
IJavaInstanceField Java AST interface to represent an instance field. 
IJavaLabel Java AST interface to represent labels. 
IJavaLabelFactory A manager of IJavaLabel
IJavaLeftExpression High-level interface is used to represent Java AST expressions that can be assigned to, that is, expressions that can be left members in assignment statements. 
IJavaMethod Java AST interface to represent a Java method. 
IJavaMethodFactory AST IJavaMethod factory. 
IJavaMonitor Java AST interface to represent a special "monitor" statement. 
IJavaNew Java AST interface to represent the instantiation of a new non-array object. 
IJavaNewArray Java AST interface to represent the instantiation of an array object. 
IJavaOperation Java AST interface to represent arithmetic and logical expressions. 
IJavaOperator This interface is used to define a Java operator. 
IJavaOperatorFactory Builder for Java AST operators. 
IJavaPredicate Java AST interface to represent a Java predicate. 
IJavaReturn Java AST interface to represent return statements of methods. 
IJavaSourceUnit Definition of a source unit representing a Java class or Java method in the form of an Abstract Syntax Tree (AST). 
IJavaStatement Base interface for Java AST elements that represent statements. 
IJavaStaticField Java AST interface to represent a static field. 
IJavaSwitch Java AST interface to represent switch statements. 
IJavaSynchronizedBlock Java AST interface to represent a synchronized block of code. 
IJavaTerminalStatement High-level interface extended by Return and Throw statements. 
IJavaThrow Java AST interface to represent throw statements. 
IJavaTry Java AST interface to represent try-catch elements. 
IJavaType This interface is used to define a Java type. 
IJavaTypeFactory Builder for Java AST types. 
IJavaTypeReference Java AST interface to represent a type reference. 
IJavaWhile Java AST interface to represent while loop statements. 
IJMasterOptimizer A manager of AST optimizers
IJOptimizer Plugin interface for dexdec (DEX decompiler) AST optimizer plugins. 
IJVisitor Specialized tree node visitor interface for dexdec Java AST elements

Classes

AbstractJBlockOptimizer A specialized skeleton implementation for a method AST optimizer meant to run on every block of AST code of the method, recursively. 
AbstractJOptimizer Base class for dexdec (DEX decompiler) AST optimizer plugins. 
AbstractJStatementOptimizer A specialized skeleton implementation for a method AST optimizer meant to run on every statement of AST code of the method, recursively. 
DeferredRequestsCollector This object is used to hold requests for decompilations. 
JavaDocument Java AST document used to render a decompiled piece of Java code. 
JavaFlags Java code flags. 
JavaOutputSink This output sink is the recipient for the generation of a decompiled Java Abstract Syntax Tree (AST). 
JavaOutputSink.CaptureInfo  
JavaReconAnon An object holding reconstructed information for an anonymous class. 
JavaReconEnum An object holding reconstructed information for an enumeration. 
JavaReconEnum.ECst  
JavaReconEnummap An object holding reconstructed information for an enumation map. 
JavaReconLambda An object holding reconstructed information for a lambda. 
JavaTypeUtil Utility methods to generate or verify Java type names and signatures. 
JUtil Collection of utility methods to manipulate IJavaElement
JVisitResults Visit result object, provided to the call-back methods of a dexdec AST visitor object. 

Enums

JavaElementType A list of Java AST element types. 
JavaKeyword Java keywords and reserved tokens. 
JavaOperatorType Java operator types. 
JavaOperatorType.Associativity  
JOptimizerType dexdec AST optimizer type.