Package ceylon.language

Examples of ceylon.language.AssertionError


        return new Union(members);
    }

    public static TypeDescriptor intersection(TypeDescriptor... members){
        if(members == null || members.length == 0)
            throw new AssertionError("members can't be null or empty");
        members = flattenUnionOrIntersection(members, false);
        TypeDescriptor single = getSingleTypeDescriptorIfUnique(members);
        if(single != null)
            return single;
        members = removeDuplicates(members);
View Full Code Here


            return new FunctionOrValueInterface(declaration).getProducedType(qualifyingType, typeArgs);
        }

        @Override
        public java.lang.Class<?> getArrayElementClass() {
            throw new AssertionError("Should never be called");
        }
View Full Code Here

            throw new AssertionError("Should never be called");
        }

        @Override
        public boolean containsNull() {
            throw new AssertionError("Should never be called");
        }
View Full Code Here

        DeserializingReference<?> ref = idToReference.get(id);
        if (ref != null) {
            if (ref.getClazz().equals(classModel)) {
                return (Reference)ref;
            } else {
                throw new AssertionError("reference already made to instance with a different class");
            }
        }
        if (classModel.getDeclaration().getAbstract()) {
            throw new AssertionError("class is abstract: " + classModel);
        }
        ref = new DeserializingReference<Instance>(reified$Instance, this, id, classModel, (Reference)null);
        idToReference.put(id, ref);
        return (Reference)ref;
    }
View Full Code Here

        DeserializingReference<?> ref = idToReference.get(id);
        if (ref != null) {
            if (ref.getClazz().equals(classModel)) {
                return (Reference)ref;
            } else {
                throw new AssertionError("reference already made to instance with a different class");
            }
        }
        if (classModel.getDeclaration().getAbstract()) {
            throw new AssertionError("class is abstract: " + classModel);
        }
        ref = new DeserializingReference<Instance>(reified$Instance, this, id, classModel, outerReference);
        idToReference.put(id, ref);
        return (Reference)ref;
    }
View Full Code Here

     * Never returns null.
     */
    Object leakReferred(Object id) {
        DeserializingReference<?> reference = idToReference.get(id);
        if (reference == null) {
            throw new AssertionError("cannot obtain reference to unregistered id: " + id);
        }
        return (($InstanceLeaker$)reference).$leakInstance$();
    }
View Full Code Here

        @SuppressWarnings("rawtypes")
        Object a = ((Array) array).toArray();
        if(a instanceof long[]){
            return (long[]) a;
        }
        throw new AssertionError("Invalid source array type: "+a);
    }
View Full Code Here

        @SuppressWarnings("rawtypes")
        Object a = ((Array) array).toArray();
        if(a instanceof int[]){
            return (int[]) a;
        }
        throw new AssertionError("Invalid source array type: "+a);
    }
View Full Code Here

     */
    public static float[] javaFloatArray(@Name("array") Array<java.lang.Float> array){
        if(array.toArray() instanceof float[]){
            return (float[]) array.toArray();
        }
        throw new AssertionError("Invalid source array type: "+array.toArray());
    }
View Full Code Here

            @TypeInfo("ceylon.language::Array<T|ceylon.language::Null>")
            @Name("array") Array<T> array){
        if(array.toArray() instanceof java.lang.Object[]){
            return (T[]) array.toArray();
        }
        throw new AssertionError("Invalid source array type: "+array.toArray());
    }
View Full Code Here

TOP

Related Classes of ceylon.language.AssertionError

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.