Search in sources :

Example 16 with ArgumentListExpression

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

the class AbstractGrailsArtefactTransformer method populateAutowiredApiLookupMethod.

protected MethodNode populateAutowiredApiLookupMethod(ClassNode classNode, ClassNode implementationNode, String apiProperty, String methodName, BlockStatement methodBody) {
    addApiLookupFieldAndSetter(classNode, implementationNode, apiProperty, null);
    VariableExpression apiVar = new VariableExpression(apiProperty, implementationNode);
    BlockStatement ifBlock = new BlockStatement();
    ArgumentListExpression arguments = new ArgumentListExpression();
    arguments.addExpression(new ConstantExpression("Method on class [" + classNode + "] was used outside of a Grails application. If running in the context of a test using the mocking API or bootstrap Grails correctly."));
    ifBlock.addStatement(new ThrowStatement(new ConstructorCallExpression(new ClassNode(IllegalStateException.class), arguments)));
    BlockStatement elseBlock = new BlockStatement();
    elseBlock.addStatement(new ReturnStatement(apiVar));
    methodBody.addStatement(new IfStatement(new BooleanExpression(new BinaryExpression(apiVar, GrailsASTUtils.EQUALS_OPERATOR, GrailsASTUtils.NULL_EXPRESSION)), ifBlock, elseBlock));
    MethodNode methodNode = new MethodNode(methodName, PUBLIC_STATIC_MODIFIER, implementationNode, ZERO_PARAMETERS, null, methodBody);
    return methodNode;
}
Also used : ClassNode(org.codehaus.groovy.ast.ClassNode) InnerClassNode(org.codehaus.groovy.ast.InnerClassNode) ConstructorCallExpression(org.codehaus.groovy.ast.expr.ConstructorCallExpression) ConstantExpression(org.codehaus.groovy.ast.expr.ConstantExpression) ArgumentListExpression(org.codehaus.groovy.ast.expr.ArgumentListExpression) VariableExpression(org.codehaus.groovy.ast.expr.VariableExpression) BlockStatement(org.codehaus.groovy.ast.stmt.BlockStatement) IfStatement(org.codehaus.groovy.ast.stmt.IfStatement) BooleanExpression(org.codehaus.groovy.ast.expr.BooleanExpression) BinaryExpression(org.codehaus.groovy.ast.expr.BinaryExpression) MethodNode(org.codehaus.groovy.ast.MethodNode) ReturnStatement(org.codehaus.groovy.ast.stmt.ReturnStatement) ThrowStatement(org.codehaus.groovy.ast.stmt.ThrowStatement)

Example 17 with ArgumentListExpression

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

the class ASTValidationErrorsHelper method addInitErrorsMethod.

