Java Code Examples for javax.rmi.CORBA.ValueHandler

The following are top voted examples for showing how to use javax.rmi.CORBA.ValueHandler. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: OpenJSharp   File: ValueUtility.java   View source code 6 votes vote down vote up
private static TypeCode createTypeCodeForClassInternal (ORB orb,
                                                        java.lang.Class c,
                                                        ValueHandler vh,
                                                        IdentityKeyValueStack createdIDs)
{
    // This wrapper method is the protection against infinite recursion.
    TypeCode tc = null;
    String id = (String)createdIDs.get(c);
    if (id != null) {
        return orb.create_recursive_tc(id);
    } else {
        id = vh.getRMIRepositoryID(c);
        if (id == null) id = "";
        // cache the rep id BEFORE creating a new typecode.
        // so that recursive tc can look up the rep id.
        createdIDs.push(c, id);
        tc = createTypeCodeInternal(orb, c, vh, id, createdIDs);
        createdIDs.pop();
        return tc;
    }
}
 
Example 2
Project: OpenJSharp   File: ValueUtility.java   View source code 6 votes vote down vote up
public static TypeCode getPrimitiveTypeCodeForClass (ORB orb,
                                                     Class c,
                                                     ValueHandler vh) {

    if (c == Integer.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_long);
    } else if (c == Byte.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_octet);
    } else if (c == Long.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_longlong);
    } else if (c == Float.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_float);
    } else if (c == Double.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_double);
    } else if (c == Short.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_short);
    } else if (c == Character.TYPE) {
        return orb.get_primitive_tc (((ValueHandlerImpl)vh).getJavaCharTCKind());
    } else if (c == Boolean.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_boolean);
    } else {
        // _REVISIT_ Not sure if this is right.
        return orb.get_primitive_tc (TCKind.tk_any);
    }
}
 
Example 3
Project: openjdk-jdk10   File: ORBUtility.java   View source code 6 votes vote down vote up
/**
 * Returns the maximum stream format version supported by our
 * ValueHandler.
 */
public static byte getMaxStreamFormatVersion() {
    ValueHandler vh;
    try {
        vh = AccessController.doPrivileged(new PrivilegedExceptionAction<ValueHandler>() {
            public ValueHandler run() throws Exception {
                return Util.createValueHandler();
            }
        });
    } catch (PrivilegedActionException e) {
        throw new InternalError(e.getCause());
    }

    if (!(vh instanceof javax.rmi.CORBA.ValueHandlerMultiFormat))
        return ORBConstants.STREAM_FORMAT_VERSION_1;
    else
        return ((ValueHandlerMultiFormat)vh).getMaximumStreamFormatVersion();
}
 
Example 4
Project: openjdk-jdk10   File: ValueUtility.java   View source code 6 votes vote down vote up
private static TypeCode createTypeCodeForClassInternal (ORB orb,
                                                        java.lang.Class c,
                                                        ValueHandler vh,
                                                        IdentityKeyValueStack createdIDs)
{
    // This wrapper method is the protection against infinite recursion.
    TypeCode tc = null;
    String id = (String)createdIDs.get(c);
    if (id != null) {
        return orb.create_recursive_tc(id);
    } else {
        id = vh.getRMIRepositoryID(c);
        if (id == null) id = "";
        // cache the rep id BEFORE creating a new typecode.
        // so that recursive tc can look up the rep id.
        createdIDs.push(c, id);
        tc = createTypeCodeInternal(orb, c, vh, id, createdIDs);
        createdIDs.pop();
        return tc;
    }
}
 
Example 5
Project: openjdk-jdk10   File: ValueUtility.java   View source code 6 votes vote down vote up
public static TypeCode getPrimitiveTypeCodeForClass (ORB orb,
                                                     Class c,
                                                     ValueHandler vh) {

    if (c == Integer.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_long);
    } else if (c == Byte.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_octet);
    } else if (c == Long.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_longlong);
    } else if (c == Float.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_float);
    } else if (c == Double.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_double);
    } else if (c == Short.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_short);
    } else if (c == Character.TYPE) {
        return orb.get_primitive_tc (((ValueHandlerImpl)vh).getJavaCharTCKind());
    } else if (c == Boolean.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_boolean);
    } else {
        // _REVISIT_ Not sure if this is right.
        return orb.get_primitive_tc (TCKind.tk_any);
    }
}
 
