Search in sources :

Example 11 with Declaration

use of com.redhat.ceylon.model.typechecker.model.Declaration in project ceylon-compiler by ceylon.

the class ExpressionTransformer method transformMemberExpression.

private JCExpression transformMemberExpression(Tree.StaticMemberOrTypeExpression expr, JCExpression primaryExpr, TermTransformer transformer) {
    JCExpression result = null;
    // do not throw, an error will already have been reported
    Declaration decl = expr.getDeclaration();
    if (decl == null) {
        return makeErroneous(expr, "compiler bug: expression with no declaration");
    }
    // creating a tmp variable (in which case we have a substitution for it)
    while (decl instanceof TypedDeclaration) {
        TypedDeclaration typedDecl = (TypedDeclaration) decl;
        if (!naming.isSubstituted(decl) && typedDecl.getOriginalDeclaration() != null) {
            decl = ((TypedDeclaration) decl).getOriginalDeclaration();
        } else {
            break;
        }
    }
    // (the header might look like a field while the implementation is a getter)
    if (decl.isNativeHeader()) {
        Declaration d = ModelUtil.getNativeDeclaration(decl, Backend.Java);
        if (d != null) {
            decl = d;
        }
    }
    // Explanation: primaryExpr and qualExpr both specify what is to come before the selector
    // but the important difference is that primaryExpr is used for those situations where
    // the result comes from the actual Ceylon code while qualExpr is used for those situations
    // where we need to refer to synthetic objects (like wrapper classes for toplevel methods)
    JCExpression qualExpr = null;
    String selector = null;
    // true for Java interop using fields, and for super constructor parameters, which must use
    // parameters rather than getter methods
    boolean mustUseField = false;
    // true for default parameter methods
    boolean mustUseParameter = false;
    if (decl instanceof Functional && (!(decl instanceof Class) || ((Class) decl).getParameterList() != null) && (!(decl instanceof Function) || !decl.isParameter() || functionalParameterRequiresCallable((Function) decl, expr)) && isFunctionalResult(expr.getTypeModel())) {
        result = transformFunctional(expr, (Functional) decl);
    } else if (Decl.isGetter(decl)) {
        // invoke the getter
        if (decl.isToplevel()) {
            primaryExpr = null;
            qualExpr = naming.makeName((Value) decl, Naming.NA_FQ | Naming.NA_WRAPPER | Naming.NA_MEMBER);
            selector = null;
        } else if (Decl.withinClassOrInterface(decl) && !Decl.isLocalToInitializer(decl)) {
            selector = naming.selector((Value) decl);
        } else {
            // method local attr
            if (!isRecursiveReference(expr)) {
                primaryExpr = naming.makeQualifiedName(primaryExpr, (Value) decl, Naming.NA_Q_LOCAL_INSTANCE);
            }
            selector = naming.selector((Value) decl);
        }
    } else if (Decl.isValueOrSharedOrCapturedParam(decl)) {
        if (decl.isToplevel()) {
            // ERASURE
            if (isNullValue(decl)) {
                result = makeNull();
            } else if (isBooleanTrue(decl)) {
                result = makeBoolean(true);
            } else if (isBooleanFalse(decl)) {
                result = makeBoolean(false);
            } else {
                // it's a toplevel attribute
                primaryExpr = naming.makeName((TypedDeclaration) decl, Naming.NA_FQ | Naming.NA_WRAPPER);
                selector = naming.selector((TypedDeclaration) decl);
            }
        } else if (Decl.isClassAttribute(decl) || Decl.isClassParameter(decl)) {
            mustUseField = Decl.isJavaField(decl) || (isWithinSuperInvocation() && primaryExpr == null && withinSuperInvocation == decl.getContainer());
            mustUseParameter = (primaryExpr == null && isWithinDefaultParameterExpression(decl.getContainer()));
            if (mustUseField || mustUseParameter) {
                if (decl instanceof FieldValue) {
                    selector = ((FieldValue) decl).getRealName();
                } else if (isWithinSuperInvocation() && ((Value) decl).isVariable() && ((Value) decl).isCaptured()) {
                    selector = Naming.getAliasedParameterName(((Value) decl).getInitializerParameter());
                } else {
                    selector = decl.getName();
                }
            } else {
                // invoke the getter, using the Java interop form of Util.getGetterName because this is the only case
                // (Value inside a Class) where we might refer to JavaBean properties
                selector = naming.selector((TypedDeclaration) decl);
            }
        } else if (decl.isCaptured() || decl.isShared()) {
            TypedDeclaration typedDecl = ((TypedDeclaration) decl);
            TypeDeclaration typeDecl = typedDecl.getType().getDeclaration();
            mustUseField = Decl.isBoxedVariable((TypedDeclaration) decl);
            if (Decl.isLocalNotInitializer(typeDecl) && typeDecl.isAnonymous() && // we need the box if it's a captured object
            !typedDecl.isSelfCaptured()) {
            // accessing a local 'object' declaration, so don't need a getter 
            } else if (decl.isCaptured() && !((TypedDeclaration) decl).isVariable() && // captured objects are never variable but need the box
            !typedDecl.isSelfCaptured()) {
            // accessing a local that is not getter wrapped
            } else {
                primaryExpr = naming.makeQualifiedName(primaryExpr, (TypedDeclaration) decl, Naming.NA_Q_LOCAL_INSTANCE);
                selector = naming.selector((TypedDeclaration) decl);
            }
        }
    } else if (Decl.isMethodOrSharedOrCapturedParam(decl)) {
        mustUseParameter = (primaryExpr == null && decl.isParameter() && isWithinDefaultParameterExpression(decl.getContainer()));
        if (!decl.isParameter() && (Decl.isLocalNotInitializer(decl) || (Decl.isLocalToInitializer(decl) && ((Function) decl).isDeferred()))) {
            primaryExpr = null;
            int flags = Naming.NA_MEMBER;
            if (!isRecursiveReference(expr)) {
                // Only want to quote the method name 
                // e.g. enum.$enum()
                flags |= Naming.NA_WRAPPER_UNQUOTED;
            } else if (!isReferenceInSameScope(expr)) {
                // always qualify it with this
                flags |= Naming.NA_WRAPPER | Naming.NA_WRAPPER_WITH_THIS;
            }
            qualExpr = naming.makeName((Function) decl, flags);
            selector = null;
        } else if (decl.isToplevel()) {
            primaryExpr = null;
            qualExpr = naming.makeName((Function) decl, Naming.NA_FQ | Naming.NA_WRAPPER | Naming.NA_MEMBER);
            selector = null;
        } else if (!isWithinInvocation()) {
            selector = null;
        } else {
            // not toplevel, not within method, must be a class member
            selector = naming.selector((Function) decl);
        }
    }
    boolean isCtor = decl instanceof Function && ((Function) decl).getTypeDeclaration() instanceof Constructor;
    if (result == null) {
        boolean useGetter = !(decl instanceof Function || isCtor) && !mustUseField && !mustUseParameter;
        if (qualExpr == null && selector == null && !(isCtor)) {
            useGetter = Decl.isClassAttribute(decl) && CodegenUtil.isErasedAttribute(decl.getName());
            if (useGetter) {
                selector = naming.selector((TypedDeclaration) decl);
            } else {
                selector = naming.substitute(decl);
            }
        }
        if (qualExpr == null) {
            qualExpr = primaryExpr;
        }
        // cases
        if (!mustUseParameter) {
            qualExpr = addQualifierForObjectMembersOfInterface(expr, decl, qualExpr);
            qualExpr = addInterfaceImplAccessorIfRequired(qualExpr, expr, decl);
            qualExpr = addThisOrObjectQualifierIfRequired(qualExpr, expr, decl);
            if (qualExpr == null && needDollarThis(expr)) {
                qualExpr = makeQualifiedDollarThis((Tree.BaseMemberExpression) expr);
            }
        }
        if (qualExpr == null && (decl.isStaticallyImportable() || (decl instanceof Value && Decl.isEnumeratedConstructor((Value) decl))) && // and not classes
        decl.getContainer() instanceof TypeDeclaration) {
            qualExpr = naming.makeTypeDeclarationExpression(null, (TypeDeclaration) decl.getContainer(), DeclNameFlag.QUALIFIED);
        }
        if (Decl.isPrivateAccessRequiringUpcast(expr)) {
            qualExpr = makePrivateAccessUpcast(expr, qualExpr);
        }
        if (transformer != null) {
            if (decl instanceof TypedDeclaration && ((TypedDeclaration) decl).getType().isTypeConstructor()) {
                // This is a bit of a hack, but we're "invoking a type constructor" 
                // so recurse to get the applied expression. 
                qualExpr = transformMemberExpression(expr, qualExpr, null);
                selector = null;
            }
            result = transformer.transform(qualExpr, selector);
        } else {
            Tree.Primary qmePrimary = null;
            if (expr instanceof Tree.QualifiedMemberOrTypeExpression) {
                qmePrimary = ((Tree.QualifiedMemberOrTypeExpression) expr).getPrimary();
            }
            boolean safeMemberJavaArray = expr instanceof Tree.QualifiedMemberExpression && ((Tree.QualifiedMemberExpression) expr).getMemberOperator() instanceof Tree.SafeMemberOp && isJavaArray(qmePrimary.getTypeModel());
            if ((safeMemberJavaArray || Decl.isValueTypeDecl(qmePrimary)) && // Safe operators always work on boxed things, so don't use value types
            (safeMemberJavaArray || (expr instanceof Tree.QualifiedMemberOrTypeExpression == false) || ((Tree.QualifiedMemberOrTypeExpression) expr).getMemberOperator() instanceof Tree.MemberOp) && // We never want to use value types on boxed things, unless they are java arrays
            (CodegenUtil.isUnBoxed(qmePrimary) || isJavaArray(qmePrimary.getTypeModel())) && // Java arrays length property does not go via value types
            (!isJavaArray(qmePrimary.getTypeModel()) || (!"length".equals(selector) && !"hashCode".equals(selector)))) {
                JCExpression primTypeExpr = makeJavaType(qmePrimary.getTypeModel(), JT_NO_PRIMITIVES | JT_VALUE_TYPE);
                result = makeQualIdent(primTypeExpr, selector);
                result = make().Apply(List.<JCTree.JCExpression>nil(), result, List.<JCTree.JCExpression>of(qualExpr));
            } else if (expr instanceof Tree.QualifiedMemberOrTypeExpression && isThrowableMessage((Tree.QualifiedMemberOrTypeExpression) expr)) {
                result = utilInvocation().throwableMessage(qualExpr);
            } else if (expr instanceof Tree.QualifiedMemberOrTypeExpression && isThrowableSuppressed((Tree.QualifiedMemberOrTypeExpression) expr)) {
                result = utilInvocation().suppressedExceptions(qualExpr);
            } else {
                result = makeQualIdent(qualExpr, selector);
                if (useGetter) {
                    result = make().Apply(List.<JCTree.JCExpression>nil(), result, List.<JCTree.JCExpression>nil());
                }
            }
        }
    }
    if (transformer == null && decl instanceof TypedDeclaration && ((TypedDeclaration) decl).getType().isTypeConstructor() && !expr.getTypeArguments().getTypeModels().isEmpty()) {
        // applying a type constructor
        ListBuffer<JCExpression> tds = ListBuffer.lb();
        for (Type t : expr.getTypeArguments().getTypeModels()) {
            tds.add(makeReifiedTypeArgument(t));
        }
        result = make().Apply(null, makeQualIdent(result, Naming.Unfix.apply.toString()), List.<JCExpression>of(make().NewArray(make().Type(syms().ceylonTypeDescriptorType), List.<JCExpression>nil(), tds.toList())));
    }
    return result;
}
Also used : TypedDeclaration(com.redhat.ceylon.model.typechecker.model.TypedDeclaration) Constructor(com.redhat.ceylon.model.typechecker.model.Constructor) Functional(com.redhat.ceylon.model.typechecker.model.Functional) Function(com.redhat.ceylon.model.typechecker.model.Function) Type(com.redhat.ceylon.model.typechecker.model.Type) JCExpression(com.sun.tools.javac.tree.JCTree.JCExpression) FunctionOrValue(com.redhat.ceylon.model.typechecker.model.FunctionOrValue) FieldValue(com.redhat.ceylon.model.loader.model.FieldValue) Value(com.redhat.ceylon.model.typechecker.model.Value) JCTree(com.sun.tools.javac.tree.JCTree) Tree(com.redhat.ceylon.compiler.typechecker.tree.Tree) Class(com.redhat.ceylon.model.typechecker.model.Class) JCNewClass(com.sun.tools.javac.tree.JCTree.JCNewClass) TypedDeclaration(com.redhat.ceylon.model.typechecker.model.TypedDeclaration) Declaration(com.redhat.ceylon.model.typechecker.model.Declaration) TypeDeclaration(com.redhat.ceylon.model.typechecker.model.TypeDeclaration) FieldValue(com.redhat.ceylon.model.loader.model.FieldValue) TypeDeclaration(com.redhat.ceylon.model.typechecker.model.TypeDeclaration)