protected void addInitErrorsMethod(final ClassNode paramTypeClassNode) {
    final ASTNode initErrorsMethod = paramTypeClassNode.getMethod(INIT_ERRORS_METHOD_NAME, GrailsArtefactClassInjector.ZERO_PARAMETERS);
    if (initErrorsMethod == null) {
        final BlockStatement initErrorsMethodCode = new BlockStatement();
        final BinaryExpression errorsIsNullExpression = new BinaryExpression(ERRORS_EXPRESSION, Token.newSymbol(Types.COMPARE_EQUAL, 0, 0), NULL_EXPRESSION);
        Expression beanPropertyBindingResultConstructorArgs = new ArgumentListExpression(new VariableExpression("this"), new ConstantExpression(paramTypeClassNode.getName()));
        final Statement newEvaluatorExpression = new ExpressionStatement(new BinaryExpression(ERRORS_EXPRESSION, EQUALS_SYMBOL, new ConstructorCallExpression(new ClassNode(ValidationErrors.class), beanPropertyBindingResultConstructorArgs)));
        final Statement initErrorsIfNullStatement = new IfStatement(new BooleanExpression(errorsIsNullExpression), newEvaluatorExpression, new ExpressionStatement(new EmptyExpression()));
        initErrorsMethodCode.addStatement(initErrorsIfNullStatement);
        paramTypeClassNode.addMethod(new MethodNode(INIT_ERRORS_METHOD_NAME, Modifier.PRIVATE, ClassHelper.VOID_TYPE, GrailsArtefactClassInjector.ZERO_PARAMETERS, GrailsArtefactClassInjector.EMPTY_CLASS_ARRAY, initErrorsMethodCode));
    }
}
Also used : ClassNode(org.codehaus.groovy.ast.ClassNode) ValidationErrors(grails.validation.ValidationErrors) Statement(org.codehaus.groovy.ast.stmt.Statement) ExpressionStatement(org.codehaus.groovy.ast.stmt.ExpressionStatement) ReturnStatement(org.codehaus.groovy.ast.stmt.ReturnStatement) IfStatement(org.codehaus.groovy.ast.stmt.IfStatement) BlockStatement(org.codehaus.groovy.ast.stmt.BlockStatement) ConstructorCallExpression(org.codehaus.groovy.ast.expr.ConstructorCallExpression) ConstantExpression(org.codehaus.groovy.ast.expr.ConstantExpression) ArgumentListExpression(org.codehaus.groovy.ast.expr.ArgumentListExpression) BlockStatement(org.codehaus.groovy.ast.stmt.BlockStatement) VariableExpression(org.codehaus.groovy.ast.expr.VariableExpression) EmptyExpression(org.codehaus.groovy.ast.expr.EmptyExpression) IfStatement(org.codehaus.groovy.ast.stmt.IfStatement) BooleanExpression(org.codehaus.groovy.ast.expr.BooleanExpression) BinaryExpression(org.codehaus.groovy.ast.expr.BinaryExpression) MethodNode(org.codehaus.groovy.ast.MethodNode) BooleanExpression(org.codehaus.groovy.ast.expr.BooleanExpression) ConstantExpression(org.codehaus.groovy.ast.expr.ConstantExpression) MethodCallExpression(org.codehaus.groovy.ast.expr.MethodCallExpression) EmptyExpression(org.codehaus.groovy.ast.expr.EmptyExpression) Expression(org.codehaus.groovy.ast.expr.Expression) ConstructorCallExpression(org.codehaus.groovy.ast.expr.ConstructorCallExpression) VariableExpression(org.codehaus.groovy.ast.expr.VariableExpression) ArgumentListExpression(org.codehaus.groovy.ast.expr.ArgumentListExpression) TupleExpression(org.codehaus.groovy.ast.expr.TupleExpression) BinaryExpression(org.codehaus.groovy.ast.expr.BinaryExpression) ExpressionStatement(org.codehaus.groovy.ast.stmt.ExpressionStatement) ASTNode(org.codehaus.groovy.ast.ASTNode)

Example 18 with ArgumentListExpression

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

the class ControllerActionTransformer method processMethods.

