Search in sources :

Example 21 with GenericsTypeName

use of org.codehaus.groovy.ast.GenericsType.GenericsTypeName in project groovy by apache.

the class ResolveVisitor method resolveGenericsHeader.

private void resolveGenericsHeader(final GenericsType[] types, final GenericsType rootType, final int level) {
    if (types == null)
        return;
    currentClass.setUsingGenerics(true);
    List<Tuple2<ClassNode, GenericsType>> upperBoundsWithGenerics = new LinkedList<>();
    List<Tuple2<ClassNode, ClassNode>> upperBoundsToResolve = new LinkedList<>();
    for (GenericsType type : types) {
        if (level > 0 && type.getName().equals(rootType.getName())) {
            continue;
        }
        String name = type.getName();
        ClassNode typeType = type.getType();
        GenericsTypeName gtn = new GenericsTypeName(name);
        boolean isWildcardGT = QUESTION_MARK.equals(name);
        boolean dealWithGenerics = (level == 0 || (level > 0 && genericParameterNames.get(gtn) != null));
        if (type.getUpperBounds() != null) {
            boolean nameAdded = false;
            for (ClassNode upperBound : type.getUpperBounds()) {
                if (upperBound == null)
                    continue;
                if (!isWildcardGT) {
                    if (!nameAdded || !resolve(typeType)) {
                        if (dealWithGenerics) {
                            type.setPlaceholder(true);
                            typeType.setRedirect(upperBound);
                            genericParameterNames.put(gtn, type);
                            nameAdded = true;
                        }
                    }
                    upperBoundsToResolve.add(tuple(upperBound, typeType));
                }
                if (upperBound.isUsingGenerics()) {
                    upperBoundsWithGenerics.add(tuple(upperBound, type));
                }
            }
        } else if (!isWildcardGT) {
            if (dealWithGenerics) {
                type.setPlaceholder(true);
                GenericsType last = genericParameterNames.put(gtn, type);
                typeType.setRedirect(last != null ? last.getType().redirect() : ClassHelper.OBJECT_TYPE);
            }
        }
    }
    for (Tuple2<ClassNode, ClassNode> tp : upperBoundsToResolve) {
        ClassNode upperBound = tp.getV1();
        ClassNode classNode = tp.getV2();
        resolveOrFail(upperBound, classNode);
    }
    for (Tuple2<ClassNode, GenericsType> tp : upperBoundsWithGenerics) {
        ClassNode upperBound = tp.getV1();
        GenericsType gt = tp.getV2();
        resolveGenericsHeader(upperBound.getGenericsTypes(), 0 == level ? gt : rootType, level + 1);
    }
}
Also used : InnerClassNode(org.codehaus.groovy.ast.InnerClassNode) ClassNode(org.codehaus.groovy.ast.ClassNode) Tuple2(groovy.lang.Tuple2) GenericsType(org.codehaus.groovy.ast.GenericsType) GenericsTypeName(org.codehaus.groovy.ast.GenericsType.GenericsTypeName) LinkedList(java.util.LinkedList)

Example 22 with GenericsTypeName

use of org.codehaus.groovy.ast.GenericsType.GenericsTypeName in project groovy by apache.

the class ResolveVisitor method visitConstructorOrMethod.