Example 6
Project: openjdk9   File: ValueUtility.java   View source code 6 votes vote down vote up
private static TypeCode createTypeCodeForClassInternal (ORB orb,
                                                        java.lang.Class c,
                                                        ValueHandler vh,
                                                        IdentityKeyValueStack createdIDs)
{
    // This wrapper method is the protection against infinite recursion.
    TypeCode tc = null;
    String id = (String)createdIDs.get(c);
    if (id != null) {
        return orb.create_recursive_tc(id);
    } else {
        id = vh.getRMIRepositoryID(c);
        if (id == null) id = "";
        // cache the rep id BEFORE creating a new typecode.
        // so that recursive tc can look up the rep id.
        createdIDs.push(c, id);
        tc = createTypeCodeInternal(orb, c, vh, id, createdIDs);
        createdIDs.pop();
        return tc;
    }
}
 
Example 7
Project: openjdk9   File: ValueUtility.java   View source code 6 votes vote down vote up
public static TypeCode getPrimitiveTypeCodeForClass (ORB orb,
                                                     Class c,
                                                     ValueHandler vh) {

    if (c == Integer.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_long);
    } else if (c == Byte.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_octet);
    } else if (c == Long.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_longlong);
    } else if (c == Float.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_float);
    } else if (c == Double.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_double);
    } else if (c == Short.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_short);
    } else if (c == Character.TYPE) {
        return orb.get_primitive_tc (((ValueHandlerImpl)vh).getJavaCharTCKind());
    } else if (c == Boolean.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_boolean);
    } else {
        // _REVISIT_ Not sure if this is right.
        return orb.get_primitive_tc (TCKind.tk_any);
    }
}
 
Example 8
Project: lookaside_java-1.8.0-openjdk   File: ORBUtility.java   View source code 6 votes vote down vote up
/**
 * Returns the maximum stream format version supported by our
 * ValueHandler.
 */
public static byte getMaxStreamFormatVersion() {
    ValueHandler vh;
    try {
        vh = AccessController.doPrivileged(new PrivilegedExceptionAction<ValueHandler>() {
            public ValueHandler run() throws Exception {
                return Util.createValueHandler();
            }
        });
    } catch (PrivilegedActionException e) {
        throw new InternalError(e.getMessage());
    }

    if (!(vh instanceof javax.rmi.CORBA.ValueHandlerMultiFormat))
        return ORBConstants.STREAM_FORMAT_VERSION_1;
    else
        return ((ValueHandlerMultiFormat)vh).getMaximumStreamFormatVersion();
}
 
Example 9
Project: lookaside_java-1.8.0-openjdk   File: ValueUtility.java   View source code 6 votes vote down vote up
private static TypeCode createTypeCodeForClassInternal (ORB orb,
                                                        java.lang.Class c,
                                                        ValueHandler vh,
                                                        IdentityKeyValueStack createdIDs)
{
    // This wrapper method is the protection against infinite recursion.
    TypeCode tc = null;
    String id = (String)createdIDs.get(c);
    if (id != null) {
        return orb.create_recursive_tc(id);
    } else {
        id = vh.getRMIRepositoryID(c);
        if (id == null) id = "";
        // cache the rep id BEFORE creating a new typecode.
        // so that recursive tc can look up the rep id.
        createdIDs.push(c, id);
        tc = createTypeCodeInternal(orb, c, vh, id, createdIDs);
        createdIDs.pop();
        return tc;
    }
}
 
Example 10
Project: lookaside_java-1.8.0-openjdk   File: ValueUtility.java   View source code 6 votes vote down vote up
public static TypeCode getPrimitiveTypeCodeForClass (ORB orb,
                                                     Class c,
                                                     ValueHandler vh) {

    if (c == Integer.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_long);
    } else if (c == Byte.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_octet);
    } else if (c == Long.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_longlong);
    } else if (c == Float.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_float);
    } else if (c == Double.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_double);
    } else if (c == Short.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_short);
    } else if (c == Character.TYPE) {
        return orb.get_primitive_tc (((ValueHandlerImpl)vh).getJavaCharTCKind());
    } else if (c == Boolean.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_boolean);
    } else {
        // _REVISIT_ Not sure if this is right.
        return orb.get_primitive_tc (TCKind.tk_any);
    }
}
 