private void processMethods(ClassNode classNode, SourceUnit source, GeneratorContext context) {
    List<MethodNode> deferredNewMethods = new ArrayList<MethodNode>();
    for (MethodNode method : classNode.getMethods()) {
        if (methodShouldBeConfiguredAsControllerAction(method)) {
            final List<MethodNode> declaredMethodsWithThisName = classNode.getDeclaredMethods(method.getName());
            if (declaredMethodsWithThisName != null) {
                final int numberOfNonExceptionHandlerMethodsWithThisName = DefaultGroovyMethods.count((Iterable) declaredMethodsWithThisName, new Closure(this) {

                    @Override
                    public Object call(Object object) {
                        return !isExceptionHandlingMethod((MethodNode) object);
                    }
                }).intValue();
                if (numberOfNonExceptionHandlerMethodsWithThisName > 1) {
                    String message = "Controller actions may not be overloaded.  The [" + method.getName() + "] action has been overloaded in [" + classNode.getName() + "].";
                    GrailsASTUtils.error(source, method, message);
                }
            }
            MethodNode wrapperMethod = convertToMethodAction(classNode, method, source, context);
            if (wrapperMethod != null) {
                deferredNewMethods.add(wrapperMethod);
            }
        }
    }
    Collection<MethodNode> exceptionHandlerMethods = getExceptionHandlerMethods(classNode, source);
    final FieldNode exceptionHandlerMetaDataField = classNode.getField(EXCEPTION_HANDLER_META_DATA_FIELD_NAME);
    if (exceptionHandlerMetaDataField == null || !exceptionHandlerMetaDataField.getDeclaringClass().equals(classNode)) {
        final ListExpression listOfExceptionHandlerMetaData = new ListExpression();
        for (final MethodNode exceptionHandlerMethod : exceptionHandlerMethods) {
            final Parameter[] parameters = exceptionHandlerMethod.getParameters();
            final Parameter firstParameter = parameters[0];
            final ClassNode firstParameterTypeClassNode = firstParameter.getType();
            final String exceptionHandlerMethodName = exceptionHandlerMethod.getName();
            final ArgumentListExpression defaultControllerExceptionHandlerMetaDataCtorArgs = new ArgumentListExpression();
            defaultControllerExceptionHandlerMetaDataCtorArgs.addExpression(new ConstantExpression(exceptionHandlerMethodName));
            defaultControllerExceptionHandlerMetaDataCtorArgs.addExpression(new ClassExpression(firstParameterTypeClassNode.getPlainNodeReference()));
            listOfExceptionHandlerMetaData.addExpression(new ConstructorCallExpression(new ClassNode(DefaultControllerExceptionHandlerMetaData.class), defaultControllerExceptionHandlerMetaDataCtorArgs));
        }
        classNode.addField(EXCEPTION_HANDLER_META_DATA_FIELD_NAME, Modifier.STATIC | Modifier.PRIVATE | Modifier.FINAL, new ClassNode(List.class), listOfExceptionHandlerMetaData);
    }
    for (MethodNode newMethod : deferredNewMethods) {
        classNode.addMethod(newMethod);
    }
}
Also used : Closure(groovy.lang.Closure) ConstructorCallExpression(org.codehaus.groovy.ast.expr.ConstructorCallExpression) ListExpression(org.codehaus.groovy.ast.expr.ListExpression) ArgumentListExpression(org.codehaus.groovy.ast.expr.ArgumentListExpression) ConstantExpression(org.codehaus.groovy.ast.expr.ConstantExpression) ArrayList(java.util.ArrayList) ArgumentListExpression(org.codehaus.groovy.ast.expr.ArgumentListExpression) ClassExpression(org.codehaus.groovy.ast.expr.ClassExpression) RequestParameter(grails.web.RequestParameter) List(java.util.List) ArrayList(java.util.ArrayList)

Example 19 with ArgumentListExpression

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

the class ControllerActionTransformer method getCodeToHandleAllowedMethods.

