Search in sources :

Example 21 with MapExpression

use of org.codehaus.groovy.ast.expr.MapExpression in project groovy-core by groovy.

the class ImmutableASTTransformation method createNoArgConstructor.

private void createNoArgConstructor(ClassNode cNode) {
    Statement body = stmt(ctorX(ClassNode.THIS, args(new MapExpression())));
    doAddConstructor(cNode, new ConstructorNode(ACC_PUBLIC, Parameter.EMPTY_ARRAY, ClassNode.EMPTY_ARRAY, body));
}
Also used : MapExpression(org.codehaus.groovy.ast.expr.MapExpression) BlockStatement(org.codehaus.groovy.ast.stmt.BlockStatement) Statement(org.codehaus.groovy.ast.stmt.Statement) ThrowStatement(org.codehaus.groovy.ast.stmt.ThrowStatement) EmptyStatement(org.codehaus.groovy.ast.stmt.EmptyStatement) ConstructorNode(org.codehaus.groovy.ast.ConstructorNode)

Aggregations

MapExpression (org.codehaus.groovy.ast.expr.MapExpression)21 Expression (org.codehaus.groovy.ast.expr.Expression)11 ConstantExpression (org.codehaus.groovy.ast.expr.ConstantExpression)10 BlockStatement (org.codehaus.groovy.ast.stmt.BlockStatement)10 MapEntryExpression (org.codehaus.groovy.ast.expr.MapEntryExpression)8 MethodCallExpression (org.codehaus.groovy.ast.expr.MethodCallExpression)8 ArgumentListExpression (org.codehaus.groovy.ast.expr.ArgumentListExpression)7 ConstructorCallExpression (org.codehaus.groovy.ast.expr.ConstructorCallExpression)7 TupleExpression (org.codehaus.groovy.ast.expr.TupleExpression)7 ConstructorNode (org.codehaus.groovy.ast.ConstructorNode)6 BinaryExpression (org.codehaus.groovy.ast.expr.BinaryExpression)6 ClosureExpression (org.codehaus.groovy.ast.expr.ClosureExpression)6 VariableExpression (org.codehaus.groovy.ast.expr.VariableExpression)6 Statement (org.codehaus.groovy.ast.stmt.Statement)6 ClassExpression (org.codehaus.groovy.ast.expr.ClassExpression)5 ListExpression (org.codehaus.groovy.ast.expr.ListExpression)5 PropertyExpression (org.codehaus.groovy.ast.expr.PropertyExpression)5 ClassNode (org.codehaus.groovy.ast.ClassNode)4 PropertyNode (org.codehaus.groovy.ast.PropertyNode)4 DeclarationExpression (org.codehaus.groovy.ast.expr.DeclarationExpression)4