Search in sources :

Example 71 with ListExpression

use of org.codehaus.groovy.ast.expr.ListExpression in project groovy by apache.

the class StaticTypeCheckingVisitor method addListAssignmentConstructorErrors.

private void addListAssignmentConstructorErrors(final ClassNode leftRedirect, final ClassNode leftExpressionType, final ClassNode inferredRightExpressionType, final Expression rightExpression, final Expression assignmentExpression) {
    // GROOVY-6802, GROOVY-6803
    if (isWildcardLeftHandSide(leftRedirect) && !isClassType(leftRedirect))
        return;
    // In that case, more checks can be performed
    if (!implementsInterfaceOrIsSubclassOf(LIST_TYPE, leftRedirect) && (!leftRedirect.isAbstract() || leftRedirect.isArray()) && !ArrayList_TYPE.isDerivedFrom(leftRedirect) && !LinkedHashSet_TYPE.isDerivedFrom(leftRedirect)) {
        ClassNode[] types = getArgumentTypes(args(((ListExpression) rightExpression).getExpressions()));
        MethodNode methodNode = checkGroovyStyleConstructor(leftRedirect, types, assignmentExpression);
        if (methodNode != null) {
            rightExpression.putNodeMetaData(DIRECT_METHOD_CALL_TARGET, methodNode);
        }
    } else if (implementsInterfaceOrIsSubclassOf(inferredRightExpressionType, LIST_TYPE) && !implementsInterfaceOrIsSubclassOf(inferredRightExpressionType, leftRedirect)) {
        if (!extension.handleIncompatibleAssignment(leftExpressionType, inferredRightExpressionType, assignmentExpression)) {
            addAssignmentError(leftExpressionType, inferredRightExpressionType, assignmentExpression);
        }
    }
}
Also used : StaticTypeCheckingSupport.findDGMMethodsForClassNode(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.findDGMMethodsForClassNode) ClassNode(org.codehaus.groovy.ast.ClassNode) InnerClassNode(org.codehaus.groovy.ast.InnerClassNode) MethodNode(org.codehaus.groovy.ast.MethodNode) ClosureListExpression(org.codehaus.groovy.ast.expr.ClosureListExpression) ArgumentListExpression(org.codehaus.groovy.ast.expr.ArgumentListExpression) ListExpression(org.codehaus.groovy.ast.expr.ListExpression)

Example 72 with ListExpression

use of org.codehaus.groovy.ast.expr.ListExpression in project groovy by apache.

the class StaticTypeCheckingVisitor method typeCheckMultipleAssignmentAndContinue.