Example 12 with Declaration

use of com.redhat.ceylon.model.typechecker.model.Declaration in project ceylon-compiler by ceylon.

the class ExpressionTransformer method transformJavaStaticOrInterfaceMember.

private JCExpression transformJavaStaticOrInterfaceMember(Tree.QualifiedMemberOrTypeExpression qmte, Type staticType) {
    Declaration decl = qmte.getDeclaration();
    if (decl instanceof FieldValue) {
        Value member = (Value) decl;
        return naming.makeName(member, Naming.NA_FQ | Naming.NA_WRAPPER_UNQUOTED);
    } else if (decl instanceof Value) {
        Value member = (Value) decl;
        CallBuilder callBuilder = CallBuilder.instance(this);
        Type qualifyingType = ((TypeDeclaration) member.getContainer()).getType();
        callBuilder.invoke(naming.makeQualifiedName(makeJavaType(qualifyingType, JT_RAW | JT_NO_PRIMITIVES), member, Naming.NA_GETTER | Naming.NA_MEMBER));
        return utilInvocation().checkNull(callBuilder.build());
    } else if (decl instanceof Function) {
        Function method = (Function) decl;
        final ParameterList parameterList = method.getFirstParameterList();
        Type qualifyingType = qmte.getPrimary().getTypeModel();
        Tree.TypeArguments typeArguments = qmte.getTypeArguments();
        Reference producedReference = method.appliedReference(qualifyingType, typeArguments.getTypeModels());
        return utilInvocation().checkNull(makeJavaStaticInvocation(gen(), method, producedReference, parameterList));
    } else if (decl instanceof Class) {
        Class class_ = (Class) decl;
        if (class_.isStaticallyImportable()) {
            return naming.makeTypeDeclarationExpression(null, class_, Naming.DeclNameFlag.QUALIFIED);
        } else {
            final ParameterList parameterList = class_.getFirstParameterList();
            Reference producedReference = qmte.getTarget();
            return utilInvocation().checkNull(makeJavaStaticInvocation(gen(), class_, producedReference, parameterList));
        }
    } else if (decl instanceof Interface) {
        return naming.makeTypeDeclarationExpression(null, (Interface) decl, Naming.DeclNameFlag.QUALIFIED);
    } else {
        return makeErroneous(qmte, "compiler bug: unsupported static");
    }
}
Also used : Function(com.redhat.ceylon.model.typechecker.model.Function) Type(com.redhat.ceylon.model.typechecker.model.Type) Reference(com.redhat.ceylon.model.typechecker.model.Reference) TypedReference(com.redhat.ceylon.model.typechecker.model.TypedReference) FunctionOrValue(com.redhat.ceylon.model.typechecker.model.FunctionOrValue) FieldValue(com.redhat.ceylon.model.loader.model.FieldValue) Value(com.redhat.ceylon.model.typechecker.model.Value) ParameterList(com.redhat.ceylon.model.typechecker.model.ParameterList) JCTree(com.sun.tools.javac.tree.JCTree) Tree(com.redhat.ceylon.compiler.typechecker.tree.Tree) Class(com.redhat.ceylon.model.typechecker.model.Class) JCNewClass(com.sun.tools.javac.tree.JCTree.JCNewClass) TypedDeclaration(com.redhat.ceylon.model.typechecker.model.TypedDeclaration) Declaration(com.redhat.ceylon.model.typechecker.model.Declaration) TypeDeclaration(com.redhat.ceylon.model.typechecker.model.TypeDeclaration) FieldValue(com.redhat.ceylon.model.loader.model.FieldValue) Interface(com.redhat.ceylon.model.typechecker.model.Interface) ClassOrInterface(com.redhat.ceylon.model.typechecker.model.ClassOrInterface)