protected BlockStatement getCodeToHandleAllowedMethods(ClassNode controllerClass, String methodName) {
    GrailsASTUtils.addEnhancedAnnotation(controllerClass, DefaultGrailsControllerClass.ALLOWED_HTTP_METHODS_PROPERTY);
    final BlockStatement checkAllowedMethodsBlock = new BlockStatement();
    final PropertyExpression requestPropertyExpression = new PropertyExpression(new VariableExpression("this"), "request");
    final FieldNode allowedMethodsField = controllerClass.getField(DefaultGrailsControllerClass.ALLOWED_HTTP_METHODS_PROPERTY);
    if (allowedMethodsField != null) {
        final Expression initialAllowedMethodsExpression = allowedMethodsField.getInitialExpression();
        if (initialAllowedMethodsExpression instanceof MapExpression) {
            boolean actionIsRestricted = false;
            final MapExpression allowedMethodsMapExpression = (MapExpression) initialAllowedMethodsExpression;
            final List<MapEntryExpression> allowedMethodsMapEntryExpressions = allowedMethodsMapExpression.getMapEntryExpressions();
            for (MapEntryExpression allowedMethodsMapEntryExpression : allowedMethodsMapEntryExpressions) {
                final Expression allowedMethodsMapEntryKeyExpression = allowedMethodsMapEntryExpression.getKeyExpression();
                if (allowedMethodsMapEntryKeyExpression instanceof ConstantExpression) {
                    final ConstantExpression allowedMethodsMapKeyConstantExpression = (ConstantExpression) allowedMethodsMapEntryKeyExpression;
                    final Object allowedMethodsMapKeyValue = allowedMethodsMapKeyConstantExpression.getValue();
                    if (methodName.equals(allowedMethodsMapKeyValue)) {
                        actionIsRestricted = true;
                        break;
                    }
                }
            }
            if (actionIsRestricted) {
                final PropertyExpression responsePropertyExpression = new PropertyExpression(new VariableExpression("this"), "response");
                final ArgumentListExpression isAllowedArgumentList = new ArgumentListExpression();
                isAllowedArgumentList.addExpression(new ConstantExpression(methodName));
                isAllowedArgumentList.addExpression(new PropertyExpression(new VariableExpression("this"), "request"));
                isAllowedArgumentList.addExpression(new PropertyExpression(new VariableExpression("this"), DefaultGrailsControllerClass.ALLOWED_HTTP_METHODS_PROPERTY));
                final Expression isAllowedMethodCall = new StaticMethodCallExpression(ClassHelper.make(AllowedMethodsHelper.class), "isAllowed", isAllowedArgumentList);
                final BooleanExpression isValidRequestMethod = new BooleanExpression(isAllowedMethodCall);
                final MethodCallExpression sendErrorMethodCall = new MethodCallExpression(responsePropertyExpression, "sendError", new ConstantExpression(HttpServletResponse.SC_METHOD_NOT_ALLOWED));
                final ReturnStatement returnStatement = new ReturnStatement(new ConstantExpression(null));
                final BlockStatement blockToSendError = new BlockStatement();
                blockToSendError.addStatement(new ExpressionStatement(sendErrorMethodCall));
                blockToSendError.addStatement(returnStatement);
                final IfStatement ifIsValidRequestMethodStatement = new IfStatement(isValidRequestMethod, new ExpressionStatement(new EmptyExpression()), blockToSendError);
                checkAllowedMethodsBlock.addStatement(ifIsValidRequestMethodStatement);
            }
        }
    }
    final ArgumentListExpression argumentListExpression = new ArgumentListExpression();
    argumentListExpression.addExpression(new ConstantExpression(ALLOWED_METHODS_HANDLED_ATTRIBUTE_NAME));
    argumentListExpression.addExpression(new ConstantExpression(methodName));
    final Expression setAttributeMethodCall = new MethodCallExpression(requestPropertyExpression, "setAttribute", argumentListExpression);
    final BlockStatement codeToExecuteIfAttributeIsNotSet = new BlockStatement();
    codeToExecuteIfAttributeIsNotSet.addStatement(new ExpressionStatement(setAttributeMethodCall));
    codeToExecuteIfAttributeIsNotSet.addStatement(checkAllowedMethodsBlock);
    final BooleanExpression attributeIsSetBooleanExpression = new BooleanExpression(new MethodCallExpression(requestPropertyExpression, "getAttribute", new ArgumentListExpression(new ConstantExpression(ALLOWED_METHODS_HANDLED_ATTRIBUTE_NAME))));
    final Statement ifAttributeIsAlreadySetStatement = new IfStatement(attributeIsSetBooleanExpression, new EmptyStatement(), codeToExecuteIfAttributeIsNotSet);
    final BlockStatement code = new BlockStatement();
    code.addStatement(ifAttributeIsAlreadySetStatement);
    return code;
}
Also used : MapExpression(org.codehaus.groovy.ast.expr.MapExpression) GrailsASTUtils.buildGetMapExpression(org.grails.compiler.injection.GrailsASTUtils.buildGetMapExpression) CatchStatement(org.codehaus.groovy.ast.stmt.CatchStatement) IfStatement(org.codehaus.groovy.ast.stmt.IfStatement) BlockStatement(org.codehaus.groovy.ast.stmt.BlockStatement) Statement(org.codehaus.groovy.ast.stmt.Statement) ExpressionStatement(org.codehaus.groovy.ast.stmt.ExpressionStatement) ThrowStatement(org.codehaus.groovy.ast.stmt.ThrowStatement) ReturnStatement(org.codehaus.groovy.ast.stmt.ReturnStatement) EmptyStatement(org.codehaus.groovy.ast.stmt.EmptyStatement) TryCatchStatement(org.codehaus.groovy.ast.stmt.TryCatchStatement) ConstantExpression(org.codehaus.groovy.ast.expr.ConstantExpression) StaticMethodCallExpression(org.codehaus.groovy.ast.expr.StaticMethodCallExpression) AllowedMethodsHelper(grails.artefact.controller.support.AllowedMethodsHelper) EmptyStatement(org.codehaus.groovy.ast.stmt.EmptyStatement) ArgumentListExpression(org.codehaus.groovy.ast.expr.ArgumentListExpression) BlockStatement(org.codehaus.groovy.ast.stmt.BlockStatement) VariableExpression(org.codehaus.groovy.ast.expr.VariableExpression) EmptyExpression(org.codehaus.groovy.ast.expr.EmptyExpression) MapEntryExpression(org.codehaus.groovy.ast.expr.MapEntryExpression) IfStatement(org.codehaus.groovy.ast.stmt.IfStatement) BooleanExpression(org.codehaus.groovy.ast.expr.BooleanExpression) StaticMethodCallExpression(org.codehaus.groovy.ast.expr.StaticMethodCallExpression) MethodCallExpression(org.codehaus.groovy.ast.expr.MethodCallExpression) ListExpression(org.codehaus.groovy.ast.expr.ListExpression) MapExpression(org.codehaus.groovy.ast.expr.MapExpression) ConstantExpression(org.codehaus.groovy.ast.expr.ConstantExpression) GrailsASTUtils.buildGetPropertyExpression(org.grails.compiler.injection.GrailsASTUtils.buildGetPropertyExpression) GrailsASTUtils.buildSetPropertyExpression(org.grails.compiler.injection.GrailsASTUtils.buildSetPropertyExpression) VariableExpression(org.codehaus.groovy.ast.expr.VariableExpression) ArgumentListExpression(org.codehaus.groovy.ast.expr.ArgumentListExpression) BinaryExpression(org.codehaus.groovy.ast.expr.BinaryExpression) TernaryExpression(org.codehaus.groovy.ast.expr.TernaryExpression) BooleanExpression(org.codehaus.groovy.ast.expr.BooleanExpression) PropertyExpression(org.codehaus.groovy.ast.expr.PropertyExpression) StaticMethodCallExpression(org.codehaus.groovy.ast.expr.StaticMethodCallExpression) MethodCallExpression(org.codehaus.groovy.ast.expr.MethodCallExpression) EmptyExpression(org.codehaus.groovy.ast.expr.EmptyExpression) Expression(org.codehaus.groovy.ast.expr.Expression) ConstructorCallExpression(org.codehaus.groovy.ast.expr.ConstructorCallExpression) GrailsASTUtils.buildGetMapExpression(org.grails.compiler.injection.GrailsASTUtils.buildGetMapExpression) DeclarationExpression(org.codehaus.groovy.ast.expr.DeclarationExpression) ClosureExpression(org.codehaus.groovy.ast.expr.ClosureExpression) ClassExpression(org.codehaus.groovy.ast.expr.ClassExpression) TupleExpression(org.codehaus.groovy.ast.expr.TupleExpression) MapEntryExpression(org.codehaus.groovy.ast.expr.MapEntryExpression) ExpressionStatement(org.codehaus.groovy.ast.stmt.ExpressionStatement) ReturnStatement(org.codehaus.groovy.ast.stmt.ReturnStatement) GrailsASTUtils.buildGetPropertyExpression(org.grails.compiler.injection.GrailsASTUtils.buildGetPropertyExpression) GrailsASTUtils.buildSetPropertyExpression(org.grails.compiler.injection.GrailsASTUtils.buildSetPropertyExpression) PropertyExpression(org.codehaus.groovy.ast.expr.PropertyExpression)

