Package org.omg.CORBA

Examples of org.omg.CORBA.TypeCode.kind()


    private TypeCode realType(TypeCode aType) {
        TypeCode realType = aType;
        try {
            // Note: Indirect types are handled in kind() method
            while (realType.kind().value() == TCKind._tk_alias) {
                realType = realType.content_type();
            }
        } catch (BadKind bad) {
            // impossible
            throw wrapper.badkindCannotOccur() ;
View Full Code Here


        myRealType = realType(myRealType);
        TypeCode otherRealType = realType(tc);

        // If results of the kind operation on each typecode differ,
        // equivalent returns false.
        if (myRealType.kind().value() != otherRealType.kind().value()) {
            return false;
        }

        String myID = null;
        String otherID = null;
View Full Code Here

    }

    private boolean isCustomType(ValueHelper helper) {
        try{
            TypeCode tc = helper.get_type();
            int kind = tc.kind().value();
            if (kind == TCKind._tk_value) {
                return (tc.type_modifier() == org.omg.CORBA.VM_CUSTOM.value);
            }
        } catch(BadKind ex) {
            throw wrapper.badKind(ex) ;
View Full Code Here

    }

    private boolean isCustomType(ValueHelper helper) {
        try{
            TypeCode tc = helper.get_type();
            int kind = tc.kind().value();
            if (kind == TCKind._tk_value) {
                return (tc.type_modifier() == org.omg.CORBA.VM_CUSTOM.value);
            }
        } catch(BadKind ex) {
            throw wrapper.badKind(ex) ;
View Full Code Here

    }

    public static Object extractValue(DataType returnType, Any returned) {
        Object returnValue = null;
        TypeCode typeCode = returnType.getTypeCode();
        switch(typeCode.kind().value()) {
            case TCKind._tk_void: returnValue = null; break;
            case TCKind._tk_long: returnValue = new Integer(returned.extract_long()); break;
            case TCKind._tk_ulong: returnValue = new Integer(returned.extract_ulong()); break;
            case TCKind._tk_longlong: returnValue = new Long(returned.extract_longlong()); break;
            case TCKind._tk_ulonglong: returnValue = new Long(returned.extract_ulonglong()); break;
View Full Code Here

                        //    * signed & unsigned long
                        //    * signed & unsigned long long
                        //    * char
                        //    * boolean
                        //    * enum
                        switch (discTC.kind().value()) {
                        case TCKind._tk_short:
                            member.label.insert_short(Short.parseShort(cs.getLabel()));
                            break;
                        case TCKind._tk_ushort:
                            member.label.insert_ushort(Short.parseShort(cs.getLabel()));
View Full Code Here

        CorbaObjectHandler handler = null;

        TypeCode tc = CorbaUtils.getTypeCode(orb, idlType, typeMaps);
        if (CorbaUtils.isPrimitiveIdlType(idlType)) {
            // Any is a special primitive
            if (tc.kind().value() == TCKind._tk_any) {
                handler = new CorbaAnyHandler(name, idlType, tc, null);               
            } else {
                handler = new CorbaPrimitiveHandler(name, idlType, tc, null);
            }
        } else {
View Full Code Here

                handler = new CorbaPrimitiveHandler(name, idlType, tc, null);
            }
        } else {
            CorbaTypeImpl type = CorbaUtils.getCorbaType(idlType, typeMaps);

            switch (tc.kind().value()) {
            case TCKind._tk_alias:
                // For typedefs, we'll create the handler for the Object that is typedef'd.  Reading and
                // writing will use an Alias object and typecode, find the correct base type and then use
                // this handler to marshal/unmarshal data
                Alias aliasType = (Alias)type;
View Full Code Here

    public Object readAny(org.omg.CORBA.portable.InputStream in)
            throws org.omg.CORBA.SystemException {
        Any any = in.read_any();
        TypeCode typecode = any.type();

        switch (typecode.kind().value()) {

        case TCKind._tk_null:
        case TCKind._tk_void:
            return null;
View Full Code Here

                id = typecode.id();
            } catch (org.omg.CORBA.TypeCodePackage.BadKind ex) {
            }

            throw new MARSHAL("cannot extract " + id + " ("
                    + typecode.kind().value() + ") value from Any");
        }
    }

    /**
     * Write a remote object. It must already be exported.
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.