Example 11
Project: jdk8u_corba   File: ORBUtility.java   View source code 6 votes vote down vote up
/**
 * Returns the maximum stream format version supported by our
 * ValueHandler.
 */
public static byte getMaxStreamFormatVersion() {
    ValueHandler vh;
    try {
        vh = AccessController.doPrivileged(new PrivilegedExceptionAction<ValueHandler>() {
            public ValueHandler run() throws Exception {
                return Util.createValueHandler();
            }
        });
    } catch (PrivilegedActionException e) {
        throw new InternalError(e.getMessage());
    }

    if (!(vh instanceof javax.rmi.CORBA.ValueHandlerMultiFormat))
        return ORBConstants.STREAM_FORMAT_VERSION_1;
    else
        return ((ValueHandlerMultiFormat)vh).getMaximumStreamFormatVersion();
}
 
Example 12
Project: jdk8u_corba   File: ValueUtility.java   View source code 6 votes vote down vote up
private static TypeCode createTypeCodeForClassInternal (ORB orb,
                                                        java.lang.Class c,
                                                        ValueHandler vh,
                                                        IdentityKeyValueStack createdIDs)
{
    // This wrapper method is the protection against infinite recursion.
    TypeCode tc = null;
    String id = (String)createdIDs.get(c);
    if (id != null) {
        return orb.create_recursive_tc(id);
    } else {
        id = vh.getRMIRepositoryID(c);
        if (id == null) id = "";
        // cache the rep id BEFORE creating a new typecode.
        // so that recursive tc can look up the rep id.
        createdIDs.push(c, id);
        tc = createTypeCodeInternal(orb, c, vh, id, createdIDs);
        createdIDs.pop();
        return tc;
    }
}
 
Example 13
Project: jdk8u_corba   File: ValueUtility.java   View source code 6 votes vote down vote up
public static TypeCode getPrimitiveTypeCodeForClass (ORB orb,
                                                     Class c,
                                                     ValueHandler vh) {

    if (c == Integer.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_long);
    } else if (c == Byte.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_octet);
    } else if (c == Long.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_longlong);
    } else if (c == Float.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_float);
    } else if (c == Double.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_double);
    } else if (c == Short.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_short);
    } else if (c == Character.TYPE) {
        return orb.get_primitive_tc (((ValueHandlerImpl)vh).getJavaCharTCKind());
    } else if (c == Boolean.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_boolean);
    } else {
        // _REVISIT_ Not sure if this is right.
        return orb.get_primitive_tc (TCKind.tk_any);
    }
}
 
Example 14
Project: infobip-open-jdk-8   File: ValueUtility.java   View source code 6 votes vote down vote up
private static TypeCode createTypeCodeForClassInternal (ORB orb,
                                                        java.lang.Class c,
                                                        ValueHandler vh,
                                                        IdentityKeyValueStack createdIDs)
{
    // This wrapper method is the protection against infinite recursion.
    TypeCode tc = null;
    String id = (String)createdIDs.get(c);
    if (id != null) {
        return orb.create_recursive_tc(id);
    } else {
        id = vh.getRMIRepositoryID(c);
        if (id == null) id = "";
        // cache the rep id BEFORE creating a new typecode.
        // so that recursive tc can look up the rep id.
        createdIDs.push(c, id);
        tc = createTypeCodeInternal(orb, c, vh, id, createdIDs);
        createdIDs.pop();
        return tc;
    }
}
 
Example 15
Project: infobip-open-jdk-8   File: ValueUtility.java   View source code 6 votes vote down vote up
public static TypeCode getPrimitiveTypeCodeForClass (ORB orb,
                                                     Class c,
                                                     ValueHandler vh) {

    if (c == Integer.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_long);
    } else if (c == Byte.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_octet);
    } else if (c == Long.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_longlong);
    } else if (c == Float.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_float);
    } else if (c == Double.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_double);
    } else if (c == Short.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_short);
    } else if (c == Character.TYPE) {
        return orb.get_primitive_tc (((ValueHandlerImpl)vh).getJavaCharTCKind());
    } else if (c == Boolean.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_boolean);
    } else {
        // _REVISIT_ Not sure if this is right.
        return orb.get_primitive_tc (TCKind.tk_any);
    }
}
 