Example 20 with ArgumentListExpression

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

the class ControllerActionTransformer method initializeActionParameters.

protected BlockStatement initializeActionParameters(ClassNode classNode, ASTNode actionNode, String actionName, Parameter[] actionParameters, SourceUnit source, GeneratorContext context) {
    BlockStatement wrapper = new BlockStatement();
    ArgumentListExpression mapBindingResultConstructorArgs = new ArgumentListExpression();
    mapBindingResultConstructorArgs.addExpression(new ConstructorCallExpression(new ClassNode(HashMap.class), EMPTY_TUPLE));
    mapBindingResultConstructorArgs.addExpression(new ConstantExpression("controller"));
    final Expression mapBindingResultConstructorCallExpression = new ConstructorCallExpression(new ClassNode(MapBindingResult.class), mapBindingResultConstructorArgs);
    final Expression errorsAssignmentExpression = buildSetPropertyExpression(new VariableExpression("this", classNode), "errors", classNode, mapBindingResultConstructorCallExpression);
    wrapper.addStatement(new ExpressionStatement(errorsAssignmentExpression));
    if (actionParameters != null) {
        for (Parameter param : actionParameters) {
            initializeMethodParameter(classNode, wrapper, actionNode, actionName, param, source, context);
        }
    }
    return wrapper;
}
Also used : ListExpression(org.codehaus.groovy.ast.expr.ListExpression) MapExpression(org.codehaus.groovy.ast.expr.MapExpression) ConstantExpression(org.codehaus.groovy.ast.expr.ConstantExpression) GrailsASTUtils.buildGetPropertyExpression(org.grails.compiler.injection.GrailsASTUtils.buildGetPropertyExpression) GrailsASTUtils.buildSetPropertyExpression(org.grails.compiler.injection.GrailsASTUtils.buildSetPropertyExpression) VariableExpression(org.codehaus.groovy.ast.expr.VariableExpression) ArgumentListExpression(org.codehaus.groovy.ast.expr.ArgumentListExpression) BinaryExpression(org.codehaus.groovy.ast.expr.BinaryExpression) TernaryExpression(org.codehaus.groovy.ast.expr.TernaryExpression) BooleanExpression(org.codehaus.groovy.ast.expr.BooleanExpression) PropertyExpression(org.codehaus.groovy.ast.expr.PropertyExpression) StaticMethodCallExpression(org.codehaus.groovy.ast.expr.StaticMethodCallExpression) MethodCallExpression(org.codehaus.groovy.ast.expr.MethodCallExpression) EmptyExpression(org.codehaus.groovy.ast.expr.EmptyExpression) Expression(org.codehaus.groovy.ast.expr.Expression) ConstructorCallExpression(org.codehaus.groovy.ast.expr.ConstructorCallExpression) GrailsASTUtils.buildGetMapExpression(org.grails.compiler.injection.GrailsASTUtils.buildGetMapExpression) DeclarationExpression(org.codehaus.groovy.ast.expr.DeclarationExpression) ClosureExpression(org.codehaus.groovy.ast.expr.ClosureExpression) ClassExpression(org.codehaus.groovy.ast.expr.ClassExpression) TupleExpression(org.codehaus.groovy.ast.expr.TupleExpression) MapEntryExpression(org.codehaus.groovy.ast.expr.MapEntryExpression) ConstructorCallExpression(org.codehaus.groovy.ast.expr.ConstructorCallExpression) ConstantExpression(org.codehaus.groovy.ast.expr.ConstantExpression) ExpressionStatement(org.codehaus.groovy.ast.stmt.ExpressionStatement) ArgumentListExpression(org.codehaus.groovy.ast.expr.ArgumentListExpression) RequestParameter(grails.web.RequestParameter) BlockStatement(org.codehaus.groovy.ast.stmt.BlockStatement) MapBindingResult(org.springframework.validation.MapBindingResult) VariableExpression(org.codehaus.groovy.ast.expr.VariableExpression)

