Search in sources :

Example 1 with LambdaExpression

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

the class StaticTypesLambdaWriter method getOrAddLambdaClass.

private ClassNode getOrAddLambdaClass(final LambdaExpression expression, final int modifiers, final MethodNode abstractMethod) {
    return lambdaClassNodes.computeIfAbsent(expression, key -> {
        ClassNode lambdaClass = createLambdaClass(expression, modifiers, abstractMethod);
        controller.getAcg().addInnerClass(lambdaClass);
        lambdaClass.addInterface(GENERATED_LAMBDA_TYPE);
        lambdaClass.putNodeMetaData(StaticCompilationMetadataKeys.STATIC_COMPILE_NODE, Boolean.TRUE);
        lambdaClass.putNodeMetaData(WriterControllerFactory.class, (WriterControllerFactory) x -> controller);
        return lambdaClass;
    });
}
Also used : MethodVisitor(org.objectweb.asm.MethodVisitor) WriterController(org.codehaus.groovy.classgen.asm.WriterController) LambdaWriter(org.codehaus.groovy.classgen.asm.LambdaWriter) GeneralUtils.classX(org.codehaus.groovy.ast.tools.GeneralUtils.classX) ClassHelper.findSAM(org.codehaus.groovy.ast.ClassHelper.findSAM) H_INVOKEVIRTUAL(org.objectweb.asm.Opcodes.H_INVOKEVIRTUAL) NEW(org.objectweb.asm.Opcodes.NEW) BytecodeHelper(org.codehaus.groovy.classgen.asm.BytecodeHelper) Map(java.util.Map) GeneralUtils.block(org.codehaus.groovy.ast.tools.GeneralUtils.block) VOID_TYPE(org.codehaus.groovy.ast.ClassHelper.VOID_TYPE) VariableExpression(org.codehaus.groovy.ast.expr.VariableExpression) AstStringCompiler(org.codehaus.groovy.ast.builder.AstStringCompiler) INVOKEVIRTUAL(org.objectweb.asm.Opcodes.INVOKEVIRTUAL) InnerClassNode(org.codehaus.groovy.ast.InnerClassNode) SERIALIZABLE_TYPE(org.codehaus.groovy.ast.ClassHelper.SERIALIZABLE_TYPE) GroovyBugError(org.codehaus.groovy.GroovyBugError) DUP(org.objectweb.asm.Opcodes.DUP) List(java.util.List) CompileStack(org.codehaus.groovy.classgen.asm.CompileStack) OBJECT_TYPE(org.codehaus.groovy.ast.ClassHelper.OBJECT_TYPE) BlockStatement(org.codehaus.groovy.ast.stmt.BlockStatement) ACC_PUBLIC(org.objectweb.asm.Opcodes.ACC_PUBLIC) Optional(java.util.Optional) ClassHelper.long_TYPE(org.codehaus.groovy.ast.ClassHelper.long_TYPE) Statement(org.codehaus.groovy.ast.stmt.Statement) GeneralUtils.constX(org.codehaus.groovy.ast.tools.GeneralUtils.constX) CodeVisitorSupport(org.codehaus.groovy.ast.CodeVisitorSupport) LambdaExpression(org.codehaus.groovy.ast.expr.LambdaExpression) ACC_FINAL(org.objectweb.asm.Opcodes.ACC_FINAL) ACC_PRIVATE(org.objectweb.asm.Opcodes.ACC_PRIVATE) HashMap(java.util.HashMap) GeneralUtils.declS(org.codehaus.groovy.ast.tools.GeneralUtils.declS) ACC_STATIC(org.objectweb.asm.Opcodes.ACC_STATIC) ClosureUtils.getParametersSafe(org.codehaus.groovy.ast.tools.ClosureUtils.getParametersSafe) GENERATED_LAMBDA_TYPE(org.codehaus.groovy.ast.ClassHelper.GENERATED_LAMBDA_TYPE) MethodNode(org.codehaus.groovy.ast.MethodNode) GeneralUtils.returnS(org.codehaus.groovy.ast.tools.GeneralUtils.returnS) CLOSURE_TYPE(org.codehaus.groovy.ast.ClassHelper.CLOSURE_TYPE) Expression(org.codehaus.groovy.ast.expr.Expression) SERIALIZEDLAMBDA_TYPE(org.codehaus.groovy.ast.ClassHelper.SERIALIZEDLAMBDA_TYPE) LinkedList(java.util.LinkedList) CHECKCAST(org.objectweb.asm.Opcodes.CHECKCAST) Parameter(org.codehaus.groovy.ast.Parameter) BytecodeInstruction(org.codehaus.groovy.classgen.BytecodeInstruction) ICONST_0(org.objectweb.asm.Opcodes.ICONST_0) ClassNode(org.codehaus.groovy.ast.ClassNode) OperandStack(org.codehaus.groovy.classgen.asm.OperandStack) GeneralUtils.cloneParams(org.codehaus.groovy.ast.tools.GeneralUtils.cloneParams) GeneralUtils.localVarX(org.codehaus.groovy.ast.tools.GeneralUtils.localVarX) StaticCompilationMetadataKeys(org.codehaus.groovy.transform.sc.StaticCompilationMetadataKeys) StaticTypesMarker(org.codehaus.groovy.transform.stc.StaticTypesMarker) ClosureExpression(org.codehaus.groovy.ast.expr.ClosureExpression) INVOKESPECIAL(org.objectweb.asm.Opcodes.INVOKESPECIAL) BytecodeSequence(org.codehaus.groovy.classgen.BytecodeSequence) WriterControllerFactory(org.codehaus.groovy.classgen.asm.WriterControllerFactory) ConstructorNode(org.codehaus.groovy.ast.ConstructorNode) ALOAD(org.objectweb.asm.Opcodes.ALOAD) InnerClassNode(org.codehaus.groovy.ast.InnerClassNode) ClassNode(org.codehaus.groovy.ast.ClassNode)