private boolean typeCheckMultipleAssignmentAndContinue(final Expression leftExpression, Expression rightExpression) {
    if (rightExpression instanceof VariableExpression || rightExpression instanceof PropertyExpression || rightExpression instanceof MethodCall) {
        ClassNode inferredType = Optional.ofNullable(getType(rightExpression)).orElseGet(rightExpression::getType);
        GenericsType[] genericsTypes = inferredType.getGenericsTypes();
        ListExpression listExpression = new ListExpression();
        listExpression.setSourcePosition(rightExpression);
        // convert Tuple[1-16] bearing expressions to mock list for checking
        for (int n = TUPLE_TYPES.indexOf(inferredType), i = 0; i < n; i += 1) {
            ClassNode type = (genericsTypes != null ? genericsTypes[i].getType() : OBJECT_TYPE);
            listExpression.addExpression(varX("v" + (i + 1), type));
        }
        if (!listExpression.getExpressions().isEmpty()) {
            rightExpression = listExpression;
        }
    }
    if (!(rightExpression instanceof ListExpression)) {
        addStaticTypeError("Multiple assignments without list or tuple on the right-hand side are unsupported in static type checking mode", rightExpression);
        return false;
    }
    TupleExpression tuple = (TupleExpression) leftExpression;
    ListExpression values = (ListExpression) rightExpression;
    List<Expression> tupleExpressions = tuple.getExpressions();
    List<Expression> valueExpressions = values.getExpressions();
    if (tupleExpressions.size() > valueExpressions.size()) {
        addStaticTypeError("Incorrect number of values. Expected:" + tupleExpressions.size() + " Was:" + valueExpressions.size(), values);
        return false;
    }
    for (int i = 0, n = tupleExpressions.size(); i < n; i += 1) {
        ClassNode valueType = getType(valueExpressions.get(i));
        ClassNode targetType = getType(tupleExpressions.get(i));
        if (!isAssignableTo(valueType, targetType)) {
            addStaticTypeError("Cannot assign value of type " + prettyPrintType(valueType) + " to variable of type " + prettyPrintType(targetType), rightExpression);
            return false;
        }
        storeType(tupleExpressions.get(i), valueType);
    }
    return true;
}
Also used : StaticTypeCheckingSupport.findDGMMethodsForClassNode(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.findDGMMethodsForClassNode) ClassNode(org.codehaus.groovy.ast.ClassNode) InnerClassNode(org.codehaus.groovy.ast.InnerClassNode) UnaryMinusExpression(org.codehaus.groovy.ast.expr.UnaryMinusExpression) ClosureListExpression(org.codehaus.groovy.ast.expr.ClosureListExpression) ArgumentListExpression(org.codehaus.groovy.ast.expr.ArgumentListExpression) MethodReferenceExpression(org.codehaus.groovy.ast.expr.MethodReferenceExpression) TernaryExpression(org.codehaus.groovy.ast.expr.TernaryExpression) PropertyExpression(org.codehaus.groovy.ast.expr.PropertyExpression) PrefixExpression(org.codehaus.groovy.ast.expr.PrefixExpression) PostfixExpression(org.codehaus.groovy.ast.expr.PostfixExpression) Expression(org.codehaus.groovy.ast.expr.Expression) UnaryPlusExpression(org.codehaus.groovy.ast.expr.UnaryPlusExpression) AnnotationConstantExpression(org.codehaus.groovy.ast.expr.AnnotationConstantExpression) BitwiseNegationExpression(org.codehaus.groovy.ast.expr.BitwiseNegationExpression) MapExpression(org.codehaus.groovy.ast.expr.MapExpression) ConstantExpression(org.codehaus.groovy.ast.expr.ConstantExpression) StaticTypeCheckingSupport.evaluateExpression(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.evaluateExpression) NotExpression(org.codehaus.groovy.ast.expr.NotExpression) FieldExpression(org.codehaus.groovy.ast.expr.FieldExpression) EmptyExpression(org.codehaus.groovy.ast.expr.EmptyExpression) ConstructorCallExpression(org.codehaus.groovy.ast.expr.ConstructorCallExpression) ClassExpression(org.codehaus.groovy.ast.expr.ClassExpression) TupleExpression(org.codehaus.groovy.ast.expr.TupleExpression) MethodPointerExpression(org.codehaus.groovy.ast.expr.MethodPointerExpression) MapEntryExpression(org.codehaus.groovy.ast.expr.MapEntryExpression) VariableExpression(org.codehaus.groovy.ast.expr.VariableExpression) CastExpression(org.codehaus.groovy.ast.expr.CastExpression) StaticMethodCallExpression(org.codehaus.groovy.ast.expr.StaticMethodCallExpression) LambdaExpression(org.codehaus.groovy.ast.expr.LambdaExpression) ListExpression(org.codehaus.groovy.ast.expr.ListExpression) RangeExpression(org.codehaus.groovy.ast.expr.RangeExpression) SpreadExpression(org.codehaus.groovy.ast.expr.SpreadExpression) ArrayExpression(org.codehaus.groovy.ast.expr.ArrayExpression) BinaryExpression(org.codehaus.groovy.ast.expr.BinaryExpression) ElvisOperatorExpression(org.codehaus.groovy.ast.expr.ElvisOperatorExpression) MethodCallExpression(org.codehaus.groovy.ast.expr.MethodCallExpression) DeclarationExpression(org.codehaus.groovy.ast.expr.DeclarationExpression) ClosureExpression(org.codehaus.groovy.ast.expr.ClosureExpression) AttributeExpression(org.codehaus.groovy.ast.expr.AttributeExpression) ClosureListExpression(org.codehaus.groovy.ast.expr.ClosureListExpression) ArgumentListExpression(org.codehaus.groovy.ast.expr.ArgumentListExpression) ListExpression(org.codehaus.groovy.ast.expr.ListExpression) GenericsType(org.codehaus.groovy.ast.GenericsType) StaticTypeCheckingSupport.getCombinedGenericsType(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.getCombinedGenericsType) TupleExpression(org.codehaus.groovy.ast.expr.TupleExpression) VariableExpression(org.codehaus.groovy.ast.expr.VariableExpression) PropertyExpression(org.codehaus.groovy.ast.expr.PropertyExpression) MethodCall(org.codehaus.groovy.ast.expr.MethodCall) ClosureSignatureHint(groovy.transform.stc.ClosureSignatureHint)