Example 16
Project: openjdk-source-code-learn   File: ORBUtility.java   View source code 6 votes vote down vote up
/**
 * Creates the correct ValueHandler for the given ORB,
 * querying ORBVersion information.  If the ORB or
 * ORBVersion is null, gets the ValueHandler from
 * Util.createValueHandler.
 */
public static ValueHandler createValueHandler(ORB orb) {

    if (orb == null)
        return Util.createValueHandler();

    ORBVersion version = orb.getORBVersion();

    if (version == null)
        return Util.createValueHandler();

    if (version.equals(ORBVersionFactory.getOLD()))
        return new ValueHandlerImpl_1_3();
    if (version.equals(ORBVersionFactory.getNEW()))
        return new ValueHandlerImpl_1_3_1();

    return Util.createValueHandler();
}
 
Example 17
Project: openjdk-source-code-learn   File: ValueUtility.java   View source code 6 votes vote down vote up
private static TypeCode createTypeCodeForClassInternal (ORB orb,
                                                        java.lang.Class c,
                                                        ValueHandler vh,
                                                        IdentityKeyValueStack createdIDs)
{
    // This wrapper method is the protection against infinite recursion.
    TypeCode tc = null;
    String id = (String)createdIDs.get(c);
    if (id != null) {
        return orb.create_recursive_tc(id);
    } else {
        id = vh.getRMIRepositoryID(c);
        if (id == null) id = "";
        // cache the rep id BEFORE creating a new typecode.
        // so that recursive tc can look up the rep id.
        createdIDs.push(c, id);
        tc = createTypeCodeInternal(orb, c, vh, id, createdIDs);
        createdIDs.pop();
        return tc;
    }
}
 
Example 18
Project: openjdk-source-code-learn   File: ValueUtility.java   View source code 6 votes vote down vote up
public static TypeCode getPrimitiveTypeCodeForClass (ORB orb,
                                                     Class c,
                                                     ValueHandler vh) {

    if (c == Integer.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_long);
    } else if (c == Byte.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_octet);
    } else if (c == Long.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_longlong);
    } else if (c == Float.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_float);
    } else if (c == Double.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_double);
    } else if (c == Short.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_short);
    } else if (c == Character.TYPE) {
        return orb.get_primitive_tc (((ValueHandlerImpl)vh).getJavaCharTCKind());
    } else if (c == Boolean.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_boolean);
    } else {
        // _REVISIT_ Not sure if this is right.
        return orb.get_primitive_tc (TCKind.tk_any);
    }
}
 
Example 19
Project: OLD-OpenJDK8   File: ValueUtility.java   View source code 6 votes vote down vote up
private static TypeCode createTypeCodeForClassInternal (ORB orb,
                                                        java.lang.Class c,
                                                        ValueHandler vh,
                                                        IdentityKeyValueStack createdIDs)
{
    // This wrapper method is the protection against infinite recursion.
    TypeCode tc = null;
    String id = (String)createdIDs.get(c);
    if (id != null) {
        return orb.create_recursive_tc(id);
    } else {
        id = vh.getRMIRepositoryID(c);
        if (id == null) id = "";
        // cache the rep id BEFORE creating a new typecode.
        // so that recursive tc can look up the rep id.
        createdIDs.push(c, id);
        tc = createTypeCodeInternal(orb, c, vh, id, createdIDs);
        createdIDs.pop();
        return tc;
    }
}
 
Example 20
Project: OLD-OpenJDK8   File: ValueUtility.java   View source code 6 votes vote down vote up
public static TypeCode getPrimitiveTypeCodeForClass (ORB orb,
                                                     Class c,
                                                     ValueHandler vh) {

    if (c == Integer.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_long);
    } else if (c == Byte.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_octet);
    } else if (c == Long.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_longlong);
    } else if (c == Float.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_float);
    } else if (c == Double.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_double);
    } else if (c == Short.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_short);
    } else if (c == Character.TYPE) {
        return orb.get_primitive_tc (((ValueHandlerImpl)vh).getJavaCharTCKind());
    } else if (c == Boolean.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_boolean);
    } else {
        // _REVISIT_ Not sure if this is right.
        return orb.get_primitive_tc (TCKind.tk_any);
    }
}
 