Example 13 with Declaration

use of com.redhat.ceylon.model.typechecker.model.Declaration in project ceylon-compiler by ceylon.

the class ExpressionTransformer method transformSuperInvocation.

//
// Invocations
public void transformSuperInvocation(Tree.ExtendedType extendedType, ClassDefinitionBuilder classBuilder) {
    HasErrorException error = errors().getFirstExpressionErrorAndMarkBrokenness(extendedType);
    if (error != null) {
        classBuilder.getInitBuilder().delegateCall(this.makeThrowUnresolvedCompilationError(error));
        return;
    }
    if (extendedType.getInvocationExpression() != null && extendedType.getInvocationExpression().getPositionalArgumentList() != null) {
        Declaration primaryDeclaration = ((Tree.MemberOrTypeExpression) extendedType.getInvocationExpression().getPrimary()).getDeclaration();
        java.util.List<ParameterList> paramLists = ((Functional) primaryDeclaration).getParameterLists();
        if (paramLists.isEmpty()) {
            classBuilder.getInitBuilder().delegateCall(at(extendedType).Exec(makeErroneous(extendedType, "compiler bug: missing parameter list in extends clause: " + primaryDeclaration.getName() + " must be invoked")));
        } else {
            boolean prevFnCall = withinInvocation(true);
            try {
                JCStatement superExpr = transformConstructorDelegation(extendedType, new CtorDelegation(null, primaryDeclaration), extendedType.getInvocationExpression(), classBuilder, false);
                classBuilder.getInitBuilder().delegateCall(superExpr);
            } finally {
                withinInvocation(prevFnCall);
            }
        }
    }
}
Also used : Functional(com.redhat.ceylon.model.typechecker.model.Functional) HasErrorException(com.redhat.ceylon.compiler.java.codegen.recovery.HasErrorException) ParameterList(com.redhat.ceylon.model.typechecker.model.ParameterList) TypedDeclaration(com.redhat.ceylon.model.typechecker.model.TypedDeclaration) Declaration(com.redhat.ceylon.model.typechecker.model.Declaration) TypeDeclaration(com.redhat.ceylon.model.typechecker.model.TypeDeclaration) JCStatement(com.sun.tools.javac.tree.JCTree.JCStatement)

