Package org.omg.CORBA

Examples of org.omg.CORBA.TCKind


            throw _wrapper.setExceptionCalledNullArgs() ;

        // Ensure that the Any contains a SystemException or a
        // UserException. If the UserException is not a declared exception,
        // the client will get an UNKNOWN exception.
        TCKind kind = exc.type().kind();
        if ( kind != TCKind.tk_except )
            throw _wrapper.setExceptionCalledBadType() ;

        _exception = exc;
View Full Code Here


    }

    public String getTypeName() {
        String ret = null;
        if (typeCode != null) {
            TCKind kind = typeCode.kind();
            if (kind != null) {
                switch(kind.value()) {
                    case TCKind._tk_long : ret = "int"; break;
                    case TCKind._tk_ulong : ret = "int"; break;
                    case TCKind._tk_longlong : ret = "long"; break;
                    case TCKind._tk_ulonglong : ret = "long"; break;
                    case TCKind._tk_short : ret = "short"; break;
View Full Code Here

    public static QName convertPrimitiveIdlToSchemaType(QName idlType) {
        return IDL_TO_SCHEMA_TYPES.get(idlType);
    }

    public static QName getPrimitiveIdlTypeFromTypeCode(TypeCode tc) {
        TCKind type = tc.kind();
        QName result = null;

        switch(type.value()) {
        case TCKind._tk_boolean:
            result = CorbaConstants.NT_CORBA_BOOLEAN;
            break;
        case TCKind._tk_char:
            result = CorbaConstants.NT_CORBA_CHAR;
View Full Code Here

        }
        return tc;
    }

    public static TypeCode getPrimitiveTypeCode(ORB orb, QName type) {
        TCKind kind = PRIMITIVE_TYPECODES.get(type);
        if (kind != null) {
            return orb.get_primitive_tc(kind);
        }

        // There is a possiblitity that the idl type will not have its namespace URI set if it has
View Full Code Here

        }
        return name;
    }

    public static boolean isPrimitiveIdlType(QName idltype) {
        TCKind kind = PRIMITIVE_TYPECODES.get(idltype);
        if (kind != null) {
            return true;
        }

        // There is a possiblitity that the idl type will not have its namespace URI set if it has
View Full Code Here

        }
        return value;
    }

    private static Object add(Object o1, Object o2, TypeCode returnType) throws InvalidIDLException {
        TCKind kind = returnType.kind();
        Object valueObj;
        switch (kind.value()) {
            case TCKind._tk_long:
            case TCKind._tk_ulong:
                valueObj = new Integer(((Integer) o1).intValue() + ((Integer) o2).intValue());
                break;
            case TCKind._tk_longlong:
View Full Code Here

        }
        return valueObj;
    }

    private static Object minus(Object o, TypeCode returnType) throws InvalidIDLException {
        TCKind kind = returnType.kind();
        Object valueObj;
        switch (kind.value()) {
            case TCKind._tk_long:
            case TCKind._tk_ulong:
                valueObj = new Integer(-((Integer) o).intValue());
                break;
            case TCKind._tk_longlong:
View Full Code Here

        }
        return valueObj;
    }

    private static Object subtract(Object o1, Object o2, TypeCode returnType) throws InvalidIDLException {
        TCKind kind = returnType.kind();
        Object valueObj;
        switch (kind.value()) {
            case TCKind._tk_long:
            case TCKind._tk_ulong:
                valueObj = new Integer(((Integer) o1).intValue() - ((Integer) o2).intValue());
                break;
            case TCKind._tk_longlong:
View Full Code Here

        }
        return valueObj;
    }

    private static Object multiply(Object o1, Object o2, TypeCode returnType) throws InvalidIDLException {
        TCKind kind = returnType.kind();
        Object valueObj;
        switch (kind.value()) {
            case TCKind._tk_long:
            case TCKind._tk_ulong:
                valueObj = new Integer(((Integer) o1).intValue() * ((Integer) o2).intValue());
                break;
            case TCKind._tk_longlong:
View Full Code Here

        }
        return valueObj;
    }

    private static Object div(Object o1, Object o2, TypeCode returnType) throws InvalidIDLException {
        TCKind kind = returnType.kind();
        Object valueObj;
        switch (kind.value()) {
            case TCKind._tk_long:
            case TCKind._tk_ulong:
                valueObj = new Integer(((Integer) o1).intValue() / ((Integer) o2).intValue());
                break;
            case TCKind._tk_longlong:
View Full Code Here

TOP

Related Classes of org.omg.CORBA.TCKind

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.