Example 73 with ListExpression

use of org.codehaus.groovy.ast.expr.ListExpression in project groovy by apache.

the class AsmClassGenerator method containsSpreadExpression.

public static boolean containsSpreadExpression(final Expression arguments) {
    List<Expression> args;
    if (arguments instanceof TupleExpression) {
        TupleExpression tupleExpression = (TupleExpression) arguments;
        args = tupleExpression.getExpressions();
    } else if (arguments instanceof ListExpression) {
        ListExpression le = (ListExpression) arguments;
        args = le.getExpressions();
    } else {
        return arguments instanceof SpreadExpression;
    }
    for (Expression arg : args) {
        if (arg instanceof SpreadExpression)
            return true;
    }
    return false;
}
Also used : UnaryMinusExpression(org.codehaus.groovy.ast.expr.UnaryMinusExpression) ClosureListExpression(org.codehaus.groovy.ast.expr.ClosureListExpression) ArgumentListExpression(org.codehaus.groovy.ast.expr.ArgumentListExpression) MethodReferenceExpression(org.codehaus.groovy.ast.expr.MethodReferenceExpression) TernaryExpression(org.codehaus.groovy.ast.expr.TernaryExpression) PropertyExpression(org.codehaus.groovy.ast.expr.PropertyExpression) PrefixExpression(org.codehaus.groovy.ast.expr.PrefixExpression) PostfixExpression(org.codehaus.groovy.ast.expr.PostfixExpression) Expression(org.codehaus.groovy.ast.expr.Expression) UnaryPlusExpression(org.codehaus.groovy.ast.expr.UnaryPlusExpression) AnnotationConstantExpression(org.codehaus.groovy.ast.expr.AnnotationConstantExpression) BitwiseNegationExpression(org.codehaus.groovy.ast.expr.BitwiseNegationExpression) MapExpression(org.codehaus.groovy.ast.expr.MapExpression) ConstantExpression(org.codehaus.groovy.ast.expr.ConstantExpression) NotExpression(org.codehaus.groovy.ast.expr.NotExpression) FieldExpression(org.codehaus.groovy.ast.expr.FieldExpression) EmptyExpression(org.codehaus.groovy.ast.expr.EmptyExpression) ConstructorCallExpression(org.codehaus.groovy.ast.expr.ConstructorCallExpression) ClassExpression(org.codehaus.groovy.ast.expr.ClassExpression) TupleExpression(org.codehaus.groovy.ast.expr.TupleExpression) MethodPointerExpression(org.codehaus.groovy.ast.expr.MethodPointerExpression) MapEntryExpression(org.codehaus.groovy.ast.expr.MapEntryExpression) VariableExpression(org.codehaus.groovy.ast.expr.VariableExpression) CastExpression(org.codehaus.groovy.ast.expr.CastExpression) BooleanExpression(org.codehaus.groovy.ast.expr.BooleanExpression) StaticMethodCallExpression(org.codehaus.groovy.ast.expr.StaticMethodCallExpression) LambdaExpression(org.codehaus.groovy.ast.expr.LambdaExpression) GStringExpression(org.codehaus.groovy.ast.expr.GStringExpression) ListExpression(org.codehaus.groovy.ast.expr.ListExpression) RangeExpression(org.codehaus.groovy.ast.expr.RangeExpression) SpreadExpression(org.codehaus.groovy.ast.expr.SpreadExpression) ArrayExpression(org.codehaus.groovy.ast.expr.ArrayExpression) BinaryExpression(org.codehaus.groovy.ast.expr.BinaryExpression) MethodCallExpression(org.codehaus.groovy.ast.expr.MethodCallExpression) SpreadMapExpression(org.codehaus.groovy.ast.expr.SpreadMapExpression) DeclarationExpression(org.codehaus.groovy.ast.expr.DeclarationExpression) ClosureExpression(org.codehaus.groovy.ast.expr.ClosureExpression) AttributeExpression(org.codehaus.groovy.ast.expr.AttributeExpression) ClosureListExpression(org.codehaus.groovy.ast.expr.ClosureListExpression) ArgumentListExpression(org.codehaus.groovy.ast.expr.ArgumentListExpression) ListExpression(org.codehaus.groovy.ast.expr.ListExpression) TupleExpression(org.codehaus.groovy.ast.expr.TupleExpression) SpreadExpression(org.codehaus.groovy.ast.expr.SpreadExpression)

Example 74 with ListExpression