Example 14 with Declaration

use of com.redhat.ceylon.model.typechecker.model.Declaration in project ceylon-compiler by ceylon.

the class ExpressionTransformer method transformBaseInstantiation.

private JCExpression transformBaseInstantiation(Invocation invocation, CallBuilder callBuilder, TransformedInvocationPrimary transformedPrimary) {
    JCExpression resultExpr;
    Tree.BaseTypeExpression type = (Tree.BaseTypeExpression) invocation.getPrimary();
    Declaration declaration = type.getDeclaration();
    invocation.location(callBuilder);
    if (Strategy.generateInstantiator(declaration)) {
        resultExpr = callBuilder.typeArguments(List.<JCExpression>nil()).invoke(naming.makeInstantiatorMethodName(transformedPrimary.expr, (Class) declaration)).build();
        if (Strategy.isInstantiatorUntyped(declaration)) {
            // $new method declared to return Object, so needs typecast
            resultExpr = make().TypeCast(makeJavaType(((TypeDeclaration) declaration).getType()), resultExpr);
        }
    } else {
        Type classType = (Type) type.getTarget();
        if (isJavaArray(classType)) {
            JCExpression typeExpr = makeJavaType(classType, AbstractTransformer.JT_CLASS_NEW | AbstractTransformer.JT_RAW);
            callBuilder.javaArrayInstance(typeExpr);
            if (isJavaObjectArray(classType)) {
                Type elementType = classType.getTypeArgumentList().get(0);
                MultidimensionalArray multiArray = getMultiDimensionalArrayInfo(elementType);
                if (multiArray != null)
                    elementType = multiArray.type;
                // array of Foo is fine, array of Nothing too
                if (elementType.getDeclaration() instanceof ClassOrInterface || elementType.isNothing()) {
                    if (!elementType.getTypeArgumentList().isEmpty())
                        callBuilder.javaArrayInstanceNeedsCast(makeJavaType(classType, AbstractTransformer.JT_NO_PRIMITIVES));
                } else {
                    // if it's an array of union, intersection or type param we need a runtime allocation
                    callBuilder.javaArrayInstanceIsGeneric(makeReifiedTypeArgument(elementType), multiArray != null ? multiArray.dimension + 1 : 1);
                }
            }
        } else {
            if (Decl.isConstructor(classType.getDeclaration())) {
                classType = classType.getExtendedType();
            }
            JCExpression typeExpr = makeJavaType(classType, AbstractTransformer.JT_CLASS_NEW);
            callBuilder.instantiate(typeExpr);
        }
        resultExpr = callBuilder.build();
    }
    return resultExpr;
}
Also used : ClassOrInterface(com.redhat.ceylon.model.typechecker.model.ClassOrInterface) Type(com.redhat.ceylon.model.typechecker.model.Type) JCExpression(com.sun.tools.javac.tree.JCTree.JCExpression) JCTree(com.sun.tools.javac.tree.JCTree) Tree(com.redhat.ceylon.compiler.typechecker.tree.Tree) Class(com.redhat.ceylon.model.typechecker.model.Class) JCNewClass(com.sun.tools.javac.tree.JCTree.JCNewClass) TypedDeclaration(com.redhat.ceylon.model.typechecker.model.TypedDeclaration) Declaration(com.redhat.ceylon.model.typechecker.model.Declaration) TypeDeclaration(com.redhat.ceylon.model.typechecker.model.TypeDeclaration)