Example 21
Project: openjdk-orb   File: ORBUtility.java   View source code 6 votes vote down vote up
/**
 * Returns the maximum stream format version supported by our
 * ValueHandler.
 */
public static byte getMaxStreamFormatVersion() {
    ValueHandler vh;
    try {
        vh = AccessController.doPrivileged(new PrivilegedExceptionAction<ValueHandler>() {
            public ValueHandler run() throws Exception {
                return Util.createValueHandler();
            }
        });
    } catch (PrivilegedActionException e) {
        throw new InternalError(e.getMessage());
    }

    if (!(vh instanceof javax.rmi.CORBA.ValueHandlerMultiFormat))
        return ORBConstants.STREAM_FORMAT_VERSION_1;
    else
        return ((ValueHandlerMultiFormat)vh).getMaximumStreamFormatVersion();
}
 
Example 22
Project: openjdk-orb   File: ValueUtility.java   View source code 6 votes vote down vote up
private static TypeCode createTypeCodeForClassInternal (ORB orb,
                                                        java.lang.Class c,
                                                        ValueHandler vh,
                                                        IdentityKeyValueStack createdIDs)
{
    // This wrapper method is the protection against infinite recursion.
    TypeCode tc = null;
    String id = (String)createdIDs.get(c);
    if (id != null) {
        return orb.create_recursive_tc(id);
    } else {
        id = vh.getRMIRepositoryID(c);
        if (id == null) id = "";
        // cache the rep id BEFORE creating a new typecode.
        // so that recursive tc can look up the rep id.
        createdIDs.push(c, id);
        tc = createTypeCodeInternal(orb, c, vh, id, createdIDs);
        createdIDs.pop();
        return tc;
    }
}
 
Example 23
Project: openjdk-orb   File: ValueUtility.java   View source code 6 votes vote down vote up
public static TypeCode getPrimitiveTypeCodeForClass (ORB orb,
                                                     Class c,
                                                     ValueHandler vh) {

    if (c == Integer.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_long);
    } else if (c == Byte.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_octet);
    } else if (c == Long.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_longlong);
    } else if (c == Float.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_float);
    } else if (c == Double.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_double);
    } else if (c == Short.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_short);
    } else if (c == Character.TYPE) {
        return orb.get_primitive_tc (((ValueHandlerImpl)vh).getJavaCharTCKind());
    } else if (c == Boolean.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_boolean);
    } else {
        // _REVISIT_ Not sure if this is right.
        return orb.get_primitive_tc (TCKind.tk_any);
    }
}
 
Example 24
Project: openjdk-icedtea7   File: ValueUtility.java   View source code 6 votes vote down vote up
private static TypeCode createTypeCodeForClassInternal (ORB orb,
                                                        java.lang.Class c,
                                                        ValueHandler vh,
                                                        IdentityKeyValueStack createdIDs)
{
    // This wrapper method is the protection against infinite recursion.
    TypeCode tc = null;
    String id = (String)createdIDs.get(c);
    if (id != null) {
        return orb.create_recursive_tc(id);
    } else {
        id = vh.getRMIRepositoryID(c);
        if (id == null) id = "";
        // cache the rep id BEFORE creating a new typecode.
        // so that recursive tc can look up the rep id.
        createdIDs.push(c, id);
        tc = createTypeCodeInternal(orb, c, vh, id, createdIDs);
        createdIDs.pop();
        return tc;
    }
}
 
Example 25
Project: openjdk-icedtea7   File: ValueUtility.java   View source code 6 votes vote down vote up
public static TypeCode getPrimitiveTypeCodeForClass (ORB orb,
                                                     Class c,
                                                     ValueHandler vh) {

    if (c == Integer.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_long);
    } else if (c == Byte.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_octet);
    } else if (c == Long.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_longlong);
    } else if (c == Float.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_float);
    } else if (c == Double.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_double);
    } else if (c == Short.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_short);
    } else if (c == Character.TYPE) {
        return orb.get_primitive_tc (((ValueHandlerImpl)vh).getJavaCharTCKind());
    } else if (c == Boolean.TYPE) {
        return orb.get_primitive_tc (TCKind.tk_boolean);
    } else {
        // _REVISIT_ Not sure if this is right.
        return orb.get_primitive_tc (TCKind.tk_any);
    }
}
 