Example 2 with LambdaExpression

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

the class StaticTypesBinaryExpressionMultiTypeDispatcher method evaluateEqual.

@Override
public void evaluateEqual(final BinaryExpression expression, final boolean defineVariable) {
    Expression leftExpression = expression.getLeftExpression();
    if (!defineVariable) {
        if (leftExpression instanceof PropertyExpression) {
            PropertyExpression pexp = (PropertyExpression) leftExpression;
            if (makeSetProperty(pexp.getObjectExpression(), pexp.getProperty(), expression.getRightExpression(), pexp.isSafe(), pexp.isSpreadSafe(), pexp.isImplicitThis(), pexp instanceof AttributeExpression)) {
                return;
            }
        }
    } else {
        Expression rightExpression = expression.getRightExpression();
        if (rightExpression instanceof LambdaExpression || rightExpression instanceof MethodReferenceExpression) {
            rightExpression.putNodeMetaData(INFERRED_FUNCTIONAL_INTERFACE_TYPE, leftExpression.getNodeMetaData(INFERRED_TYPE));
        }
    }
    // GROOVY-5620: spread-safe operator on LHS is not supported
    if (leftExpression instanceof PropertyExpression && ((PropertyExpression) leftExpression).isSpreadSafe() && isAssignment(expression.getOperation().getType())) {
        // rewrite it so that it can be statically compiled
        transformSpreadOnLHS(expression);
        return;
    }
    super.evaluateEqual(expression, defineVariable);
}
Also used : MethodReferenceExpression(org.codehaus.groovy.ast.expr.MethodReferenceExpression) VariableExpression(org.codehaus.groovy.ast.expr.VariableExpression) ExpressionUtils.isThisExpression(org.apache.groovy.ast.tools.ExpressionUtils.isThisExpression) BinaryExpression(org.codehaus.groovy.ast.expr.BinaryExpression) MethodReferenceExpression(org.codehaus.groovy.ast.expr.MethodReferenceExpression) PropertyExpression(org.codehaus.groovy.ast.expr.PropertyExpression) LambdaExpression(org.codehaus.groovy.ast.expr.LambdaExpression) MethodCallExpression(org.codehaus.groovy.ast.expr.MethodCallExpression) Expression(org.codehaus.groovy.ast.expr.Expression) ConstructorCallExpression(org.codehaus.groovy.ast.expr.ConstructorCallExpression) AttributeExpression(org.codehaus.groovy.ast.expr.AttributeExpression) PropertyExpression(org.codehaus.groovy.ast.expr.PropertyExpression) AttributeExpression(org.codehaus.groovy.ast.expr.AttributeExpression) LambdaExpression(org.codehaus.groovy.ast.expr.LambdaExpression)

Example 3 with LambdaExpression

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

the class StaticTypeCheckingVisitor method checkReturnType.

protected ClassNode checkReturnType(final ReturnStatement statement) {
    Expression expression = statement.getExpression();
    ClassNode type = getType(expression);
    TypeCheckingContext.EnclosingClosure enclosingClosure = typeCheckingContext.getEnclosingClosure();
    if (enclosingClosure != null) {
        // re-visit
        if (enclosingClosure.getClosureExpression().getNodeMetaData(INFERRED_TYPE) != null)
            return null;
        ClassNode inferredReturnType = getInferredReturnType(enclosingClosure.getClosureExpression());
        // GROOVY-9995: return ctor call with diamond operator
        if (expression instanceof ConstructorCallExpression) {
            inferDiamondType((ConstructorCallExpression) expression, inferredReturnType != null ? inferredReturnType : /*GROOVY-10080:*/
            dynamicType());
        }
        if (inferredReturnType != null && !inferredReturnType.equals(type) && !isObjectType(inferredReturnType) && !isPrimitiveVoid(inferredReturnType) && !isPrimitiveBoolean(inferredReturnType) && !GenericsUtils.hasUnresolvedGenerics(inferredReturnType)) {
            if (isStringType(inferredReturnType) && isGStringOrGStringStringLUB(type)) {
                // GROOVY-9971: convert GString to String at point of return
                type = STRING_TYPE;
            } else if (GenericsUtils.buildWildcardType(wrapTypeIfNecessary(inferredReturnType)).isCompatibleWith(wrapTypeIfNecessary(type))) {
                // GROOVY-8310, GROOVY-10082, GROOVY-10091, GROOVY-10128, GROOVY-10306: allow simple covariance
                type = inferredReturnType;
            } else if (!isPrimitiveVoid(type) && !extension.handleIncompatibleReturnType(statement, type)) {
                // GROOVY-10277: incompatible return value
                addStaticTypeError("Cannot return value of type " + prettyPrintType(type) + " for " + (enclosingClosure.getClosureExpression() instanceof LambdaExpression ? "lambda" : "closure") + " expecting " + prettyPrintType(inferredReturnType), expression);
            }
        }
        return type;
    }
    MethodNode enclosingMethod = typeCheckingContext.getEnclosingMethod();
    if (enclosingMethod != null && !enclosingMethod.isVoidMethod() && !enclosingMethod.isDynamicReturnType()) {
        ClassNode returnType = enclosingMethod.getReturnType();
        if (!isPrimitiveVoid(getUnwrapper(type)) && !checkCompatibleAssignmentTypes(returnType, type, null, false)) {
            if (!extension.handleIncompatibleReturnType(statement, type)) {
                addStaticTypeError("Cannot return value of type " + prettyPrintType(type) + " for method returning " + prettyPrintType(returnType), expression);
            }
        } else if (implementsInterfaceOrIsSubclassOf(type, returnType)) {
            BinaryExpression dummy = assignX(varX("{target}", returnType), expression, statement);
            // GROOVY-10295
            ClassNode resultType = getResultType(returnType, ASSIGN, type, dummy);
            checkTypeGenerics(returnType, resultType, expression);
        }
    }
    return null;
}
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) BinaryExpression(org.codehaus.groovy.ast.expr.BinaryExpression) 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) ConstructorCallExpression(org.codehaus.groovy.ast.expr.ConstructorCallExpression) LambdaExpression(org.codehaus.groovy.ast.expr.LambdaExpression)