use of org.codehaus.groovy.ast.expr.ListExpression in project groovy by apache.

the class AsmClassGenerator method visitArrayAttributes.

private void visitArrayAttributes(final AnnotationNode an, final Map<String, ListExpression> arrayAttr, final AnnotationVisitor av) {
    if (arrayAttr.isEmpty())
        return;
    for (Map.Entry<String, ListExpression> entry : arrayAttr.entrySet()) {
        AnnotationVisitor av2 = av.visitArray(entry.getKey());
        List<Expression> values = entry.getValue().getExpressions();
        if (!values.isEmpty()) {
            int arrayElementType = determineCommonArrayType(values);
            for (Expression exprChild : values) {
                visitAnnotationArrayElement(exprChild, arrayElementType, av2);
            }
        }
        av2.visitEnd();
    }
}
Also used : UnaryMinusExpression(org.codehaus.groovy.ast.expr.UnaryMinusExpression) ClosureListExpression(org.codehaus.groovy.ast.expr.ClosureListExpression) ArgumentListExpression(org.codehaus.groovy.ast.expr.ArgumentListExpression) MethodReferenceExpression(org.codehaus.groovy.ast.expr.MethodReferenceExpression) TernaryExpression(org.codehaus.groovy.ast.expr.TernaryExpression) PropertyExpression(org.codehaus.groovy.ast.expr.PropertyExpression) PrefixExpression(org.codehaus.groovy.ast.expr.PrefixExpression) PostfixExpression(org.codehaus.groovy.ast.expr.PostfixExpression) Expression(org.codehaus.groovy.ast.expr.Expression) UnaryPlusExpression(org.codehaus.groovy.ast.expr.UnaryPlusExpression) AnnotationConstantExpression(org.codehaus.groovy.ast.expr.AnnotationConstantExpression) BitwiseNegationExpression(org.codehaus.groovy.ast.expr.BitwiseNegationExpression) MapExpression(org.codehaus.groovy.ast.expr.MapExpression) ConstantExpression(org.codehaus.groovy.ast.expr.ConstantExpression) NotExpression(org.codehaus.groovy.ast.expr.NotExpression) FieldExpression(org.codehaus.groovy.ast.expr.FieldExpression) EmptyExpression(org.codehaus.groovy.ast.expr.EmptyExpression) ConstructorCallExpression(org.codehaus.groovy.ast.expr.ConstructorCallExpression) ClassExpression(org.codehaus.groovy.ast.expr.ClassExpression) TupleExpression(org.codehaus.groovy.ast.expr.TupleExpression) MethodPointerExpression(org.codehaus.groovy.ast.expr.MethodPointerExpression) MapEntryExpression(org.codehaus.groovy.ast.expr.MapEntryExpression) VariableExpression(org.codehaus.groovy.ast.expr.VariableExpression) CastExpression(org.codehaus.groovy.ast.expr.CastExpression) BooleanExpression(org.codehaus.groovy.ast.expr.BooleanExpression) StaticMethodCallExpression(org.codehaus.groovy.ast.expr.StaticMethodCallExpression) LambdaExpression(org.codehaus.groovy.ast.expr.LambdaExpression) GStringExpression(org.codehaus.groovy.ast.expr.GStringExpression) ListExpression(org.codehaus.groovy.ast.expr.ListExpression) RangeExpression(org.codehaus.groovy.ast.expr.RangeExpression) SpreadExpression(org.codehaus.groovy.ast.expr.SpreadExpression) ArrayExpression(org.codehaus.groovy.ast.expr.ArrayExpression) BinaryExpression(org.codehaus.groovy.ast.expr.BinaryExpression) MethodCallExpression(org.codehaus.groovy.ast.expr.MethodCallExpression) SpreadMapExpression(org.codehaus.groovy.ast.expr.SpreadMapExpression) DeclarationExpression(org.codehaus.groovy.ast.expr.DeclarationExpression) ClosureExpression(org.codehaus.groovy.ast.expr.ClosureExpression) AttributeExpression(org.codehaus.groovy.ast.expr.AttributeExpression) ClosureListExpression(org.codehaus.groovy.ast.expr.ClosureListExpression) ArgumentListExpression(org.codehaus.groovy.ast.expr.ArgumentListExpression) ListExpression(org.codehaus.groovy.ast.expr.ListExpression) AnnotationVisitor(org.objectweb.asm.AnnotationVisitor) Map(java.util.Map) HashMap(java.util.HashMap)

Example 75 with ListExpression