Example 26
Project: OpenJSharp   File: ORBUtility.java   View source code 5 votes vote down vote up
/**
 * Returns the maximum stream format version supported by our
 * ValueHandler.
 */
public static byte getMaxStreamFormatVersion() {
    ValueHandler vh = Util.createValueHandler();

    if (!(vh instanceof javax.rmi.CORBA.ValueHandlerMultiFormat))
        return ORBConstants.STREAM_FORMAT_VERSION_1;
    else
        return ((ValueHandlerMultiFormat)vh).getMaximumStreamFormatVersion();
}
 
Example 27
Project: OpenJSharp   File: ValueUtility.java   View source code 5 votes vote down vote up
public static TypeCode createTypeCodeForClass (ORB orb, java.lang.Class c, ValueHandler vh) {
    // Maps classes to repositoryIDs strings. This is used to detect recursive types.
    IdentityKeyValueStack createdIDs = new IdentityKeyValueStack();
    // Stores all types created for resolving indirect types at the end.
    TypeCode tc = createTypeCodeForClassInternal(orb, c, vh, createdIDs);
    return tc;
}
 
Example 28
Project: openjdk-jdk10   File: ORBUtility.java   View source code 5 votes vote down vote up
/**
 * Return default ValueHandler
 */
public static ValueHandler createValueHandler() {
    ValueHandler vh;
    try {
        vh = AccessController.doPrivileged(new PrivilegedExceptionAction<ValueHandler>() {
            public ValueHandler run() throws Exception {
    return Util.createValueHandler();
}
        });
    } catch (PrivilegedActionException e) {
        throw new InternalError(e.getCause());
    }
    return vh;
}
 
Example 29
Project: openjdk-jdk10   File: ValueUtility.java   View source code 5 votes vote down vote up
public static TypeCode createTypeCodeForClass (ORB orb, java.lang.Class c, ValueHandler vh) {
    // Maps classes to repositoryIDs strings. This is used to detect recursive types.
    IdentityKeyValueStack createdIDs = new IdentityKeyValueStack();
    // Stores all types created for resolving indirect types at the end.
    TypeCode tc = createTypeCodeForClassInternal(orb, c, vh, createdIDs);
    return tc;
}
 
Example 30
Project: openjdk9   File: ORBUtility.java   View source code 5 votes vote down vote up
/**
 * Returns the maximum stream format version supported by our
 * ValueHandler.
 */
public static byte getMaxStreamFormatVersion() {
    ValueHandler vh = Util.createValueHandler();

    if (!(vh instanceof javax.rmi.CORBA.ValueHandlerMultiFormat))
        return ORBConstants.STREAM_FORMAT_VERSION_1;
    else
        return ((ValueHandlerMultiFormat)vh).getMaximumStreamFormatVersion();
}
 
Example 31
Project: openjdk9   File: ValueUtility.java   View source code 5 votes vote down vote up
public static TypeCode createTypeCodeForClass (ORB orb, java.lang.Class c, ValueHandler vh) {
    // Maps classes to repositoryIDs strings. This is used to detect recursive types.
    IdentityKeyValueStack createdIDs = new IdentityKeyValueStack();
    // Stores all types created for resolving indirect types at the end.
    TypeCode tc = createTypeCodeForClassInternal(orb, c, vh, createdIDs);
    return tc;
}
 
Example 32
Project: lookaside_java-1.8.0-openjdk   File: ORBUtility.java   View source code 5 votes vote down vote up
/**
 * Return default ValueHandler
 */
public static ValueHandler createValueHandler() {
    ValueHandler vh;
    try {
        vh = AccessController.doPrivileged(new PrivilegedExceptionAction<ValueHandler>() {
            public ValueHandler run() throws Exception {
    return Util.createValueHandler();
}
        });
    } catch (PrivilegedActionException e) {
        throw new InternalError(e.getMessage());
    }
    return vh;
}
 