Example 4 with LambdaExpression

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

the class StaticTypeCheckingVisitor method inferParameterAndReturnTypesOfClosureOnRHS.

private void inferParameterAndReturnTypesOfClosureOnRHS(final ClassNode lhsType, final ClosureExpression rhsExpression) {
    Tuple2<ClassNode[], ClassNode> typeInfo = GenericsUtils.parameterizeSAM(lhsType);
    Parameter[] closureParameters = getParametersSafe(rhsExpression);
    ClassNode[] samParameterTypes = typeInfo.getV1();
    int n = closureParameters.length, m = samParameterTypes.length;
    if (n == m || (1 == m && hasImplicitParameter(rhsExpression))) {
        for (int i = 0; i < n; i += 1) {
            Parameter parameter = closureParameters[i];
            if (parameter.isDynamicTyped()) {
                parameter.setType(samParameterTypes[i]);
                parameter.setOriginType(samParameterTypes[i]);
            } else {
                checkParamType(parameter, samParameterTypes[i], i == n - 1, rhsExpression instanceof LambdaExpression);
            }
        }
    } else {
        addStaticTypeError("Wrong number of parameters for method target " + toMethodParametersString(findSAM(lhsType).getName(), samParameterTypes), rhsExpression);
    }
    storeInferredReturnType(rhsExpression, typeInfo.getV2());
}
Also used : StaticTypeCheckingSupport.findDGMMethodsForClassNode(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.findDGMMethodsForClassNode) ClassNode(org.codehaus.groovy.ast.ClassNode) InnerClassNode(org.codehaus.groovy.ast.InnerClassNode) ClosureUtils.hasImplicitParameter(org.codehaus.groovy.ast.tools.ClosureUtils.hasImplicitParameter) Parameter(org.codehaus.groovy.ast.Parameter) LambdaExpression(org.codehaus.groovy.ast.expr.LambdaExpression) ClosureSignatureHint(groovy.transform.stc.ClosureSignatureHint)

Example 5 with LambdaExpression

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

the class StaticTypeCheckingVisitor method inferMethodReferenceType.