@Override
protected void visitConstructorOrMethod(final MethodNode node, final boolean isConstructor) {
    VariableScope oldScope = currentScope;
    currentScope = node.getVariableScope();
    Map<GenericsTypeName, GenericsType> oldPNames = genericParameterNames;
    genericParameterNames = node.isStatic() && !Traits.isTrait(node.getDeclaringClass()) ? new HashMap<>() : new HashMap<>(genericParameterNames);
    resolveGenericsHeader(node.getGenericsTypes());
    Parameter[] paras = node.getParameters();
    for (Parameter p : paras) {
        p.setInitialExpression(transform(p.getInitialExpression()));
        resolveOrFail(p.getType(), p.getType());
        visitAnnotations(p);
    }
    resolveOrFail(node.getReturnType(), node);
    if (node.getExceptions() != null) {
        for (ClassNode t : node.getExceptions()) {
            resolveOrFail(t, node);
        }
    }
    MethodNode oldCurrentMethod = currentMethod;
    currentMethod = node;
    super.visitConstructorOrMethod(node, isConstructor);
    currentMethod = oldCurrentMethod;
    genericParameterNames = oldPNames;
    currentScope = oldScope;
}
Also used : InnerClassNode(org.codehaus.groovy.ast.InnerClassNode) ClassNode(org.codehaus.groovy.ast.ClassNode) MethodNode(org.codehaus.groovy.ast.MethodNode) HashMap(java.util.HashMap) GenericsType(org.codehaus.groovy.ast.GenericsType) GenericsTypeName(org.codehaus.groovy.ast.GenericsType.GenericsTypeName) Parameter(org.codehaus.groovy.ast.Parameter) VariableScope(org.codehaus.groovy.ast.VariableScope)

Example 23 with GenericsTypeName

use of org.codehaus.groovy.ast.GenericsType.GenericsTypeName in project groovy by apache.

the class StaticTypeCheckingSupport method typeCheckMethodsWithGenerics.

private static boolean typeCheckMethodsWithGenerics(final ClassNode receiver, final ClassNode[] argumentTypes, final MethodNode candidateMethod, final boolean isExtensionMethod) {
    Parameter[] parameters = candidateMethod.getParameters();
    if (parameters.length == 0 || parameters.length > argumentTypes.length) {
        // cannot check generic type arguments if there is default argument!
        return true;
    }
    boolean failure = false;
    Set<GenericsTypeName> fixedPlaceHolders = Collections.emptySet();
    Map<GenericsTypeName, GenericsType> candidateGenerics = new HashMap<>();
    // correct receiver for inner class
    // we assume the receiver is an instance of the declaring class of the
    // candidate method, but findMethod() returns also outer class methods
    // for that receiver; for now we skip receiver-based checks in that case
    boolean skipBecauseOfInnerClassNotReceiver = !implementsInterfaceOrIsSubclassOf(receiver, candidateMethod.getDeclaringClass());
    if (!skipBecauseOfInnerClassNotReceiver) {
        if (candidateMethod instanceof ConstructorNode) {
            candidateGenerics = GenericsUtils.extractPlaceholders(receiver);
            fixedPlaceHolders = new HashSet<>(candidateGenerics.keySet());
        } else {
            failure = inferenceCheck(fixedPlaceHolders, candidateGenerics, candidateMethod.getDeclaringClass(), receiver, false);
            GenericsType[] gts = candidateMethod.getGenericsTypes();
            if (candidateMethod.isStatic()) {
                // not in scope
                candidateGenerics.clear();
            } else if (gts != null) {
                // first remove hidden params
                for (GenericsType gt : gts) {
                    candidateGenerics.remove(new GenericsTypeName(gt.getName()));
                }
                // GROOVY-8034: non-static method may use class generics
                gts = applyGenericsContext(candidateGenerics, gts);
            }
            GenericsUtils.extractPlaceholders(makeClassSafe0(OBJECT_TYPE, gts), candidateGenerics);
            // the outside context parts till now define placeholder we are not allowed to
            // generalize, thus we save that for later use...
            // extension methods are special, since they set the receiver as
            // first parameter. While we normally allow generalization for the first
            // parameter, in case of an extension method we must not.
            fixedPlaceHolders = extractResolvedPlaceHolders(candidateGenerics);
        }
    }
    int lastParamIndex = parameters.length - 1;
    for (int i = 0, n = argumentTypes.length; i < n; i += 1) {
        ClassNode parameterType = parameters[Math.min(i, lastParamIndex)].getOriginType();
        ClassNode argumentType = StaticTypeCheckingVisitor.wrapTypeIfNecessary(argumentTypes[i]);
        failure |= inferenceCheck(fixedPlaceHolders, candidateGenerics, parameterType, argumentType, i >= lastParamIndex);
        if (i == 0 && isExtensionMethod) {
            // re-load fixed names for extension
            fixedPlaceHolders = extractResolvedPlaceHolders(candidateGenerics);
        }
    }
    return !failure;
}
Also used : ClassNode(org.codehaus.groovy.ast.ClassNode) InnerClassNode(org.codehaus.groovy.ast.InnerClassNode) LinkedHashMap(java.util.LinkedHashMap) HashMap(java.util.HashMap) ConstructorNode(org.codehaus.groovy.ast.ConstructorNode) GenericsType(org.codehaus.groovy.ast.GenericsType) Parameter(org.codehaus.groovy.ast.Parameter) GenericsTypeName(org.codehaus.groovy.ast.GenericsType.GenericsTypeName)

