Package com.redhat.ceylon.compiler.typechecker.context

Examples of com.redhat.ceylon.compiler.typechecker.context.ProducedTypeCache


    public ProducedTypeCache getCache(){
        return cache;
    }

    public void clearCache(TypeDeclaration declaration) {
        ProducedTypeCache cache = getCache();
        if(cache != null){
            cache.clearForDeclaration(declaration);
        }
        // FIXME: propagate to modules that import this module transitively
        // Done in the IDE JDTModule
    }
View Full Code Here


                dec instanceof IntersectionType;
        boolean canCache = !complexType &&
                !hasUnderlyingType() &&
                collectVarianceOverrides().isEmpty() &&
                ProducedTypeCache.isEnabled();
        ProducedTypeCache cache = dec.getUnit().getCache();
        if (canCache &&
                cache.containsKey(this, dec)) {
            return cache.get(this, dec);
        }
        SupertypeCheck check =
                checkSupertype(getDeclaration(), dec);
        ProducedType superType;
        if (check == SupertypeCheck.NO) {
            superType = null;
        }
        else if (check == SupertypeCheck.YES &&
                dec instanceof ClassOrInterface &&
                dec.isToplevel() &&
                dec.getTypeParameters().isEmpty()) {
            superType = dec.getType();
        }
        else if (check == SupertypeCheck.YES &&
                dec == getDeclaration() &&
                dec.isToplevel()) {
            superType = this;
        }
        else {
            superType = getSupertype(new SupertypeCriteria(dec));
        }
        if (canCache) {
            cache.put(this, dec, superType);
        }
        return superType;
    }
View Full Code Here

TOP

Related Classes of com.redhat.ceylon.compiler.typechecker.context.ProducedTypeCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.