private void inferMethodReferenceType(final ClassNode receiver, final ArgumentListExpression argumentList, final MethodNode selectedMethod) {
    if (receiver == null)
        return;
    if (argumentList == null)
        return;
    if (selectedMethod == null)
        return;
    List<Expression> argumentExpressions = argumentList.getExpressions();
    if (argumentExpressions == null || argumentExpressions.stream().noneMatch(e -> e instanceof MethodReferenceExpression)) {
        return;
    }
    Parameter[] parameters = selectedMethod.getParameters();
    final int nthParameter = parameters.length - 1;
    List<Integer> methodReferencePositions = new LinkedList<>();
    List<Expression> newArgumentExpressions = new LinkedList<>();
    for (int i = 0, n = argumentExpressions.size(); i < n; i += 1) {
        Expression argumentExpression = argumentExpressions.get(i);
        if (!(argumentExpression instanceof MethodReferenceExpression)) {
            newArgumentExpressions.add(argumentExpression);
        } else {
            // GROOVY-10336
            Parameter param = parameters[Math.min(i, nthParameter)];
            ClassNode paramType = param.getType();
            if (i >= nthParameter && paramType.isArray())
                paramType = paramType.getComponentType();
            if (!isFunctionalInterface(paramType.redirect())) {
                addError("The argument is a method reference, but the parameter type is not a functional interface", argumentExpression);
                newArgumentExpressions.add(argumentExpression);
            } else {
                methodReferencePositions.add(i);
                newArgumentExpressions.add(constructLambdaExpressionForMethodReference(paramType));
            }
        }
    }
    // GROOVY-10269
    if (methodReferencePositions.isEmpty())
        return;
    visitMethodCallArguments(receiver, args(newArgumentExpressions), true, selectedMethod);
    for (int index : methodReferencePositions) {
        Expression lambdaExpression = newArgumentExpressions.get(index);
        Expression methodReferenceExpression = argumentExpressions.get(index);
        methodReferenceExpression.putNodeMetaData(CLOSURE_ARGUMENTS, lambdaExpression.getNodeMetaData(CLOSURE_ARGUMENTS));
    }
}
Also used : BigInteger_TYPE(org.codehaus.groovy.ast.ClassHelper.BigInteger_TYPE) Enumeration(java.util.Enumeration) StaticTypeCheckingSupport.applyGenericsContext(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.applyGenericsContext) StaticTypeCheckingSupport.filterMethodsByVisibility(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.filterMethodsByVisibility) Character_TYPE(org.codehaus.groovy.ast.ClassHelper.Character_TYPE) LinkedHashSet_TYPE(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.LinkedHashSet_TYPE) InvocationWriter(org.codehaus.groovy.classgen.asm.InvocationWriter) StaticTypeCheckingSupport.chooseBestMethod(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.chooseBestMethod) StaticTypeCheckingSupport.fullyResolve(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.fullyResolve) Map(java.util.Map) GeneralUtils.propX(org.codehaus.groovy.ast.tools.GeneralUtils.propX) StaticTypeCheckingSupport.prettyPrintTypeName(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.prettyPrintTypeName) VOID_TYPE(org.codehaus.groovy.ast.ClassHelper.VOID_TYPE) PropertyNode(org.codehaus.groovy.ast.PropertyNode) COMPARE_TO(org.codehaus.groovy.syntax.Types.COMPARE_TO) UnaryMinusExpression(org.codehaus.groovy.ast.expr.UnaryMinusExpression) ClosureListExpression(org.codehaus.groovy.ast.expr.ClosureListExpression) PV_FIELDS_MUTATION(org.codehaus.groovy.transform.stc.StaticTypesMarker.PV_FIELDS_MUTATION) ClassHelper.isPrimitiveLong(org.codehaus.groovy.ast.ClassHelper.isPrimitiveLong) ArgumentListExpression(org.codehaus.groovy.ast.expr.ArgumentListExpression) StaticTypeCheckingSupport.findDGMMethodsForClassNode(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.findDGMMethodsForClassNode) MethodReferenceExpression(org.codehaus.groovy.ast.expr.MethodReferenceExpression) TernaryExpression(org.codehaus.groovy.ast.expr.TernaryExpression) OBJECT_TYPE(org.codehaus.groovy.ast.ClassHelper.OBJECT_TYPE) ClassHelper.byte_TYPE(org.codehaus.groovy.ast.ClassHelper.byte_TYPE) GeneralUtils.elvisX(org.codehaus.groovy.ast.tools.GeneralUtils.elvisX) STRING_TYPE(org.codehaus.groovy.ast.ClassHelper.STRING_TYPE) BeanUtils.decapitalize(org.apache.groovy.util.BeanUtils.decapitalize) ClassHelper.getWrapper(org.codehaus.groovy.ast.ClassHelper.getWrapper) COMPARE_NOT_IN(org.codehaus.groovy.syntax.Types.COMPARE_NOT_IN) StaticTypeCheckingSupport.isOperationInGroup(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.isOperationInGroup) COMPARE_EQUAL(org.codehaus.groovy.syntax.Types.COMPARE_EQUAL) GeneralUtils.isOrImplements(org.codehaus.groovy.ast.tools.GeneralUtils.isOrImplements) ClassHelper.isPrimitiveDouble(org.codehaus.groovy.ast.ClassHelper.isPrimitiveDouble) PropertyExpression(org.codehaus.groovy.ast.expr.PropertyExpression) ClassHelper.isWrapperInteger(org.codehaus.groovy.ast.ClassHelper.isWrapperInteger) DIVIDE_EQUAL(org.codehaus.groovy.syntax.Types.DIVIDE_EQUAL) StaticTypeCheckingSupport.getOperationName(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.getOperationName) IMPLICIT_RECEIVER(org.codehaus.groovy.transform.stc.StaticTypesMarker.IMPLICIT_RECEIVER) StaticTypeCheckingSupport.resolveClassNodeGenerics(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.resolveClassNodeGenerics) ClassHelper.isPrimitiveShort(org.codehaus.groovy.ast.ClassHelper.isPrimitiveShort) ClosureUtils.getParametersSafe(org.codehaus.groovy.ast.tools.ClosureUtils.getParametersSafe) ClassHelper.isWrapperDouble(org.codehaus.groovy.ast.ClassHelper.isWrapperDouble) Matcher_TYPE(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.Matcher_TYPE) LinkedHashMap(java.util.LinkedHashMap) PrefixExpression(org.codehaus.groovy.ast.expr.PrefixExpression) SystemUtil(org.apache.groovy.util.SystemUtil) ExpressionStatement(org.codehaus.groovy.ast.stmt.ExpressionStatement) PostfixExpression(org.codehaus.groovy.ast.expr.PostfixExpression) Expression(org.codehaus.groovy.ast.expr.Expression) ClassHelper.short_TYPE(org.codehaus.groovy.ast.ClassHelper.short_TYPE) StaticTypeCheckingSupport.isPowerOperator(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.isPowerOperator) Opcodes(org.objectweb.asm.Opcodes) UnaryPlusExpression(org.codehaus.groovy.ast.expr.UnaryPlusExpression) SourceUnit(org.codehaus.groovy.control.SourceUnit) ClassNode(org.codehaus.groovy.ast.ClassNode) ClassHelper.isStringType(org.codehaus.groovy.ast.ClassHelper.isStringType) ClassHelper.float_TYPE(org.codehaus.groovy.ast.ClassHelper.float_TYPE) ClassHelper.isPrimitiveInt(org.codehaus.groovy.ast.ClassHelper.isPrimitiveInt) GenericsType(org.codehaus.groovy.ast.GenericsType) ClassHelper.isPrimitiveBoolean(org.codehaus.groovy.ast.ClassHelper.isPrimitiveBoolean) GeneralUtils.castX(org.codehaus.groovy.ast.tools.GeneralUtils.castX) ReturnStatement(org.codehaus.groovy.ast.stmt.ReturnStatement) AnnotationConstantExpression(org.codehaus.groovy.ast.expr.AnnotationConstantExpression) UNKNOWN_PARAMETER_TYPE(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.UNKNOWN_PARAMETER_TYPE) AtomicLong(java.util.concurrent.atomic.AtomicLong) DYNAMIC_RESOLUTION(org.codehaus.groovy.transform.stc.StaticTypesMarker.DYNAMIC_RESOLUTION) BitwiseNegationExpression(org.codehaus.groovy.ast.expr.BitwiseNegationExpression) ClassHelper.isFunctionalInterface(org.codehaus.groovy.ast.ClassHelper.isFunctionalInterface) Float_TYPE(org.codehaus.groovy.ast.ClassHelper.Float_TYPE) CONSTRUCTED_LAMBDA_EXPRESSION(org.codehaus.groovy.transform.stc.StaticTypesMarker.CONSTRUCTED_LAMBDA_EXPRESSION) MapExpression(org.codehaus.groovy.ast.expr.MapExpression) ClassHelper.isGStringType(org.codehaus.groovy.ast.ClassHelper.isGStringType) GenericsTypeName(org.codehaus.groovy.ast.GenericsType.GenericsTypeName) AnnotatedNode(org.codehaus.groovy.ast.AnnotatedNode) ConstantExpression(org.codehaus.groovy.ast.expr.ConstantExpression) Long_TYPE(org.codehaus.groovy.ast.ClassHelper.Long_TYPE) StaticTypeCheckingSupport.extractGenericsParameterMapOfThis(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.extractGenericsParameterMapOfThis) StaticTypesTransformation(org.codehaus.groovy.transform.StaticTypesTransformation) GeneralUtils.getGetterName(org.codehaus.groovy.ast.tools.GeneralUtils.getGetterName) StaticTypeCheckingSupport.getCombinedBoundType(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.getCombinedBoundType) Number_TYPE(org.codehaus.groovy.ast.ClassHelper.Number_TYPE) MethodCall(org.codehaus.groovy.ast.expr.MethodCall) ClassHelper.isBigDecimalType(org.codehaus.groovy.ast.ClassHelper.isBigDecimalType) Collectors.toMap(java.util.stream.Collectors.toMap) StaticTypeCheckingSupport.evaluateExpression(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.evaluateExpression) INFERRED_TYPE(org.codehaus.groovy.transform.stc.StaticTypesMarker.INFERRED_TYPE) ForStatement(org.codehaus.groovy.ast.stmt.ForStatement) PV_FIELDS_ACCESS(org.codehaus.groovy.transform.stc.StaticTypesMarker.PV_FIELDS_ACCESS) StaticTypeCheckingSupport.findSetters(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.findSetters) Collection(java.util.Collection) DefaultGroovyMethods(org.codehaus.groovy.runtime.DefaultGroovyMethods) Collectors(java.util.stream.Collectors) NotExpression(org.codehaus.groovy.ast.expr.NotExpression) InnerClassNode(org.codehaus.groovy.ast.InnerClassNode) Short_TYPE(org.codehaus.groovy.ast.ClassHelper.Short_TYPE) Objects(java.util.Objects) StaticTypeCheckingSupport.findDGMMethodsByNameAndArguments(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.findDGMMethodsByNameAndArguments) IfStatement(org.codehaus.groovy.ast.stmt.IfStatement) FieldExpression(org.codehaus.groovy.ast.expr.FieldExpression) StaticTypeCheckingSupport.isBitOperator(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.isBitOperator) ClosureUtils.hasImplicitParameter(org.codehaus.groovy.ast.tools.ClosureUtils.hasImplicitParameter) StaticTypeCheckingSupport.isWildcardLeftHandSide(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.isWildcardLeftHandSide) BigDecimal_TYPE(org.codehaus.groovy.ast.ClassHelper.BigDecimal_TYPE) ClassHelper.isPrimitiveByte(org.codehaus.groovy.ast.ClassHelper.isPrimitiveByte) StaticTypeCheckingSupport.getCombinedGenericsType(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.getCombinedGenericsType) WideningCategories.isIntCategory(org.codehaus.groovy.ast.tools.WideningCategories.isIntCategory) DynamicVariable(org.codehaus.groovy.ast.DynamicVariable) Double_TYPE(org.codehaus.groovy.ast.ClassHelper.Double_TYPE) IntStream(java.util.stream.IntStream) StaticTypeCheckingSupport.isAssignableTo(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.isAssignableTo) ClosureSignatureHint(groovy.transform.stc.ClosureSignatureHint) AnnotationNode(org.codehaus.groovy.ast.AnnotationNode) StaticTypeCheckingSupport.isBeingCompiled(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.isBeingCompiled) StaticTypeCheckingSupport.typeCheckMethodsWithGenerics(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.typeCheckMethodsWithGenerics) DIVIDE(org.codehaus.groovy.syntax.Types.DIVIDE) Function(java.util.function.Function) ASSIGN(org.codehaus.groovy.syntax.Types.ASSIGN) HashSet(java.util.HashSet) ClassHelper.isNumberType(org.codehaus.groovy.ast.ClassHelper.isNumberType) BiPredicate(java.util.function.BiPredicate) ELVIS_EQUAL(org.codehaus.groovy.syntax.Types.ELVIS_EQUAL) NUMBER_OPS(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.NUMBER_OPS) Tuple2(groovy.lang.Tuple2) ClassHelper.boolean_TYPE(org.codehaus.groovy.ast.ClassHelper.boolean_TYPE) PV_METHODS_ACCESS(org.codehaus.groovy.transform.stc.StaticTypesMarker.PV_METHODS_ACCESS) ClassCodeVisitorSupport(org.codehaus.groovy.ast.ClassCodeVisitorSupport) StaticTypeCheckingSupport.checkPossibleLossOfPrecision(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.checkPossibleLossOfPrecision) GeneralUtils.varX(org.codehaus.groovy.ast.tools.GeneralUtils.varX) EmptyExpression(org.codehaus.groovy.ast.expr.EmptyExpression) LinkedList(java.util.LinkedList) StaticTypeCheckingSupport.typeCheckMethodArgumentWithGenerics(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.typeCheckMethodArgumentWithGenerics) ConstructorCallExpression(org.codehaus.groovy.ast.expr.ConstructorCallExpression) COMPARE_NOT_INSTANCEOF(org.codehaus.groovy.syntax.Types.COMPARE_NOT_INSTANCEOF) ClassHelper(org.codehaus.groovy.ast.ClassHelper) DECLARATION_INFERRED_TYPE(org.codehaus.groovy.transform.stc.StaticTypesMarker.DECLARATION_INFERRED_TYPE) SET_TYPE(org.codehaus.groovy.ast.ClassHelper.SET_TYPE) StaticTypeCheckingSupport.isArrayOp(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.isArrayOp) ClassExpression(org.codehaus.groovy.ast.expr.ClassExpression) ASTNode(org.codehaus.groovy.ast.ASTNode) TupleExpression(org.codehaus.groovy.ast.expr.TupleExpression) GeneralUtils.binX(org.codehaus.groovy.ast.tools.GeneralUtils.binX) TryCatchStatement(org.codehaus.groovy.ast.stmt.TryCatchStatement) GenericsUtils(org.codehaus.groovy.ast.tools.GenericsUtils) StringJoiner(java.util.StringJoiner) MethodPointerExpression(org.codehaus.groovy.ast.expr.MethodPointerExpression) StaticTypeCheckingSupport.allParametersAndArgumentsMatchWithDefaultParams(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.allParametersAndArgumentsMatchWithDefaultParams) ClassHelper.isWrapperCharacter(org.codehaus.groovy.ast.ClassHelper.isWrapperCharacter) ConstructorNode(org.codehaus.groovy.ast.ConstructorNode) MapEntryExpression(org.codehaus.groovy.ast.expr.MapEntryExpression) ClassHelper.isObjectType(org.codehaus.groovy.ast.ClassHelper.isObjectType) Arrays(java.util.Arrays) INFERRED_RETURN_TYPE(org.codehaus.groovy.transform.stc.StaticTypesMarker.INFERRED_RETURN_TYPE) StaticTypeCheckingSupport.checkCompatibleAssignmentTypes(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.checkCompatibleAssignmentTypes) Closure(groovy.lang.Closure) StaticTypeCheckingSupport.getGenericsWithoutArray(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.getGenericsWithoutArray) WideningCategories.isFloatingCategory(org.codehaus.groovy.ast.tools.WideningCategories.isFloatingCategory) StaticTypeCheckingSupport.isTraitSelf(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.isTraitSelf) RANGE_TYPE(org.codehaus.groovy.ast.ClassHelper.RANGE_TYPE) ClosureParams(groovy.transform.stc.ClosureParams) CLOSURE_ARGUMENTS(org.codehaus.groovy.transform.stc.StaticTypesMarker.CLOSURE_ARGUMENTS) INTDIV_EQUAL(org.codehaus.groovy.syntax.Types.INTDIV_EQUAL) StaticTypeCheckingSupport.extractGenericsConnections(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.extractGenericsConnections) CaseStatement(org.codehaus.groovy.ast.stmt.CaseStatement) ClassHelper.isBigIntegerType(org.codehaus.groovy.ast.ClassHelper.isBigIntegerType) Traits(org.codehaus.groovy.transform.trait.Traits) ClassHelper.char_TYPE(org.codehaus.groovy.ast.ClassHelper.char_TYPE) MINUS_MINUS(org.codehaus.groovy.syntax.Types.MINUS_MINUS) VariableExpression(org.codehaus.groovy.ast.expr.VariableExpression) EnumMap(java.util.EnumMap) LIST_TYPE(org.codehaus.groovy.ast.ClassHelper.LIST_TYPE) TypeCheckingMode(groovy.transform.TypeCheckingMode) BeanUtils.capitalize(org.apache.groovy.util.BeanUtils.capitalize) PATTERN_TYPE(org.codehaus.groovy.ast.ClassHelper.PATTERN_TYPE) NamedParams(groovy.transform.NamedParams) Set(java.util.Set) Token(org.codehaus.groovy.syntax.Token) ClassHelper.isPrimitiveVoid(org.codehaus.groovy.ast.ClassHelper.isPrimitiveVoid) ClassHelper.getUnwrapper(org.codehaus.groovy.ast.ClassHelper.getUnwrapper) GeneralUtils.callX(org.codehaus.groovy.ast.tools.GeneralUtils.callX) InvocationTargetException(java.lang.reflect.InvocationTargetException) WideningCategories.isFloat(org.codehaus.groovy.ast.tools.WideningCategories.isFloat) STREAM_TYPE(org.codehaus.groovy.ast.ClassHelper.STREAM_TYPE) CLASS_Type(org.codehaus.groovy.ast.ClassHelper.CLASS_Type) StaticTypeCheckingSupport.toMethodParametersString(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.toMethodParametersString) ClassHelper.isWrapperByte(org.codehaus.groovy.ast.ClassHelper.isWrapperByte) COMPARE_NOT_EQUAL(org.codehaus.groovy.syntax.Types.COMPARE_NOT_EQUAL) StaticTypeCheckingSupport.implementsInterfaceOrIsSubclassOf(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.implementsInterfaceOrIsSubclassOf) ClassHelper.getNextSuperClass(org.codehaus.groovy.ast.ClassHelper.getNextSuperClass) ClassHelper.isWrapperFloat(org.codehaus.groovy.ast.ClassHelper.isWrapperFloat) ClassHelper.dynamicType(org.codehaus.groovy.ast.ClassHelper.dynamicType) ClassHelper.long_TYPE(org.codehaus.groovy.ast.ClassHelper.long_TYPE) LinkedHashMap_TYPE(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.LinkedHashMap_TYPE) StaticTypeCheckingSupport.isBoolIntrinsicOp(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.isBoolIntrinsicOp) CastExpression(org.codehaus.groovy.ast.expr.CastExpression) StaticTypeCheckingSupport.boundUnboundedWildcards(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.boundUnboundedWildcards) ReturnAdder(org.codehaus.groovy.classgen.ReturnAdder) INTDIV(org.codehaus.groovy.syntax.Types.INTDIV) StaticMethodCallExpression(org.codehaus.groovy.ast.expr.StaticMethodCallExpression) LambdaExpression(org.codehaus.groovy.ast.expr.LambdaExpression) TYPE(org.codehaus.groovy.transform.stc.StaticTypesMarker.TYPE) GeneralUtils.thisPropX(org.codehaus.groovy.ast.tools.GeneralUtils.thisPropX) StaticTypeCheckingSupport.missesGenericsTypes(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.missesGenericsTypes) MOD_EQUAL(org.codehaus.groovy.syntax.Types.MOD_EQUAL) WhileStatement(org.codehaus.groovy.ast.stmt.WhileStatement) ArrayList(java.util.ArrayList) ClosureUtils.getResolveStrategyName(org.codehaus.groovy.ast.tools.ClosureUtils.getResolveStrategyName) MethodNode(org.codehaus.groovy.ast.MethodNode) WideningCategories.isBigDecCategory(org.codehaus.groovy.ast.tools.WideningCategories.isBigDecCategory) ClassHelper.isPrimitiveFloat(org.codehaus.groovy.ast.ClassHelper.isPrimitiveFloat) KEYWORD_IN(org.codehaus.groovy.syntax.Types.KEYWORD_IN) LinkedHashSet(java.util.LinkedHashSet) Parameter(org.codehaus.groovy.ast.Parameter) MAP_TYPE(org.codehaus.groovy.ast.ClassHelper.MAP_TYPE) WideningCategories.isDoubleCategory(org.codehaus.groovy.ast.tools.WideningCategories.isDoubleCategory) EmptyStatement(org.codehaus.groovy.ast.stmt.EmptyStatement) ClassHelper.isClassType(org.codehaus.groovy.ast.ClassHelper.isClassType) ClassHelper.isPrimitiveType(org.codehaus.groovy.ast.ClassHelper.isPrimitiveType) ClassHelper.double_TYPE(org.codehaus.groovy.ast.ClassHelper.double_TYPE) ClassHelper.isPrimitiveChar(org.codehaus.groovy.ast.ClassHelper.isPrimitiveChar) WideningCategories.isLongCategory(org.codehaus.groovy.ast.tools.WideningCategories.isLongCategory) DIRECT_METHOD_CALL_TARGET(org.codehaus.groovy.transform.stc.StaticTypesMarker.DIRECT_METHOD_CALL_TARGET) WideningCategories.isNumberCategory(org.codehaus.groovy.ast.tools.WideningCategories.isNumberCategory) PLUS_PLUS(org.codehaus.groovy.syntax.Types.PLUS_PLUS) ListExpression(org.codehaus.groovy.ast.expr.ListExpression) KEYWORD_INSTANCEOF(org.codehaus.groovy.syntax.Types.KEYWORD_INSTANCEOF) StaticTypeCheckingSupport.isAssignment(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.isAssignment) GeneralUtils.getSetterName(org.codehaus.groovy.ast.tools.GeneralUtils.getSetterName) DELEGATION_METADATA(org.codehaus.groovy.transform.stc.StaticTypesMarker.DELEGATION_METADATA) StaticTypeCheckingSupport.lastArgMatchesVarg(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.lastArgMatchesVarg) StaticTypeCheckingSupport.isGStringOrGStringStringLUB(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.isGStringOrGStringStringLUB) ClassHelper.findSAM(org.codehaus.groovy.ast.ClassHelper.findSAM) RangeExpression(org.codehaus.groovy.ast.expr.RangeExpression) ResolveVisitor(org.codehaus.groovy.control.ResolveVisitor) Variable(org.codehaus.groovy.ast.Variable) ClassHelper.isSAMType(org.codehaus.groovy.ast.ClassHelper.isSAMType) FIND_REGEX(org.codehaus.groovy.syntax.Types.FIND_REGEX) StaticTypeCheckingSupport.prettyPrintType(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.prettyPrintType) GeneralUtils(org.codehaus.groovy.ast.tools.GeneralUtils) WideningCategories.isDouble(org.codehaus.groovy.ast.tools.WideningCategories.isDouble) Integer_TYPE(org.codehaus.groovy.ast.ClassHelper.Integer_TYPE) DelegatesTo(groovy.lang.DelegatesTo) SpreadExpression(org.codehaus.groovy.ast.expr.SpreadExpression) SUPER_MOP_METHOD_REQUIRED(org.codehaus.groovy.transform.stc.StaticTypesMarker.SUPER_MOP_METHOD_REQUIRED) ClassHelper.isWrapperLong(org.codehaus.groovy.ast.ClassHelper.isWrapperLong) ArrayExpression(org.codehaus.groovy.ast.expr.ArrayExpression) GROOVY_OBJECT_TYPE(org.codehaus.groovy.ast.ClassHelper.GROOVY_OBJECT_TYPE) GeneralUtils.args(org.codehaus.groovy.ast.tools.GeneralUtils.args) CatchStatement(org.codehaus.groovy.ast.stmt.CatchStatement) GroovyBugError(org.codehaus.groovy.GroovyBugError) READONLY_PROPERTY(org.codehaus.groovy.transform.stc.StaticTypesMarker.READONLY_PROPERTY) List(java.util.List) TypeChecked(groovy.transform.TypeChecked) BinaryExpression(org.codehaus.groovy.ast.expr.BinaryExpression) BlockStatement(org.codehaus.groovy.ast.stmt.BlockStatement) Modifier(java.lang.reflect.Modifier) Optional(java.util.Optional) Statement(org.codehaus.groovy.ast.stmt.Statement) ClassHelper.isWrapperShort(org.codehaus.groovy.ast.ClassHelper.isWrapperShort) GeneralUtils.constX(org.codehaus.groovy.ast.tools.GeneralUtils.constX) ClassHelper.int_TYPE(org.codehaus.groovy.ast.ClassHelper.int_TYPE) CodeVisitorSupport(org.codehaus.groovy.ast.CodeVisitorSupport) ElvisOperatorExpression(org.codehaus.groovy.ast.expr.ElvisOperatorExpression) Collection_TYPE(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.Collection_TYPE) StaticTypeCheckingSupport.findTargetVariable(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.findTargetVariable) WideningCategories.lowestUpperBound(org.codehaus.groovy.ast.tools.WideningCategories.lowestUpperBound) HashMap(java.util.HashMap) ClassHelper.isDynamicTyped(org.codehaus.groovy.ast.ClassHelper.isDynamicTyped) TokenUtil(org.codehaus.groovy.syntax.TokenUtil) AtomicReference(java.util.concurrent.atomic.AtomicReference) StaticTypeCheckingSupport.isVargs(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.isVargs) CompilationUnit(org.codehaus.groovy.control.CompilationUnit) CLOSURE_TYPE(org.codehaus.groovy.ast.ClassHelper.CLOSURE_TYPE) WideningCategories.isBigIntCategory(org.codehaus.groovy.ast.tools.WideningCategories.isBigIntCategory) MethodCallExpression(org.codehaus.groovy.ast.expr.MethodCallExpression) StaticTypeCheckingSupport.isCompareToBoolean(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.isCompareToBoolean) StaticTypeCheckingSupport.isParameterizedWithString(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.isParameterizedWithString) Byte_TYPE(org.codehaus.groovy.ast.ClassHelper.Byte_TYPE) ErrorCollector(org.codehaus.groovy.control.ErrorCollector) Iterator(java.util.Iterator) IntRange(groovy.lang.IntRange) ClosureSignatureConflictResolver(groovy.transform.stc.ClosureSignatureConflictResolver) GenericsUtils.makeClassSafe0(org.codehaus.groovy.ast.tools.GenericsUtils.makeClassSafe0) StaticTypeCheckingSupport.isUsingGenericsOrIsArrayUsingGenerics(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.isUsingGenericsOrIsArrayUsingGenerics) DeclarationExpression(org.codehaus.groovy.ast.expr.DeclarationExpression) StaticTypeCheckingSupport.isClassClassNodeWrappingConcreteType(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.isClassClassNodeWrappingConcreteType) StaticTypeCheckingSupport.isParameterizedWithGStringOrGStringString(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.isParameterizedWithGStringOrGStringString) NamedParam(groovy.transform.NamedParam) ClosureExpression(org.codehaus.groovy.ast.expr.ClosureExpression) StaticTypeCheckingSupport.applyGenericsConnections(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.applyGenericsConnections) StaticTypeCheckingSupport.fullyResolveType(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.fullyResolveType) SwitchStatement(org.codehaus.groovy.ast.stmt.SwitchStatement) StaticTypeCheckingSupport.isShiftOperation(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.isShiftOperation) FieldNode(org.codehaus.groovy.ast.FieldNode) AttributeExpression(org.codehaus.groovy.ast.expr.AttributeExpression) WideningCategories(org.codehaus.groovy.ast.tools.WideningCategories) AUTOCLOSEABLE_TYPE(org.codehaus.groovy.ast.ClassHelper.AUTOCLOSEABLE_TYPE) EQUAL(org.codehaus.groovy.syntax.Types.EQUAL) MOD(org.codehaus.groovy.syntax.Types.MOD) Collections(java.util.Collections) Iterator_TYPE(org.codehaus.groovy.ast.ClassHelper.Iterator_TYPE) ArrayList_TYPE(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.ArrayList_TYPE) ClassHelper.isWrapperInteger(org.codehaus.groovy.ast.ClassHelper.isWrapperInteger) StaticTypeCheckingSupport.findDGMMethodsForClassNode(org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.findDGMMethodsForClassNode) ClassNode(org.codehaus.groovy.ast.ClassNode) InnerClassNode(org.codehaus.groovy.ast.InnerClassNode) MethodReferenceExpression(org.codehaus.groovy.ast.expr.MethodReferenceExpression) 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) ClosureUtils.hasImplicitParameter(org.codehaus.groovy.ast.tools.ClosureUtils.hasImplicitParameter) Parameter(org.codehaus.groovy.ast.Parameter) ClosureSignatureHint(groovy.transform.stc.ClosureSignatureHint) LinkedList(java.util.LinkedList)