Example 24 with GenericsTypeName

use of org.codehaus.groovy.ast.GenericsType.GenericsTypeName in project groovy by apache.

the class StaticTypeCheckingSupport method addMissingEntries.

private static void addMissingEntries(final Map<GenericsTypeName, GenericsType> connections, final Map<GenericsTypeName, GenericsType> resolved) {
    for (Map.Entry<GenericsTypeName, GenericsType> entry : connections.entrySet()) {
        if (resolved.containsKey(entry.getKey()))
            continue;
        GenericsType gt = entry.getValue();
        ClassNode cn = gt.getType();
        if (cn.redirect() == UNKNOWN_PARAMETER_TYPE)
            continue;
        resolved.put(entry.getKey(), gt);
    }
}
Also used : ClassNode(org.codehaus.groovy.ast.ClassNode) InnerClassNode(org.codehaus.groovy.ast.InnerClassNode) GenericsType(org.codehaus.groovy.ast.GenericsType) GenericsTypeName(org.codehaus.groovy.ast.GenericsType.GenericsTypeName) Map(java.util.Map) LinkedHashMap(java.util.LinkedHashMap) HashMap(java.util.HashMap)

Example 25 with GenericsTypeName

use of org.codehaus.groovy.ast.GenericsType.GenericsTypeName in project groovy by apache.

the class StaticTypeCheckingSupport method applyGenericsConnections.

