Examples of TCKind


Examples of org.omg.CORBA.TCKind

    /**
     * Return the LocalIDLType for the given TypeCode.
     */
    static LocalIDLType getIDLType(TypeCode typeCode, RepositoryImpl repository) {
        TCKind tcKind = typeCode.kind();

        if (PrimitiveDefImpl.isPrimitiveTCKind(tcKind))
            return new PrimitiveDefImpl(typeCode, repository);

        if (tcKind == TCKind.tk_sequence)
            return repository.getSequenceImpl(typeCode);

        if (tcKind == TCKind.tk_value || tcKind == TCKind.tk_value_box ||
                tcKind == TCKind.tk_alias || tcKind == TCKind.tk_struct ||
                tcKind == TCKind.tk_union || tcKind == TCKind.tk_enum ||
                tcKind == TCKind.tk_objref) {
            try {
                return (LocalIDLType) repository._lookup_id(typeCode.id());
            } catch (BadKind ex) {
                throw JacORBLogger.ROOT_LOGGER.badKindForTypeCode(tcKind.value());
            }
        }

        throw JacORBLogger.ROOT_LOGGER.badKindForTypeCode(tcKind.value());
    }
View Full Code Here

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

Examples of org.omg.CORBA.TCKind

    }

    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

Examples of org.omg.CORBA.TCKind

    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

Examples of org.omg.CORBA.TCKind

        }
        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

Examples of org.omg.CORBA.TCKind

        }
        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

Examples of org.omg.CORBA.TCKind

        }
        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

Examples of org.omg.CORBA.TCKind

        }
        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

Examples of org.omg.CORBA.TCKind

        }
        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

Examples of org.omg.CORBA.TCKind

        }
        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
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.