- A - Class in asteroid
-
Entry point to look up functions and utilities to work with nodes, expressions, statements,
node utils...etc
- A() - Constructor for class asteroid.A
-
- AbstractClassNodeTransformer - Class in asteroid.transformer
-
- AbstractClassNodeTransformer(SourceUnit, Closure<Boolean>) - Constructor for class asteroid.transformer.AbstractClassNodeTransformer
-
Every instance needs the source unit and the name of the class
it's going to transform.
- AbstractExpressionTransformer<T extends Expression> - Class in asteroid.transformer
-
- AbstractExpressionTransformer(Class<T>, SourceUnit, Closure<Boolean>) - Constructor for class asteroid.transformer.AbstractExpressionTransformer
-
Every instance needs the source unit awareness and the name of the method
it's going to transform
- AbstractExpressionTransformer(Class<T>, SourceUnit) - Constructor for class asteroid.transformer.AbstractExpressionTransformer
-
Every instance needs the source unit awareness and the name of the method
it's going to transform
- AbstractGlobalTransformation - Class in asteroid
-
This class applies all transformers provided by the method
getTransformers in order to all class nodes present in a given
source unit instance.
- AbstractGlobalTransformation() - Constructor for class asteroid.AbstractGlobalTransformation
-
- AbstractLocalTransformation<T extends java.lang.annotation.Annotation,S extends AnnotatedNode> - Class in asteroid
-
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:
class MyCustomTransformation extends AbstractLocalTransformation<MyAnnotation, MethodNode> {
@Override
void doVisit(AnnotationNode annotation, final MethodNode annotated){
// implementation
}
}
- AbstractLocalTransformation() - Constructor for class asteroid.AbstractLocalTransformation
-
Default constructor
- AbstractLocalTransformation(Class<T>) - Constructor for class asteroid.AbstractLocalTransformation
-
Default constructor
- AbstractMethodNodeTransformer - Class in asteroid.transformer
-
- AbstractMethodNodeTransformer(SourceUnit, Closure<Boolean>) - Constructor for class asteroid.transformer.AbstractMethodNodeTransformer
-
Deprecated.
- AbstractStatementTransformer<T extends Statement> - Class in asteroid.transformer
-
- AbstractStatementTransformer(SourceUnit, Closure<Boolean>) - Constructor for class asteroid.transformer.AbstractStatementTransformer
-
Every instance needs the source unit awareness and the name of the method
it's going to transform
- AbstractTransformer - Class in asteroid.transformer
-
Most transformers need at some point the source unit in order to
fix or apply properly the scope to each variable.
- AbstractTransformer(SourceUnit) - Constructor for class asteroid.transformer.AbstractTransformer
-
This constructor needs a source unit
- ACC - Static variable in class asteroid.A
-
Entry point to access language modifiers
- addAfterCodeBlock(MethodNode, Statement) - Method in class asteroid.utils.NodeUtils
-
Adds the statement passed as argument after the current method code
- addAroundCodeBlock(MethodNode, Statement, Statement) - Method in class asteroid.utils.NodeUtils
-
Adds two different statements to be executed before and after the current
method code
- addASTAnnotationsFromTo(ClassNode, CompilePhase) - Static method in class asteroid.internal.TransformationUtils
-
- addBeforeCodeBlock(MethodNode, Statement) - Method in class asteroid.utils.NodeUtils
-
Adds the statement passed as argument before the current method code
- addCatchStmt(Class, String, Statement) - Method in class asteroid.statements.TryCatchStatementBuilder
-
Adds one catch statement to catch a specific exception giving a
specific name for the exception variable.
- addCatchStmt(ClassNode, String, Statement) - Method in class asteroid.statements.TryCatchStatementBuilder
-
Adds one catch statement to catch a specific exception giving a
specific name for the exception variable.
- addCheckTo(MethodNode) - Method in class asteroid.utils.NodeUtils
-
Adds checks to the method node passed as parameter
- addImport(ClassNode, Class) - Method in class asteroid.utils.NodeUtils
-
- addImport(ClassNode, String) - Method in class asteroid.utils.NodeUtils
-
- addImport(ClassNode, Class, String) - Method in class asteroid.utils.NodeUtils
-
- addImport(ClassNode, String, String) - Method in class asteroid.utils.NodeUtils
-
- addInterfaces(ClassNode, Class...) - Method in class asteroid.utils.NodeUtils
-
Makes the
ClassNode to implement the interfaces passed
as arguments
IMPORTANT: Dont use this method at any
CompilePhase
before SEMANTIC_ANALYSIS.
- addInterfaces(ClassNode, ClassNode...) - Method in class asteroid.utils.NodeUtils
-
Makes the
ClassNode to implement the interfaces passed
as arguments.
- addMethod(ClassNode, MethodNode) - Method in class asteroid.utils.NodeUtils
-
Adds the method to the class node passed as first argument
- addMethodIfNotPresent(ClassNode, MethodNode) - Method in class asteroid.utils.NodeUtils
-
Adds a method to the class node passed as first argument only
if it wasn't present in the first place
- addProperty(ClassNode, PropertyNode) - Method in class asteroid.utils.NodeUtils
-
Adds the property to the class node passed as first argument
- addPropertyIfNotPresent(ClassNode, PropertyNode) - Method in class asteroid.utils.NodeUtils
-
Adds a property to the class node passed as first argument only
if it wasn't present in the first place
- and(Closure<Boolean>...) - Static method in class asteroid.Criterias
-
Combines two
Closure expressions returning a boolean.
- annotation(Class) - Method in class asteroid.Nodes
-
- annotation(Class) - Static method in class asteroid.nodes.AnnotationNodeBuilder
-
- ANNOTATION_VALUE - Static variable in class asteroid.utils.NodeUtils
-
- AnnotationNodeBuilder - Class in asteroid.nodes
-
- applyToStatementsByLabel(List<StatementUtils.Group>, Map<String, Closure<Statement>>) - Method in class asteroid.utils.StatementUtils
-
If you have a given list of
StatementUtils.Group you can apply a set
of transformations on certain statements within a given
group.
- applyToStatementsByLabelFlatten(List<StatementUtils.Group>, Map<String, Closure<Statement>>) - Method in class asteroid.utils.StatementUtils
-
If you have a given list of
StatementUtils.Group you can apply a set
of transformations on certain statements within a given
group.
- asBinaryExpr(Expression, T, Closure<T>) - Method in class asteroid.utils.ExpressionUtils
-
Executes a given computation if the expression is of type
BinaryExpression if not, then a default value is
provided
- asBinaryExpr(Expression) - Method in class asteroid.utils.ExpressionUtils
-
- assertS(BooleanExpression) - Static method in class asteroid.Statements
-
- assertS(BooleanExpression, String) - Static method in class asteroid.Statements
-
- asteroid - 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
Most of the times you can access all these functionalities through the
A class
- asteroid.internal - package asteroid.internal
-
This package contains internal AST transformations to get rid of
boilerplate code when creating a local AST transformation.
- asteroid.nodes - package asteroid.nodes
-
This package contains classes to build
ASTNode instances
- asteroid.statements - package asteroid.statements
-
This package contains utility classes to create statements
- asteroid.transformer - package asteroid.transformer
-
This package contains classes to create global AST transformations
- asteroid.utils - package asteroid.utils
-
This package contains utility classes
- ifElseS(BooleanExpression, Statement, Statement) - Static method in class asteroid.Statements
-
Builds a if-else statement.
- ifS(BooleanExpression, Statement) - Static method in class asteroid.Statements
-
Builds a if statement, without the else part.
- INITIALIZATION - Static variable in class asteroid.Phase.GLOBAL
-
Source files are opened and environment configured
- initialValueExpression(Expression) - Method in class asteroid.nodes.PropertyNodeBuilder
-
Sets an initial value for the property.
- INSTRUCTION_SELECTION - Static variable in class asteroid.Phase.GLOBAL
-
Instruction set is chosen, for example Java 6 or Java 7 bytecode level
- INSTRUCTION_SELECTION - Static variable in class asteroid.Phase.LOCAL
-
Instruction set is chosen, for example Java 6 or Java 7 bytecode level
- isBinaryExpr(Expression) - Method in class asteroid.utils.ExpressionUtils
-
- isBinaryExpr(Expression, int) - Method in class asteroid.utils.ExpressionUtils
-
Checks whether an expression is of type
BinaryExpression using
a specific binary operator
- isListExpr(Expression) - Method in class asteroid.utils.ExpressionUtils
-
- isMethodCallExpr(Expression) - Method in class asteroid.utils.ExpressionUtils
-
- isOrExtends(ClassNode, Class) - Method in class asteroid.utils.NodeUtils
-
Returns true if the classNode passed as first argument is of type `clazz` or that class extends
the other class, false otherwise
- isOrExtends(ClassNode, ClassNode) - Method in class asteroid.utils.NodeUtils
-
Returns true if the classNode passed as first argument is of type `clazz` or that class extends
the other class, false otherwise
- isOrExtends(ClassNode, String) - Method in class asteroid.utils.NodeUtils
-
Returns true if the classNode passed as first argument is of type `clazz` or that class extends
the other class, false otherwise
- isOrExtendsUnsafe(ClassNode, ClassNode) - Method in class asteroid.utils.NodeUtils
-
Returns true if the classNode passed as first argument is of type `clazz` or that class extends
the other class, false otherwise.
- isOrImplements(Class, Class) - Method in class asteroid.utils.NodeUtils
-
Returns true if the classNode passed as first argument is of type `clazz` or that class implements
`parent`, false otherwise
- isOrImplements(ClassNode, Class) - Method in class asteroid.utils.NodeUtils
-
Returns true if the classNode passed as first argument is of type `clazz` or that class implements
`parent`, false otherwise
- isOrImplements(ClassNode, String) - Method in class asteroid.utils.NodeUtils
-
Returns true if the classNode passed as first argument is of type `clazz` or that class implements
`parent`, false otherwise