@SuppressWarnings(value: BuilderMethodWithSideEffects) class AstSpecificationCompiler extends Object implements GroovyInterceptable
Handles parsing the properties from the closure into values that can be referenced. This object is very stateful and not threadsafe. It accumulates expressions in the 'expression' field as they are found and executed within the DSL. Note: this class consists of many one-line method calls. A better implementation might be to take a declarative approach and replace the one-liners with map entries.
Constructor and description |
---|
AstSpecificationCompiler
(Closure spec) Creates the DSL compiler. |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
annotation(Class target, Closure argBlock) Creates an AnnotationNode. |
|
void |
annotationConstant(Closure argBlock) Creates an AnnotationConstantExpression. |
|
void |
annotations(Closure argBlock) Designates a list of AnnotationNodes. |
|
void |
argumentList(Closure argBlock) Creates an ArgumentListExpression. |
|
void |
array(Class type, Closure argBlock) Creates an ArrayExpression. |
|
void |
assertStatement(Closure argBlock) Creates an AssertStatement. |
|
void |
attribute(Closure argBlock) Creates an AttributeExpression. |
|
void |
binary(Closure argBlock) Creates a BinaryExpression. |
|
void |
bitwiseNegation(Closure argBlock) Creates a BitwiseNegationExpression. |
|
void |
block(Closure argBlock) Creates a BlockStatement. |
|
void |
booleanExpression(Closure argBlock) Creates a BooleanExpression. |
|
void |
breakStatement(String label) Creates a BreakStatement. |
|
void |
caseStatement(Closure argBlock) Create a CaseStatement. |
|
void |
cast(Class type, Closure argBlock) Creates a CastExpression. |
|
void |
catchStatement(Closure argBlock) Creates a CatchStatement. |
|
void |
classExpression(Class type) Creates a ClassExpression. |
|
void |
classNode(Class target) Creates a ClassNode. |
|
void |
classNode(String name, int modifiers, Closure argBlock) Creates a ClassNode |
|
void |
closure(Closure argBlock) Creates a ClosureExpression. |
|
void |
closureList(Closure argBlock) Creates a ClosureListExpression. |
|
void |
constant(Object value) Creates a ConstantExpression. |
|
void |
constructor(int modifiers, Closure argBlock) Creates a ConstructorNode. |
|
void |
constructorCall(Class type, Closure argBlock) Creates an ConstructorCallExpression. |
|
void |
constructors(Closure argBlock) Designates a list of ConstructorNodes. |
|
void |
continueStatement(Closure argBlock) Creates a ContinueStatement. |
|
void |
declaration(Closure argBlock) Creates a DeclarationExpression. |
|
void |
defaultCase(Closure argBlock) Creates a BlockStatement. |
|
void |
dynamicVariable(String variable, boolean isStatic) Creates a DynamicVariable. |
|
void |
elvisOperator(Closure argBlock) Creates an ElvisOperatorExpression. |
|
void |
empty() Creates EmptyStatement. |
|
void |
exceptions(Closure argBlock) Creates a ClassNode[]. |
|
void |
expression(Closure argBlock) Creates an ExpressionStatement. |
|
void |
field(Closure argBlock) Creates a FieldExpression. |
|
void |
fieldNode(String name, int modifiers, Class type, Class owner, Closure argBlock) Creates a FieldNode. |
|
void |
fields(Closure argBlock) Designates a list of FieldNode s. |
|
void |
forStatement(Closure argBlock) Create a ForStatement. |
|
void |
gString(String verbatimText, Closure argBlock) Creates a gString. |
|
void |
genericsType(Class type, Closure argBlock) Creates a GenericsType. |
|
void |
genericsTypes(Closure argBlock) Creates a GenericsTypes[]. |
|
List<ASTNode> |
getExpression() Gets the current generated expression. |
|
void |
ifStatement(Closure argBlock) Creates an IfStatement. |
|
void |
importNode(Class target, String alias) Creates an ImportNode. |
|
void |
inclusive(boolean value) Creates a boolean value. |
|
void |
innerClass(String name, int modifiers, Closure argBlock) Creates an inner class. |
|
void |
interfaces(Closure argBlock) Creates a ClassNode[]. |
|
void |
label(String label) Creates a label. |
|
void |
list(Closure argBlock) Creates a ListExpression. |
|
void |
lowerBound(Class target) Create lowerBound ClassNode. |
|
void |
map(Closure argBlock) Creates a MapExpression. |
|
void |
mapEntry(Closure argBlock) Creates a MapEntryExpression. |
|
void |
mapEntry(Map map) Creates a mapEntry. |
|
void |
member(String name, Closure argBlock) Creates a 2 element list of name and Annotation. |
|
void |
method(String name, int modifiers, Class returnType, Closure argBlock) Creates a MethodNode. |
|
void |
methodCall(Closure argBlock) Creates a MethodCallExpression. |
|
void |
methodPointer(Closure argBlock) Creates a methodPointer. |
|
void |
methods(Closure argBlock) Designates a list of MethodNodes. |
|
void |
mixin(String name, int modifiers, Closure argBlock) Creates a MixinNode. |
|
void |
mixins(Closure argBlock) Creates a MixinNode[]. |
|
void |
namedArgumentList(Closure argBlock) Creates a NamedArgumentListExpression. |
|
void |
not(Closure argBlock) Creates a NotExpression. |
|
void |
parameter(Map<String, Class> args, Closure argBlock) Creates a Parameter. |
|
void |
parameters(Closure argBlock) Creates a Parameter[]. |
|
void |
postfix(Closure argBlock) Creates a PostfixExpression. |
|
void |
prefix(Closure argBlock) Creates a PrefixExpression. |
|
void |
properties(Closure argBlock) Designates a list of PropertyNode s. |
|
void |
property(Closure argBlock) Creates a property. |
|
void |
propertyNode(String name, int modifiers, Class type, Class owner, Closure argBlock) Creates a PropertyNode. |
|
void |
range(Closure argBlock) Creates a RangeExpression. |
|
void |
range(Range range) Creates a RangeExpression. |
|
void |
returnStatement(Closure argBlock) Creates a ReturnStatement. |
|
void |
spread(Closure argBlock) Creates a SpreadExpression. |
|
void |
spreadMap(Closure argBlock) Creates a SpreadMapExpression. |
|
void |
staticMethodCall(Class target, String name, Closure argBlock) Creates a StaticMethodCallExpression. |
|
void |
staticMethodCall(MethodClosure target, Closure argBlock) Creates a StaticMethodCallExpression. |
|
void |
strings(Closure argBlock) Designates a list of ConstantExpressions. |
|
void |
switchStatement(Closure argBlock) Creates a SwitchStatement. |
|
void |
synchronizedStatement(Closure argBlock) Creates a SynchronizedStatement. |
|
void |
throwStatement(Closure argBlock) Creates a ThrowStatement. |
|
void |
token(String value) Creates a token. |
|
void |
tryCatch(Closure argBlock) Creates a TryCatchStatement. |
|
void |
tuple(Closure argBlock) Creates a TupleExpression. |
|
void |
unaryMinus(Closure argBlock) Creates a UnaryMinusExpression |
|
void |
unaryPlus(Closure argBlock) Creates a UnaryPlusExpression. |
|
void |
upperBound(Closure argBlock) Creates a list of upperBound ClassNodes. |
|
void |
values(Closure argBlock) Designates a list of Expressions. |
|
void |
variable(String variable) Creates a VariableExpression. |
|
void |
whileStatement(Closure argBlock) Creates a WhileStatement. |
Creates the DSL compiler.
Creates an AnnotationNode.
Creates an AnnotationConstantExpression.
Designates a list of AnnotationNodes.
Creates an ArgumentListExpression.
Creates an ArrayExpression.
Creates an AssertStatement.
Creates an AttributeExpression.
Creates a BinaryExpression.
Creates a BitwiseNegationExpression.
Creates a BlockStatement.
Creates a BooleanExpression.
Creates a BreakStatement.
Create a CaseStatement.
Creates a CastExpression.
Creates a CatchStatement.
Creates a ClassExpression.
Creates a ClassNode.
Creates a ClassNode
Creates a ClosureExpression.
Creates a ClosureListExpression.
Creates a ConstantExpression.
Creates a ConstructorNode.
Creates an ConstructorCallExpression.
Designates a list of ConstructorNodes.
Creates a ContinueStatement.
Creates a DeclarationExpression.
Creates a BlockStatement.
Creates a DynamicVariable.
Creates an ElvisOperatorExpression.
Creates EmptyStatement.
Creates a ClassNode[].
Creates an ExpressionStatement.
Creates a FieldExpression.
Creates a FieldNode.
Designates a list of FieldNode
s.
Create a ForStatement.
Creates a gString.
Creates a GenericsType.
Creates a GenericsTypes[].
Creates an IfStatement.
Creates a boolean value.
Creates an inner class.
Creates a ClassNode[].
Creates a label.
Creates a ListExpression.
Create lowerBound ClassNode.
Creates a MapExpression.
Creates a MapEntryExpression.
Creates a mapEntry.
Creates a 2 element list of name and Annotation. Used with Annotation Members.
Creates a MethodNode.
Creates a MethodCallExpression.
Creates a methodPointer.
Designates a list of MethodNodes.
Creates a MixinNode.
Creates a MixinNode[].
Creates a NamedArgumentListExpression.
Creates a NotExpression.
Creates a Parameter.
Creates a Parameter[].
Creates a PostfixExpression.
Creates a PrefixExpression.
Designates a list of PropertyNode
s.
Creates a property.
Creates a PropertyNode.
Creates a RangeExpression.
Creates a RangeExpression.
Creates a ReturnStatement.
Creates a SpreadExpression.
Creates a SpreadMapExpression.
Creates a StaticMethodCallExpression.
Creates a StaticMethodCallExpression.
Designates a list of ConstantExpressions.
Creates a SwitchStatement.
Creates a SynchronizedStatement.
Creates a ThrowStatement.
Creates a token.
Creates a TryCatchStatement.
Creates a TupleExpression.
Creates a UnaryMinusExpression
Creates a UnaryPlusExpression.
Creates a list of upperBound ClassNodes.
Designates a list of Expressions.
Creates a VariableExpression.
Creates a WhileStatement.
Copyright © 2003-2024 The Apache Software Foundation. All rights reserved.