Package eu.admire.dispel.parser.exception

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


        {
            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


            for (Expression exp : expressions)
            {
                Object result = exp.evaluate(mExecutionState.getVariables());
                if (!(result instanceof Number))
                {  
                    throw new TypeMismatchException(PrimitiveType.INTEGER, result);
                }
                mArraySizes.add(((Number)result).intValue());
            }
            break;
        case WITH_ASSERTION:
View Full Code Here

                        {
                            indices.add(((Long)result).intValue());
                        }
                        else
                        {
                            throw new TypeMismatchException("Integer", result);
                        }
                    }
                    variable.setValue(TypeUtils.newInstance(mType), indices);
                }
                else
View Full Code Here

                    RequestNode node = (RequestNode)value;
                    mConnection = node.getOutput(connection.mName, connection.mIndex.intValue());
                }
                else
                {
                    throw new TypeMismatchException("ProcessingElement", value);
                }
            }
            break;
        }
        case INPUT:
        {
            ConnectionStrategy connection = (ConnectionStrategy)strategy;
            if (connection.mConnectionVar != null)
            {
                Connection c = (Connection) connection.mConnectionVar.getValue(connection.mArrayIndices);
                if (c == null ||
                        !(c.getSource() instanceof LiteralValuesNode &&
                                mConnection.getSource() instanceof LiteralValuesNode))
                {
                    connection.mConnectionVar.setValue(mConnection, connection.mArrayIndices);
                }
                else
                {
                    LiteralValuesNode literal = (LiteralValuesNode) c.getSource();
                    LiteralValuesNode current = (LiteralValuesNode) mConnection.getSource();
                    literal.add(current.getValues());
                }
            }
            else
            {
                Object value;
                Variable variable =
                    mExecutionState.getVariables().get(connection.mPE);
                if (variable == null)
                {
                    throw new UnresolvedVariableException(connection.mPE);
                }
                value = variable.getValue(connection.mArrayIndices);
                if (value instanceof RequestNode)
                {
                    RequestNode node = (RequestNode)value;
                    if (node.getAllInputs().containsKey(connection.mName))
                    {
                        Connection c = node.getAllInputs().get(connection.mName).get(connection.mIndex);
                        if (c != null && c.getSource() instanceof LiteralValuesNode
                                && mConnection.getSource() instanceof LiteralValuesNode)
                        {
                            LiteralValuesNode literal = (LiteralValuesNode) c.getSource();
                            LiteralValuesNode current = (LiteralValuesNode) mConnection.getSource();
                            literal.add(current.getValues());
                        }
                        else
                        {
                            node.connectInput(connection.mName, connection.mIndex.intValue(), mConnection);
                        }
                    }
                    else
                    {
                        node.connectInput(connection.mName, connection.mIndex.intValue(), mConnection);
                    }
                }
                else
                {
                    throw new TypeMismatchException("ProcessingElement", value);
                }
            }
            break;
        }
        case ARRAY:
View Full Code Here

        {
            mIndex = (Number)value;
        }
        else
        {
            throw new TypeMismatchException("Number", value);
        }
    }
View Full Code Here

        {
            Object value =
                expression.evaluate(mExecutionState.getVariables());
            if (!(value instanceof Long))
            {
                throw new TypeMismatchException(
                    PrimitiveType.INTEGER, value);
            }
            mArrayIndices.add(((Number)value).intValue());
        }
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

            {
                Object value = expression.evaluate(
                    mExecutionState.getVariables());
                if (!(value instanceof Long))
                {
                    throw new TypeMismatchException(PrimitiveType.INTEGER, value);
                }
                mArrayIndices.add(((Number)value).intValue());
            }
        }
        break;
View Full Code Here

        {
            mIndex = (Number)value;
        }
        else
        {
            throw new TypeMismatchException("Number", value);
        }
    }
View Full Code Here

                    return node.getOutput(mName, mIndex.intValue());
                }
            }
            else
            {
                throw new TypeMismatchException("ProcessingElement", value);
            }
        }
    }
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.