Example 33
Project: lookaside_java-1.8.0-openjdk   File: ValueUtility.java   View source code 5 votes vote down vote up
public static TypeCode createTypeCodeForClass (ORB orb, java.lang.Class c, ValueHandler vh) {
    // Maps classes to repositoryIDs strings. This is used to detect recursive types.
    IdentityKeyValueStack createdIDs = new IdentityKeyValueStack();
    // Stores all types created for resolving indirect types at the end.
    TypeCode tc = createTypeCodeForClassInternal(orb, c, vh, createdIDs);
    return tc;
}
 
Example 34
Project: jdk8u_corba   File: ORBUtility.java   View source code 5 votes vote down vote up
/**
 * Return default ValueHandler
 */
public static ValueHandler createValueHandler() {
    ValueHandler vh;
    try {
        vh = AccessController.doPrivileged(new PrivilegedExceptionAction<ValueHandler>() {
            public ValueHandler run() throws Exception {
    return Util.createValueHandler();
}
        });
    } catch (PrivilegedActionException e) {
        throw new InternalError(e.getMessage());
    }
    return vh;
}
 
Example 35
Project: jdk8u_corba   File: ValueUtility.java   View source code 5 votes vote down vote up
public static TypeCode createTypeCodeForClass (ORB orb, java.lang.Class c, ValueHandler vh) {
    // Maps classes to repositoryIDs strings. This is used to detect recursive types.
    IdentityKeyValueStack createdIDs = new IdentityKeyValueStack();
    // Stores all types created for resolving indirect types at the end.
    TypeCode tc = createTypeCodeForClassInternal(orb, c, vh, createdIDs);
    return tc;
}
 
Example 36
Project: infobip-open-jdk-8   File: ORBUtility.java   View source code 5 votes vote down vote up
/**
 * Returns the maximum stream format version supported by our
 * ValueHandler.
 */
public static byte getMaxStreamFormatVersion() {
    ValueHandler vh = Util.createValueHandler();

    if (!(vh instanceof javax.rmi.CORBA.ValueHandlerMultiFormat))
        return ORBConstants.STREAM_FORMAT_VERSION_1;
    else
        return ((ValueHandlerMultiFormat)vh).getMaximumStreamFormatVersion();
}
 
Example 37
Project: infobip-open-jdk-8   File: ValueUtility.java   View source code 5 votes vote down vote up
public static TypeCode createTypeCodeForClass (ORB orb, java.lang.Class c, ValueHandler vh) {
    // Maps classes to repositoryIDs strings. This is used to detect recursive types.
    IdentityKeyValueStack createdIDs = new IdentityKeyValueStack();
    // Stores all types created for resolving indirect types at the end.
    TypeCode tc = createTypeCodeForClassInternal(orb, c, vh, createdIDs);
    return tc;
}
 
Example 38
Project: openjdk-source-code-learn   File: ORBUtility.java   View source code 5 votes vote down vote up
/**
 * Returns the maximum stream format version supported by our
 * ValueHandler.
 */
public static byte getMaxStreamFormatVersion() {
    ValueHandler vh = Util.createValueHandler();

    if (!(vh instanceof javax.rmi.CORBA.ValueHandlerMultiFormat))
        return ORBConstants.STREAM_FORMAT_VERSION_1;
    else
        return ((ValueHandlerMultiFormat)vh).getMaximumStreamFormatVersion();
}
 
Example 39
Project: openjdk-source-code-learn   File: ValueUtility.java   View source code 5 votes vote down vote up
public static TypeCode createTypeCodeForClass (ORB orb, java.lang.Class c, ValueHandler vh) {
    // Maps classes to repositoryIDs strings. This is used to detect recursive types.
    IdentityKeyValueStack createdIDs = new IdentityKeyValueStack();
    // Stores all types created for resolving indirect types at the end.
    TypeCode tc = createTypeCodeForClassInternal(orb, c, vh, createdIDs);
    return tc;
}
 
Example 40
Project: OLD-OpenJDK8   File: ORBUtility.java   View source code 5 votes vote down vote up
/**
 * Returns the maximum stream format version supported by our
 * ValueHandler.
 */
public static byte getMaxStreamFormatVersion() {
    ValueHandler vh = Util.createValueHandler();

    if (!(vh instanceof javax.rmi.CORBA.ValueHandlerMultiFormat))
        return ORBConstants.STREAM_FORMAT_VERSION_1;
    else
        return ((ValueHandlerMultiFormat)vh).getMaximumStreamFormatVersion();
}