Example 15 with Declaration

use of com.redhat.ceylon.model.typechecker.model.Declaration in project ceylon-compiler by ceylon.

the class ExpressionTransformer method appendImplicitArguments.

private void appendImplicitArguments(Invocation invocation, TransformedInvocationPrimary transformedPrimary, ListBuffer<ExpressionAndType> result) {
    // Implicit arguments
    // except for Java array constructors
    Declaration primaryDeclaration = invocation.getPrimaryDeclaration();
    Tree.Term primary = invocation.getPrimary();
    if (primaryDeclaration instanceof Class == false || !isJavaArray(((Class) primaryDeclaration).getType())) {
        invocation.addReifiedArguments(result);
    }
    if (!(primary instanceof Tree.BaseTypeExpression) && !(primary instanceof Tree.QualifiedTypeExpression) && (!(primary instanceof Tree.QualifiedMemberExpression) || !(((Tree.QualifiedMemberExpression) primary).getMemberOperator() instanceof Tree.SpreadOp)) && Invocation.onValueType(this, primary, primaryDeclaration) && transformedPrimary != null) {
        result.add(new ExpressionAndType(transformedPrimary.expr, makeJavaType(primary.getTypeModel())));
    }
}
Also used : Term(com.redhat.ceylon.compiler.typechecker.tree.Tree.Term) JCTree(com.sun.tools.javac.tree.JCTree) Tree(com.redhat.ceylon.compiler.typechecker.tree.Tree) Class(com.redhat.ceylon.model.typechecker.model.Class) JCNewClass(com.sun.tools.javac.tree.JCTree.JCNewClass) TypedDeclaration(com.redhat.ceylon.model.typechecker.model.TypedDeclaration) Declaration(com.redhat.ceylon.model.typechecker.model.Declaration) TypeDeclaration(com.redhat.ceylon.model.typechecker.model.TypeDeclaration)