static void applyGenericsConnections(final Map<GenericsTypeName, GenericsType> connections, final Map<GenericsTypeName, GenericsType> resolvedPlaceholders) {
    if (connections == null || connections.isEmpty())
        return;
    int count = 0;
    while (count++ < 10000) {
        boolean checkForMorePlaceholders = false;
        for (Map.Entry<GenericsTypeName, GenericsType> entry : resolvedPlaceholders.entrySet()) {
            // entry could be T=T, T=T extends U, T=V, T=String, T=? extends String, etc.
            GenericsType oldValue = entry.getValue();
            if (oldValue.isPlaceholder()) {
                // T=T or V, not T=String or ? ...
                GenericsTypeName name = new GenericsTypeName(oldValue.getName());
                // find "V" in T=V
                GenericsType newValue = connections.get(name);
                if (newValue == oldValue)
                    continue;
                if (newValue == null) {
                    newValue = connections.get(entry.getKey());
                    if (newValue != null) {
                        // GROOVY-10315, GROOVY-10317
                        newValue = getCombinedGenericsType(oldValue, newValue);
                    }
                }
                if (newValue == null) {
                    entry.setValue(newValue = applyGenericsContext(connections, oldValue));
                    if (!checkForMorePlaceholders) {
                        checkForMorePlaceholders = !equalIncludingGenerics(oldValue, newValue);
                    }
                } else if (!newValue.isPlaceholder() || newValue != resolvedPlaceholders.get(name)) {
                    // GROOVY-6787: Don't override the original if the replacement doesn't respect the bounds otherwise
                    // the original bounds are lost, which can result in accepting an incompatible type as an argument!
                    ClassNode replacementType = extractType(newValue);
                    ClassNode suitabilityType = !replacementType.isGenericsPlaceHolder() ? replacementType : Optional.ofNullable(replacementType.getGenericsTypes()).map(gts -> extractType(gts[0])).orElse(replacementType.redirect());
                    if (oldValue.isCompatibleWith(suitabilityType)) {
                        if (newValue.isWildcard() && newValue.getLowerBound() == null && newValue.getUpperBounds() == null) {
                            // GROOVY-9998: apply upper/lower bound for unknown
                            entry.setValue(replacementType.asGenericsType());
                        } else {
                            entry.setValue(newValue);
                        }
                        if (!checkForMorePlaceholders && newValue.isPlaceholder()) {
                            checkForMorePlaceholders = !equalIncludingGenerics(oldValue, newValue);
                        }
                    }
                }
            }
        }
        if (!checkForMorePlaceholders)
            break;
    }
    if (count >= 10000) {
        throw new GroovyBugError("unable to handle generics in " + resolvedPlaceholders + " with connections " + connections);
    }
}
Also used : Arrays(java.util.Arrays) BigInteger_TYPE(org.codehaus.groovy.ast.ClassHelper.BigInteger_TYPE) DEPRECATED_TYPE(org.codehaus.groovy.ast.ClassHelper.DEPRECATED_TYPE) COMPARE_GREATER_THAN(org.codehaus.groovy.syntax.Types.COMPARE_GREATER_THAN) GSTRING_TYPE(org.codehaus.groovy.ast.ClassHelper.GSTRING_TYPE) WideningCategories.isFloatingCategory(org.codehaus.groovy.ast.tools.WideningCategories.isFloatingCategory) Character_TYPE(org.codehaus.groovy.ast.ClassHelper.Character_TYPE) ClassHelper.make(org.codehaus.groovy.ast.ClassHelper.make) POWER_EQUAL(org.codehaus.groovy.syntax.Types.POWER_EQUAL) Matcher(java.util.regex.Matcher) INTDIV_EQUAL(org.codehaus.groovy.syntax.Types.INTDIV_EQUAL) Map(java.util.Map) COMPARE_GREATER_THAN_EQUAL(org.codehaus.groovy.syntax.Types.COMPARE_GREATER_THAN_EQUAL) VOID_TYPE(org.codehaus.groovy.ast.ClassHelper.VOID_TYPE) 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) COMPARE_TO(org.codehaus.groovy.syntax.Types.COMPARE_TO) COLLECTION_TYPE(org.codehaus.groovy.ast.ClassHelper.COLLECTION_TYPE) BITWISE_AND(org.codehaus.groovy.syntax.Types.BITWISE_AND) VariableExpression(org.codehaus.groovy.ast.expr.VariableExpression) PLUS(org.codehaus.groovy.syntax.Types.PLUS) ArgumentListExpression(org.codehaus.groovy.ast.expr.ArgumentListExpression) Set(java.util.Set) LOGICAL_AND(org.codehaus.groovy.syntax.Types.LOGICAL_AND) ClassHelper.getUnwrapper(org.codehaus.groovy.ast.ClassHelper.getUnwrapper) RIGHT_SHIFT_EQUAL(org.codehaus.groovy.syntax.Types.RIGHT_SHIFT_EQUAL) CLASS_Type(org.codehaus.groovy.ast.ClassHelper.CLASS_Type) COMPARE_NOT_EQUAL(org.codehaus.groovy.syntax.Types.COMPARE_NOT_EQUAL) OBJECT_TYPE(org.codehaus.groovy.ast.ClassHelper.OBJECT_TYPE) ClassHelper.makeWithoutCaching(org.codehaus.groovy.ast.ClassHelper.makeWithoutCaching) ClassHelper.byte_TYPE(org.codehaus.groovy.ast.ClassHelper.byte_TYPE) ClassNodeUtils.samePackageName(org.apache.groovy.ast.tools.ClassNodeUtils.samePackageName) STRING_TYPE(org.codehaus.groovy.ast.ClassHelper.STRING_TYPE) ClassHelper.long_TYPE(org.codehaus.groovy.ast.ClassHelper.long_TYPE) RIGHT_SHIFT_UNSIGNED(org.codehaus.groovy.syntax.Types.RIGHT_SHIFT_UNSIGNED) LEFT_SQUARE_BRACKET(org.codehaus.groovy.syntax.Types.LEFT_SQUARE_BRACKET) CastExpression(org.codehaus.groovy.ast.expr.CastExpression) ClassHelper.getWrapper(org.codehaus.groovy.ast.ClassHelper.getWrapper) PLUS_EQUAL(org.codehaus.groovy.syntax.Types.PLUS_EQUAL) RIGHT_SHIFT(org.codehaus.groovy.syntax.Types.RIGHT_SHIFT) DefaultGroovyMethods.asBoolean(org.codehaus.groovy.runtime.DefaultGroovyMethods.asBoolean) COMPARE_NOT_IN(org.codehaus.groovy.syntax.Types.COMPARE_NOT_IN) COMPARE_EQUAL(org.codehaus.groovy.syntax.Types.COMPARE_EQUAL) INTDIV(org.codehaus.groovy.syntax.Types.INTDIV) DIVIDE_EQUAL(org.codehaus.groovy.syntax.Types.DIVIDE_EQUAL) MINUS(org.codehaus.groovy.syntax.Types.MINUS) TreeSet(java.util.TreeSet) MOD_EQUAL(org.codehaus.groovy.syntax.Types.MOD_EQUAL) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) BITWISE_OR_EQUAL(org.codehaus.groovy.syntax.Types.BITWISE_OR_EQUAL) LOGICAL_OR(org.codehaus.groovy.syntax.Types.LOGICAL_OR) DefaultGroovyMethodsSupport.closeQuietly(org.codehaus.groovy.runtime.DefaultGroovyMethodsSupport.closeQuietly) COMPARE_IDENTICAL(org.codehaus.groovy.syntax.Types.COMPARE_IDENTICAL) MethodNode(org.codehaus.groovy.ast.MethodNode) BITWISE_AND_EQUAL(org.codehaus.groovy.syntax.Types.BITWISE_AND_EQUAL) Expression(org.codehaus.groovy.ast.expr.Expression) ExpressionUtils.isNullConstant(org.apache.groovy.ast.tools.ExpressionUtils.isNullConstant) ClassHelper.short_TYPE(org.codehaus.groovy.ast.ClassHelper.short_TYPE) KEYWORD_IN(org.codehaus.groovy.syntax.Types.KEYWORD_IN) LinkedHashSet(java.util.LinkedHashSet) Opcodes(org.objectweb.asm.Opcodes) Parameter(org.codehaus.groovy.ast.Parameter) POWER(org.codehaus.groovy.syntax.Types.POWER) ClassNode(org.codehaus.groovy.ast.ClassNode) ClassHelper.isStringType(org.codehaus.groovy.ast.ClassHelper.isStringType) ClassHelper.float_TYPE(org.codehaus.groovy.ast.ClassHelper.float_TYPE) GenericsType(org.codehaus.groovy.ast.GenericsType) ClassHelper.isPrimitiveBoolean(org.codehaus.groovy.ast.ClassHelper.isPrimitiveBoolean) ReturnStatement(org.codehaus.groovy.ast.stmt.ReturnStatement) CompilerConfiguration(org.codehaus.groovy.control.CompilerConfiguration) Phases(org.codehaus.groovy.control.Phases) 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.isGroovyObjectType(org.codehaus.groovy.ast.ClassHelper.isGroovyObjectType) Float_TYPE(org.codehaus.groovy.ast.ClassHelper.Float_TYPE) MetaClassRegistryImpl(org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl) WideningCategories.isNumberCategory(org.codehaus.groovy.ast.tools.WideningCategories.isNumberCategory) ListExpression(org.codehaus.groovy.ast.expr.ListExpression) ClassHelper.isWrapperBoolean(org.codehaus.groovy.ast.ClassHelper.isWrapperBoolean) KEYWORD_INSTANCEOF(org.codehaus.groovy.syntax.Types.KEYWORD_INSTANCEOF) MapExpression(org.codehaus.groovy.ast.expr.MapExpression) ClassHelper.isGStringType(org.codehaus.groovy.ast.ClassHelper.isGStringType) GenericsTypeName(org.codehaus.groovy.ast.GenericsType.GenericsTypeName) ConstantExpression(org.codehaus.groovy.ast.expr.ConstantExpression) Long_TYPE(org.codehaus.groovy.ast.ClassHelper.Long_TYPE) LEFT_SHIFT_EQUAL(org.codehaus.groovy.syntax.Types.LEFT_SHIFT_EQUAL) Number_TYPE(org.codehaus.groovy.ast.ClassHelper.Number_TYPE) ClassHelper.findSAM(org.codehaus.groovy.ast.ClassHelper.findSAM) Enum_Type(org.codehaus.groovy.ast.ClassHelper.Enum_Type) ClassHelper.isBigDecimalType(org.codehaus.groovy.ast.ClassHelper.isBigDecimalType) Variable(org.codehaus.groovy.ast.Variable) ClassHelper.isSAMType(org.codehaus.groovy.ast.ClassHelper.isSAMType) MULTIPLY_EQUAL(org.codehaus.groovy.syntax.Types.MULTIPLY_EQUAL) GeneralUtils(org.codehaus.groovy.ast.tools.GeneralUtils) MULTIPLY(org.codehaus.groovy.syntax.Types.MULTIPLY) MATCH_REGEX(org.codehaus.groovy.syntax.Types.MATCH_REGEX) Integer_TYPE(org.codehaus.groovy.ast.ClassHelper.Integer_TYPE) ClassHelper.void_WRAPPER_TYPE(org.codehaus.groovy.ast.ClassHelper.void_WRAPPER_TYPE) ArrayExpression(org.codehaus.groovy.ast.expr.ArrayExpression) Collection(java.util.Collection) BITWISE_XOR(org.codehaus.groovy.syntax.Types.BITWISE_XOR) Types(org.codehaus.groovy.syntax.Types) LEFT_SHIFT(org.codehaus.groovy.syntax.Types.LEFT_SHIFT) UUID(java.util.UUID) RIGHT_SHIFT_UNSIGNED_EQUAL(org.codehaus.groovy.syntax.Types.RIGHT_SHIFT_UNSIGNED_EQUAL) InnerClassNode(org.codehaus.groovy.ast.InnerClassNode) Short_TYPE(org.codehaus.groovy.ast.ClassHelper.Short_TYPE) GroovyBugError(org.codehaus.groovy.GroovyBugError) List(java.util.List) BinaryExpression(org.codehaus.groovy.ast.expr.BinaryExpression) Optional(java.util.Optional) Double_TYPE(org.codehaus.groovy.ast.ClassHelper.Double_TYPE) BITWISE_XOR_EQUAL(org.codehaus.groovy.syntax.Types.BITWISE_XOR_EQUAL) ClassHelper.int_TYPE(org.codehaus.groovy.ast.ClassHelper.int_TYPE) WideningCategories.lowestUpperBound(org.codehaus.groovy.ast.tools.WideningCategories.lowestUpperBound) HashMap(java.util.HashMap) DIVIDE(org.codehaus.groovy.syntax.Types.DIVIDE) Maps(org.apache.groovy.util.Maps) HashSet(java.util.HashSet) ClassHelper.isNumberType(org.codehaus.groovy.ast.ClassHelper.isNumberType) CompilationUnit(org.codehaus.groovy.control.CompilationUnit) CLOSURE_TYPE(org.codehaus.groovy.ast.ClassHelper.CLOSURE_TYPE) ClassHelper.boolean_TYPE(org.codehaus.groovy.ast.ClassHelper.boolean_TYPE) WideningCategories.isBigIntCategory(org.codehaus.groovy.ast.tools.WideningCategories.isBigIntCategory) ClassNodeUtils.addGeneratedMethod(org.apache.groovy.ast.tools.ClassNodeUtils.addGeneratedMethod) LinkedList(java.util.LinkedList) Byte_TYPE(org.codehaus.groovy.ast.ClassHelper.Byte_TYPE) Iterator(java.util.Iterator) COMPARE_NOT_INSTANCEOF(org.codehaus.groovy.syntax.Types.COMPARE_NOT_INSTANCEOF) ParameterUtils(org.codehaus.groovy.ast.tools.ParameterUtils) GroovyClass(org.codehaus.groovy.tools.GroovyClass) GenericsUtils.makeClassSafe0(org.codehaus.groovy.ast.tools.GenericsUtils.makeClassSafe0) COMPARE_NOT_IDENTICAL(org.codehaus.groovy.syntax.Types.COMPARE_NOT_IDENTICAL) ClosureExpression(org.codehaus.groovy.ast.expr.ClosureExpression) GenericsUtils(org.codehaus.groovy.ast.tools.GenericsUtils) MINUS_EQUAL(org.codehaus.groovy.syntax.Types.MINUS_EQUAL) StringJoiner(java.util.StringJoiner) WideningCategories(org.codehaus.groovy.ast.tools.WideningCategories) MOD(org.codehaus.groovy.syntax.Types.MOD) BaseStream(java.util.stream.BaseStream) COMPARE_LESS_THAN(org.codehaus.groovy.syntax.Types.COMPARE_LESS_THAN) COMPARE_LESS_THAN_EQUAL(org.codehaus.groovy.syntax.Types.COMPARE_LESS_THAN_EQUAL) Comparator(java.util.Comparator) ConstructorNode(org.codehaus.groovy.ast.ConstructorNode) Collections(java.util.Collections) ClassHelper.isObjectType(org.codehaus.groovy.ast.ClassHelper.isObjectType) BITWISE_OR(org.codehaus.groovy.syntax.Types.BITWISE_OR) ClassNode(org.codehaus.groovy.ast.ClassNode) InnerClassNode(org.codehaus.groovy.ast.InnerClassNode) GenericsType(org.codehaus.groovy.ast.GenericsType) GroovyBugError(org.codehaus.groovy.GroovyBugError) GenericsTypeName(org.codehaus.groovy.ast.GenericsType.GenericsTypeName) Map(java.util.Map) LinkedHashMap(java.util.LinkedHashMap) HashMap(java.util.HashMap)