use of org.codehaus.groovy.ast.expr.ListExpression in project groovy by apache.

the class AsmClassGenerator method visitAnnotationAttributes.

/**
 * Generates the annotation attributes.
 *
 * @param an the node with an annotation
 * @param av the visitor to use
 */
private void visitAnnotationAttributes(final AnnotationNode an, final AnnotationVisitor av) {
    Map<String, Object> constantAttrs = new HashMap<>();
    Map<String, PropertyExpression> enumAttrs = new HashMap<>();
    Map<String, Object> atAttrs = new HashMap<>();
    Map<String, ListExpression> arrayAttrs = new HashMap<>();
    for (Map.Entry<String, Expression> member : an.getMembers().entrySet()) {
        String name = member.getKey();
        Expression expr = member.getValue();
        if (expr instanceof AnnotationConstantExpression) {
            atAttrs.put(name, ((AnnotationConstantExpression) expr).getValue());
        } else if (expr instanceof ConstantExpression) {
            constantAttrs.put(name, ((ConstantExpression) expr).getValue());
        } else if (expr instanceof ClassExpression) {
            constantAttrs.put(name, Type.getType(BytecodeHelper.getTypeDescription((expr.getType()))));
        } else if (expr instanceof PropertyExpression) {
            enumAttrs.put(name, (PropertyExpression) expr);
        } else if (expr instanceof ListExpression) {
            arrayAttrs.put(name, (ListExpression) expr);
        } else if (expr instanceof ClosureExpression) {
            ClassNode closureClass = controller.getClosureWriter().getOrAddClosureClass((ClosureExpression) expr, ACC_PUBLIC);
            constantAttrs.put(name, Type.getType(BytecodeHelper.getTypeDescription(closureClass)));
        }
    }
    for (Map.Entry<String, Object> entry : constantAttrs.entrySet()) {
        av.visit(entry.getKey(), entry.getValue());
    }
    for (Map.Entry<String, PropertyExpression> entry : enumAttrs.entrySet()) {
        PropertyExpression propExp = entry.getValue();
        av.visitEnum(entry.getKey(), BytecodeHelper.getTypeDescription(propExp.getObjectExpression().getType()), String.valueOf(((ConstantExpression) propExp.getProperty()).getValue()));
    }
    for (Map.Entry<String, Object> entry : atAttrs.entrySet()) {
        AnnotationNode atNode = (AnnotationNode) entry.getValue();
        AnnotationVisitor av2 = av.visitAnnotation(entry.getKey(), BytecodeHelper.getTypeDescription(atNode.getClassNode()));
        visitAnnotationAttributes(atNode, av2);
        av2.visitEnd();
    }
    visitArrayAttributes(an, arrayAttrs, av);
}
Also used : InterfaceHelperClassNode(org.codehaus.groovy.ast.InterfaceHelperClassNode) ClassNode(org.codehaus.groovy.ast.ClassNode) InnerClassNode(org.codehaus.groovy.ast.InnerClassNode) HashMap(java.util.HashMap) AnnotationConstantExpression(org.codehaus.groovy.ast.expr.AnnotationConstantExpression) ClosureListExpression(org.codehaus.groovy.ast.expr.ClosureListExpression) ArgumentListExpression(org.codehaus.groovy.ast.expr.ArgumentListExpression) ListExpression(org.codehaus.groovy.ast.expr.ListExpression) AnnotationConstantExpression(org.codehaus.groovy.ast.expr.AnnotationConstantExpression) ConstantExpression(org.codehaus.groovy.ast.expr.ConstantExpression) ClassExpression(org.codehaus.groovy.ast.expr.ClassExpression) UnaryMinusExpression(org.codehaus.groovy.ast.expr.UnaryMinusExpression) ClosureListExpression(org.codehaus.groovy.ast.expr.ClosureListExpression) ArgumentListExpression(org.codehaus.groovy.ast.expr.ArgumentListExpression) MethodReferenceExpression(org.codehaus.groovy.ast.expr.MethodReferenceExpression) TernaryExpression(org.codehaus.groovy.ast.expr.TernaryExpression) PropertyExpression(org.codehaus.groovy.ast.expr.PropertyExpression) PrefixExpression(org.codehaus.groovy.ast.expr.PrefixExpression) PostfixExpression(org.codehaus.groovy.ast.expr.PostfixExpression) Expression(org.codehaus.groovy.ast.expr.Expression) UnaryPlusExpression(org.codehaus.groovy.ast.expr.UnaryPlusExpression) AnnotationConstantExpression(org.codehaus.groovy.ast.expr.AnnotationConstantExpression) BitwiseNegationExpression(org.codehaus.groovy.ast.expr.BitwiseNegationExpression) MapExpression(org.codehaus.groovy.ast.expr.MapExpression) ConstantExpression(org.codehaus.groovy.ast.expr.ConstantExpression) NotExpression(org.codehaus.groovy.ast.expr.NotExpression) FieldExpression(org.codehaus.groovy.ast.expr.FieldExpression) EmptyExpression(org.codehaus.groovy.ast.expr.EmptyExpression) ConstructorCallExpression(org.codehaus.groovy.ast.expr.ConstructorCallExpression) ClassExpression(org.codehaus.groovy.ast.expr.ClassExpression) TupleExpression(org.codehaus.groovy.ast.expr.TupleExpression) MethodPointerExpression(org.codehaus.groovy.ast.expr.MethodPointerExpression) MapEntryExpression(org.codehaus.groovy.ast.expr.MapEntryExpression) VariableExpression(org.codehaus.groovy.ast.expr.VariableExpression) CastExpression(org.codehaus.groovy.ast.expr.CastExpression) BooleanExpression(org.codehaus.groovy.ast.expr.BooleanExpression) StaticMethodCallExpression(org.codehaus.groovy.ast.expr.StaticMethodCallExpression) LambdaExpression(org.codehaus.groovy.ast.expr.LambdaExpression) GStringExpression(org.codehaus.groovy.ast.expr.GStringExpression) ListExpression(org.codehaus.groovy.ast.expr.ListExpression) RangeExpression(org.codehaus.groovy.ast.expr.RangeExpression) SpreadExpression(org.codehaus.groovy.ast.expr.SpreadExpression) ArrayExpression(org.codehaus.groovy.ast.expr.ArrayExpression) BinaryExpression(org.codehaus.groovy.ast.expr.BinaryExpression) MethodCallExpression(org.codehaus.groovy.ast.expr.MethodCallExpression) SpreadMapExpression(org.codehaus.groovy.ast.expr.SpreadMapExpression) DeclarationExpression(org.codehaus.groovy.ast.expr.DeclarationExpression) ClosureExpression(org.codehaus.groovy.ast.expr.ClosureExpression) AttributeExpression(org.codehaus.groovy.ast.expr.AttributeExpression) AnnotationNode(org.codehaus.groovy.ast.AnnotationNode) AnnotationVisitor(org.objectweb.asm.AnnotationVisitor) PropertyExpression(org.codehaus.groovy.ast.expr.PropertyExpression) ClosureExpression(org.codehaus.groovy.ast.expr.ClosureExpression) Map(java.util.Map) HashMap(java.util.HashMap)