Aggregations

LambdaExpression (org.codehaus.groovy.ast.expr.LambdaExpression)7 ClassNode (org.codehaus.groovy.ast.ClassNode)6 InnerClassNode (org.codehaus.groovy.ast.InnerClassNode)6 Expression (org.codehaus.groovy.ast.expr.Expression)6 VariableExpression (org.codehaus.groovy.ast.expr.VariableExpression)6 MethodNode (org.codehaus.groovy.ast.MethodNode)5 Parameter (org.codehaus.groovy.ast.Parameter)5 ClosureExpression (org.codehaus.groovy.ast.expr.ClosureExpression)5 HashMap (java.util.HashMap)4 LinkedList (java.util.LinkedList)4 List (java.util.List)4 Map (java.util.Map)4 Optional (java.util.Optional)4 GroovyBugError (org.codehaus.groovy.GroovyBugError)4 CLOSURE_TYPE (org.codehaus.groovy.ast.ClassHelper.CLOSURE_TYPE)4 OBJECT_TYPE (org.codehaus.groovy.ast.ClassHelper.OBJECT_TYPE)4 VOID_TYPE (org.codehaus.groovy.ast.ClassHelper.VOID_TYPE)4 ClassHelper.findSAM (org.codehaus.groovy.ast.ClassHelper.findSAM)4 ClassHelper.long_TYPE (org.codehaus.groovy.ast.ClassHelper.long_TYPE)4 CodeVisitorSupport (org.codehaus.groovy.ast.CodeVisitorSupport)4