Aggregations

GenericsType (org.codehaus.groovy.ast.GenericsType)27 GenericsTypeName (org.codehaus.groovy.ast.GenericsType.GenericsTypeName)27 ClassNode (org.codehaus.groovy.ast.ClassNode)25 InnerClassNode (org.codehaus.groovy.ast.InnerClassNode)25 HashMap (java.util.HashMap)16 LinkedHashMap (java.util.LinkedHashMap)15 Parameter (org.codehaus.groovy.ast.Parameter)14 Map (java.util.Map)12 MethodNode (org.codehaus.groovy.ast.MethodNode)12 StaticTypeCheckingSupport.findDGMMethodsForClassNode (org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.findDGMMethodsForClassNode)12 StaticTypeCheckingSupport.getCombinedGenericsType (org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.getCombinedGenericsType)12 ClosureSignatureHint (groovy.transform.stc.ClosureSignatureHint)10 ArgumentListExpression (org.codehaus.groovy.ast.expr.ArgumentListExpression)10 ArrayExpression (org.codehaus.groovy.ast.expr.ArrayExpression)10 BinaryExpression (org.codehaus.groovy.ast.expr.BinaryExpression)10 CastExpression (org.codehaus.groovy.ast.expr.CastExpression)10 ClosureExpression (org.codehaus.groovy.ast.expr.ClosureExpression)10 ConstantExpression (org.codehaus.groovy.ast.expr.ConstantExpression)10 Expression (org.codehaus.groovy.ast.expr.Expression)10 ListExpression (org.codehaus.groovy.ast.expr.ListExpression)10