Examples of InvalidIDLException


Examples of org.apache.axis2.corba.exceptions.InvalidIDLException

                    visitAndAddTypedefs(node, module);
                    break;
                }

                default: {
                    throw new InvalidIDLException("Unsupported IDL token " + node);
                }
            }
            node = node.getNextSibling();
        }
    }
View Full Code Here

Examples of org.apache.axis2.corba.exceptions.InvalidIDLException

        String typeName;
        if (typeNode.getType() == IDLTokenTypes.LITERAL_unsigned) {
            AST nextNode = typeNode.getNextSibling();
            if (nextNode == null) {
                throw new InvalidIDLException("'unsigned' without a data type");
            } else if (nextNode.getType() == IDLTokenTypes.LITERAL_short) {
                typeNode.setNextSibling(nextNode.getNextSibling());
                typeNode.setFirstChild(nextNode.getFirstChild());
                typeName = "ushort";
            } else if (nextNode.getType() == IDLTokenTypes.LITERAL_long) {
                AST nextToLong = nextNode.getNextSibling();
                if (nextToLong == null) {
                    throw new InvalidIDLException("an identifier is required after the 'long' keyword");
                } else if (nextToLong.getType() == IDLTokenTypes.LITERAL_long) {
                    typeNode.setNextSibling(nextToLong.getNextSibling());
                    typeNode.setFirstChild(nextToLong.getFirstChild());
                    typeName = "ulonglong";
                } else {
                    typeNode.setNextSibling(nextNode.getNextSibling());
                    typeNode.setFirstChild(nextNode.getFirstChild());
                    typeName = "ulong";
                }
            } else {
                throw new InvalidIDLException("either 'long' or 'short' is expected after the 'unsigned' keyword");
            }
        } else if (typeNode.getType() == IDLTokenTypes.LITERAL_long) {
            AST nextToLong = typeNode.getNextSibling();
            if (nextToLong == null) {
                throw new InvalidIDLException("an identifier is required after the 'long' keyword");
            } else if (nextToLong.getType() == IDLTokenTypes.LITERAL_long) {
                typeNode.setNextSibling(nextToLong.getNextSibling());
                typeNode.setFirstChild(nextToLong.getFirstChild());
                typeName = "longlong";
            } else {
                typeName = "long";
            }
        } else {
            typeName = getTypeName(typeNode);   
        }


        if (compositeDataTypes!=null) {
            if (!module.equals("")) {
                if (!typeName.startsWith(module)) {
                    dataType = (DataType) idl.getCompositeDataTypes().get(module + typeName);
                }
            }

            if (dataType==null && moduleForInnerTypes!=null) {
                if (!typeName.startsWith(module)) {
                    dataType = (DataType) idl.getCompositeDataTypes().get(moduleForInnerTypes + typeName);
                }
            }

            if (dataType==null)
                dataType = (DataType) idl.getCompositeDataTypes().get(typeName);
        }

        if (dataType==null)
            dataType = PrimitiveDataType.getPrimitiveDataType(typeName);

        if (dataType == null)
            throw new InvalidIDLException("Invalid data type: " + typeName);
        return dataType;
    }
View Full Code Here

Examples of org.apache.axis2.corba.exceptions.InvalidIDLException

            case IDLTokenTypes.TILDE:
                node1 = expressionNode.getFirstChild();
                Object boolObj = eval(node1, returnType, visitor);
                if (!(boolObj instanceof Boolean)) {
                    throw new InvalidIDLException("A boolean value is expected after (~) operator");
                }
                value = Boolean.valueOf(!((Boolean) boolObj).booleanValue());
                break;

            case IDLTokenTypes.INT:
            case IDLTokenTypes.FLOAT:
            case IDLTokenTypes.STRING_LITERAL:
            case IDLTokenTypes.WIDE_STRING_LITERAL:
            case IDLTokenTypes.CHAR_LITERAL:
            case IDLTokenTypes.WIDE_CHAR_LITERAL:
            case IDLTokenTypes.FIXED:
                value = getValueObject(expressionNode.getText(), returnType);
                break;

            case IDLTokenTypes.LITERAL_TRUE:
                value = Boolean.valueOf(true);
                break;

            case IDLTokenTypes.LITERAL_FALSE:
                value = Boolean.valueOf(true);
                break;

            case IDLTokenTypes.IDENT:
                value = getConstant(expressionNode.getText(), visitor);
                break;
           
            case IDLTokenTypes.LPAREN:
                value = eval(expressionNode.getFirstChild(), returnType, visitor);
                break;

            default:
                throw new InvalidIDLException("Unsupported IDL token " + expressionNode);
        }
        return value;
    }
View Full Code Here

Examples of org.apache.axis2.corba.exceptions.InvalidIDLException

                break;
            case TCKind._tk_octet:
                valueObj = new Byte((byte) (((Byte) o1).byteValue() + ((Byte) o2).byteValue()));
                break;
            default:
                throw new InvalidIDLException("Unsupported IDL token");
        }
        return valueObj;
    }
View Full Code Here

Examples of org.apache.axis2.corba.exceptions.InvalidIDLException

                break;
            case TCKind._tk_octet:
                valueObj = new Byte((byte) (- ((Byte) o).byteValue()));
                break;
            default:
                throw new InvalidIDLException("Unsupported IDL token");
        }
        return valueObj;
    }
View Full Code Here

Examples of org.apache.axis2.corba.exceptions.InvalidIDLException

                break;
            case TCKind._tk_octet:
                valueObj = new Byte((byte) (((Byte) o1).byteValue() - ((Byte) o2).byteValue()));
                break;
            default:
                throw new InvalidIDLException("Unsupported IDL token");
        }
        return valueObj;
    }
View Full Code Here

Examples of org.apache.axis2.corba.exceptions.InvalidIDLException

                break;
            case TCKind._tk_octet:
                valueObj = new Byte((byte) (((Byte) o1).byteValue() * ((Byte) o2).byteValue()));
                break;
            default:
                throw new InvalidIDLException("Unsupported IDL token");
        }
        return valueObj;
    }
View Full Code Here

Examples of org.apache.axis2.corba.exceptions.InvalidIDLException

                break;
            case TCKind._tk_octet:
                valueObj = new Byte((byte) (((Byte) o1).byteValue() / ((Byte) o2).byteValue()));
                break;
            default:
                throw new InvalidIDLException("Unsupported IDL token");
        }
        return valueObj;
    }
View Full Code Here

Examples of org.apache.axis2.corba.exceptions.InvalidIDLException

                break;
            case TCKind._tk_octet:
                valueObj = new Byte((byte) (((Byte) o1).byteValue() >> ((Byte) o2).byteValue()));
                break;
            default:
                throw new InvalidIDLException("Unsupported IDL token");
        }
        return valueObj;
    }
View Full Code Here

Examples of org.apache.axis2.corba.exceptions.InvalidIDLException

                break;
            case TCKind._tk_octet:
                valueObj = new Byte((byte) (((Byte) o1).byteValue() << ((Byte) o2).byteValue()));
                break;
            default:
                throw new InvalidIDLException("Unsupported IDL token");
        }
        return valueObj;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.