Package eu.admire.dispel.parser.exception

Examples of eu.admire.dispel.parser.exception.TypeMismatchException


        if ("length".equals(property))
        {
            // find the length of the array
            if (mArraySizes == null || depth >= mArraySizes.size())
            {
                throw new TypeMismatchException("Array", mType.toString());
            }
            return new Long(mArraySizes.get(depth));
        }
        throw new IllegalArgumentException("Unsupported property: " + property);
    }
View Full Code Here


        {
            return mSType.cast(value);
        }
        catch (STypeMismatchException e)
        {
            TypeMismatchException ex = new TypeMismatchException(this, value);
            ex.initCause(e);
            throw ex;
        }
    }
View Full Code Here

            // no type checking for processing elements at the moment
            return value;
        }
        else
        {
            throw new TypeMismatchException(this, value);
        }
    }
View Full Code Here

        {
            return value;
        }
        else
        {
            throw new TypeMismatchException(getName(), value);
        }
    }
View Full Code Here

    {
        if (value instanceof Connection)
        {
            return value;
        }
        throw new TypeMismatchException(this, value);
    }
View Full Code Here

            // check elements
            for (Entry<String, Type> entry : mElements.entrySet())
            {
                if (!map.containsKey(entry.getKey()))
                {
                    throw new TypeMismatchException(this, value);
                }
                Object val = map.get(entry.getKey());
                {
                    try
                    {
                        entry.getValue().cast(val);
                    }
                    catch (TypeMismatchException e)
                    {
                        throw new TypeMismatchException(this, value);
                    }
                }
                       
            }
            return value;
        }
        throw new TypeMismatchException(this, value);
    }
View Full Code Here

        switch (context)
        {
        case NEW_INSTANCE:
            if (mArraySizes.size() != mArrayDimension)
            {
                throw new TypeMismatchException(
                        "array of dimension " + mArraySizes.size(),
                        "array of dimension " + mArrayDimension);
            }
            break;
        case VARIABLE_ID:
View Full Code Here

        {
            throw new UnknownTypeException(text);
        }
        if (!(var.getType() instanceof ProcessingElementTypeType))
        {
            throw new TypeMismatchException("ProcessingElementTypeType", var.getValue());
        }
        ProcessingElementTypeType type = (ProcessingElementTypeType)var.getType();
        SimpleProcessingElementDescriptor descriptor = null;
        if (type.getDescriptor() != null)
        {
View Full Code Here

       {
           mType = ((DomainType) type).getDType();
       }
       else
       {
           throw new TypeMismatchException("DType", type);
       }
    }
View Full Code Here

TOP

Related Classes of eu.admire.dispel.parser.exception.TypeMismatchException

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.