Package org.apache.axis2.corba.exceptions

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


            case TCKind._tk_alias:
                Typedef typedef = (Typedef) type;
                valueObj = getValueObject(value, typedef.getDataType());
                break;
            default:
                throw new InvalidIDLException("Unsupported IDL token ");
        }
        return valueObj;
    }
View Full Code Here

        DataType dataType = visitor.getDataType(expressionName);
        if (dataType != null && dataType instanceof ConstType) {
            ConstType constType = (ConstType) dataType;
            value = constType.getValue();
        } else {
            throw new InvalidIDLException("Constant " + expressionName + " not found.");
        }
        return value;
    }
View Full Code Here

                    idl.addType(visitConst(node));
                    break;
                }

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

        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 && 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 && nextToLong.getType() == IDLTokenTypes.LITERAL_long) {
                typeNode.setNextSibling(nextToLong.getNextSibling());
View Full Code Here

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

        if (dataType == null) {
            throw new InvalidIDLException("Invalid data type: " + typeName);
        }

        return dataType;
    }
View Full Code Here

                    //Get const value
                    DataType constType = getDataType(caseNodeText);
                    if (constType instanceof ConstType) {
                        caseNodeText = ((ConstType) constType).getValue().toString();
                    } else {
                        throw new InvalidIDLException(caseNodeText + "is not a constant name");
                    }
                }
                unionMember.setDiscriminatorValue(caseNodeText);
                typeNode = caseValueNode.getNextSibling();
            }
View Full Code Here

                if (constType instanceof ConstType) {
                    Object countValue = ((ConstType) constType).getValue();
                    if (countValue instanceof Integer) {
                        count = ((Integer) countValue).intValue();
                    } else {
                        throw new InvalidIDLException(constName + "is not a long");
                    }
                } else {
                    throw new InvalidIDLException(constName + "is not a constant name");
                }
            } else {
                count = Integer.parseInt(countNode.getText());
            }
            sequenceType.setElementCount(count);
View Full Code Here

        while (constNameNode != null && IDLTokenTypes.IDENT != constNameNode.getType()) {
            constNameNode = constNameNode.getNextSibling();   
        }

        if (constNameNode == null) {
            throw new InvalidIDLException("Constant name not found");
        }

        String constName = constNameNode.toString();
        ConstType constType = new ConstType();
        constType.setModule(module);
View Full Code Here

                    idl.addType(visitConst(node));
                    break;
                }

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

TOP

Related Classes of org.apache.axis2.corba.exceptions.InvalidIDLException

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.