Examples of InvalidIDLException


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

                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

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

        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

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

                    idl.addType(visitConst(node));
                    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 && 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

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

        if (dataType == null && "any".equals(typeName)) {
            dataType = new AnyType();
        }

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

        return dataType;
    }
View Full Code Here

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

                    //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

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

                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

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

        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

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_fixed:
                valueObj = ((BigDecimal) o1).add((BigDecimal) o2);
                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.