Package com.redhat.ceylon.compiler.java.language

Examples of com.redhat.ceylon.compiler.java.language.EnumeratedTypeError


            } else if (declarationClass == ceylon.language.meta.declaration.AliasDeclaration.class) {
                return DECLARATION_IS_ALIAS;
            } else if (declarationClass == ceylon.language.meta.declaration.NestableDeclaration.class) {
                return true_();
            }
            throw new EnumeratedTypeError("Supposedly exhaustive switch was not exhaustive");
        } else if (kind instanceof TypeDescriptor.Union) {
            TypeDescriptor[] members = ((TypeDescriptor.Union)kind).getMembers();
            @SuppressWarnings("unchecked")
            Predicate<Declaration>[] preds = new Predicate[members.length];
            int ii = 0;
            for (TypeDescriptor member : members) {
                preds[ii++] = isDeclarationOfKind(member);
            }
            return or(preds);
        } else if (kind instanceof TypeDescriptor.Intersection) {
            TypeDescriptor[] members = ((TypeDescriptor.Intersection)kind).getMembers();
            @SuppressWarnings("unchecked")
            Predicate<Declaration>[] preds = new Predicate[members.length];
            int ii = 0;
            for (TypeDescriptor member : members) {
                preds[ii++] = isDeclarationOfKind(member);
            }
            return and(preds);
        } else if (kind == TypeDescriptor.NothingType) {
            return false_();
        }
        throw new EnumeratedTypeError("Supposedly exhaustive switch was not exhaustive");
    }
View Full Code Here


            return or(mapTypesToDeclarationAnnotatedWith(annotation, caseTypes));
        } else if (at instanceof AppliedIntersectionType) {
            Sequential<? extends Type<?>> satisfiedTypes = ((AppliedIntersectionType<?>)at).getSatisfiedTypes();
            return and(mapTypesToDeclarationAnnotatedWith(annotation, satisfiedTypes));
        } else {
            throw new EnumeratedTypeError("Supposedly exhaustive switch was not exhaustive: "+at);
        }
    }
View Full Code Here

            // TODO What if reified is Annotation, or ContrainedAnnotation, or OptionalAnnotation, or SequencedAnnotation?
            @SuppressWarnings({ "rawtypes", "unchecked" })
            AnnotationPredicate<A> predicate = annotationPredicate($reifiedAnnotation, (ClassOrInterface)at);
            return predicate;
        } else {
            throw new EnumeratedTypeError("Supposedly exhaustive switch was not exhaustive: "+at);
        }
    }
View Full Code Here

TOP

Related Classes of com.redhat.ceylon.compiler.java.language.EnumeratedTypeError

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.