Package asteroid
This package contains:
- Classes to implement a local AST transformation
- Classes to access builder to create: nodes, expressions, statements
- Classes to make it easier to access AST node values
- Classes to check AST nodes
A class-
Class Summary Class Description A Entry point to look up functions and utilities to work with nodes, expressions, statements, node utils...etcAbstractGlobalTransformation This class applies all transformers provided by the method getTransformers in order to all class nodes present in a given source unit instance.AbstractLocalTransformation<T extends Annotation,S extends AnnotatedNode> This class is an abstraction to process certain nodes annotated with a specific annotation node type
Types indicate wich nodes are affected:
Lets say we wanted to build a transformation to transform methods annotated by @MyAnnotation:Criterias This class contains out-of-the-box criterias, they are used to help out finding specific nodes.Expressions This class hides the different implementations to create expressions through the Groovy api to provide a unified an easier way to create expressions when coding an AST transformation.Modifiers This class acts as a proxy to access modifier codes found atOpcodes.Nodes This class provides access to different builders for creating AST nodes.Phase.GLOBAL Compilation phases available for global transformations:
SEMANTIC_ANALYSIS CANONICALIZATION INSTRUCTION_SELECTION CLASS_GENERATION OUTPUT FINALIZATIONPhase.LOCAL Compilation phases available for local transformations.Statements This class hides the different implementations to create expressions through the Groovy api to provide a unified an easier way to create statements when coding an AST transformation.Utils This class gathers together a bunch of util functions to deal with AST transformations. -
Enum Summary Enum Description Local.TO Targets available to apply a specific transformation -
Annotation Types Summary Annotation Type Description Local Marks a given annotation as a local AST transformation markerPhase Compilation is required when declaring anyAbstractLocalTransformationorAbstractGlobalTransformation.