Aggregations

ArgumentListExpression (org.codehaus.groovy.ast.expr.ArgumentListExpression)108 MethodCallExpression (org.codehaus.groovy.ast.expr.MethodCallExpression)73 VariableExpression (org.codehaus.groovy.ast.expr.VariableExpression)72 ConstantExpression (org.codehaus.groovy.ast.expr.ConstantExpression)66 Expression (org.codehaus.groovy.ast.expr.Expression)61 ClassExpression (org.codehaus.groovy.ast.expr.ClassExpression)50 BinaryExpression (org.codehaus.groovy.ast.expr.BinaryExpression)49 ClassNode (org.codehaus.groovy.ast.ClassNode)38 ExpressionStatement (org.codehaus.groovy.ast.stmt.ExpressionStatement)38 ConstructorCallExpression (org.codehaus.groovy.ast.expr.ConstructorCallExpression)36 ClosureExpression (org.codehaus.groovy.ast.expr.ClosureExpression)34 StaticMethodCallExpression (org.codehaus.groovy.ast.expr.StaticMethodCallExpression)33 TupleExpression (org.codehaus.groovy.ast.expr.TupleExpression)32 BooleanExpression (org.codehaus.groovy.ast.expr.BooleanExpression)28 DeclarationExpression (org.codehaus.groovy.ast.expr.DeclarationExpression)28 BlockStatement (org.codehaus.groovy.ast.stmt.BlockStatement)28 PropertyExpression (org.codehaus.groovy.ast.expr.PropertyExpression)27 CastExpression (org.codehaus.groovy.ast.expr.CastExpression)26 MethodNode (org.codehaus.groovy.ast.MethodNode)23 ReturnStatement (org.codehaus.groovy.ast.stmt.ReturnStatement)22