Aggregations

ListExpression (org.codehaus.groovy.ast.expr.ListExpression)103 ConstantExpression (org.codehaus.groovy.ast.expr.ConstantExpression)77 Expression (org.codehaus.groovy.ast.expr.Expression)77 ClassExpression (org.codehaus.groovy.ast.expr.ClassExpression)70 VariableExpression (org.codehaus.groovy.ast.expr.VariableExpression)53 ClassNode (org.codehaus.groovy.ast.ClassNode)49 ArgumentListExpression (org.codehaus.groovy.ast.expr.ArgumentListExpression)43 PropertyExpression (org.codehaus.groovy.ast.expr.PropertyExpression)42 MapExpression (org.codehaus.groovy.ast.expr.MapExpression)38 MethodCallExpression (org.codehaus.groovy.ast.expr.MethodCallExpression)38 ArrayExpression (org.codehaus.groovy.ast.expr.ArrayExpression)37 BinaryExpression (org.codehaus.groovy.ast.expr.BinaryExpression)32 ConstructorCallExpression (org.codehaus.groovy.ast.expr.ConstructorCallExpression)32 ArrayList (java.util.ArrayList)31 ClosureExpression (org.codehaus.groovy.ast.expr.ClosureExpression)30 DeclarationExpression (org.codehaus.groovy.ast.expr.DeclarationExpression)28 AnnotationConstantExpression (org.codehaus.groovy.ast.expr.AnnotationConstantExpression)25 TupleExpression (org.codehaus.groovy.ast.expr.TupleExpression)25 MapEntryExpression (org.codehaus.groovy.ast.expr.MapEntryExpression)23 CastExpression (org.codehaus.groovy.ast.expr.CastExpression)22