Aggregations

Declaration (com.redhat.ceylon.model.typechecker.model.Declaration)107 TypeDeclaration (com.redhat.ceylon.model.typechecker.model.TypeDeclaration)95 TypedDeclaration (com.redhat.ceylon.model.typechecker.model.TypedDeclaration)80 Type (com.redhat.ceylon.model.typechecker.model.Type)34 Function (com.redhat.ceylon.model.typechecker.model.Function)33 ClassOrInterface (com.redhat.ceylon.model.typechecker.model.ClassOrInterface)30 Class (com.redhat.ceylon.model.typechecker.model.Class)28 Value (com.redhat.ceylon.model.typechecker.model.Value)28 Tree (com.redhat.ceylon.compiler.typechecker.tree.Tree)27 JCExpression (com.sun.tools.javac.tree.JCTree.JCExpression)27 FunctionOrValue (com.redhat.ceylon.model.typechecker.model.FunctionOrValue)24 AttributeDeclaration (com.redhat.ceylon.compiler.typechecker.tree.Tree.AttributeDeclaration)22 JCTree (com.sun.tools.javac.tree.JCTree)22 TypeParameter (com.redhat.ceylon.model.typechecker.model.TypeParameter)21 MethodDeclaration (com.redhat.ceylon.compiler.typechecker.tree.Tree.MethodDeclaration)20 Interface (com.redhat.ceylon.model.typechecker.model.Interface)20 Scope (com.redhat.ceylon.model.typechecker.model.Scope)20 Package (com.redhat.ceylon.model.typechecker.model.Package)17 JCNewClass (com.sun.tools.javac.tree.JCTree.JCNewClass)17 ArrayList (java.util.ArrayList)16