iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/marshal/CDRStream.java
public static String abbrevFor(Class clz) {
        if (clz == Boolean.TYPE) {
            return "Z";
        } else if (clz == Byte.TYPE) {
            return "B";
        } else if (clz == Character.TYPE) {
            return "C";
        } else if (clz == Double.TYPE) {
            return "D";
        } else if (clz == Float.TYPE) {
            return "F";
        } else if (clz == Integer.TYPE) {
            return "I";
        } else if (clz == Long.TYPE) {
            return "J";
        } else if (clz == Short.TYPE) {
            return "S";
        } else if (clz == Void.TYPE) {
            return "V";
        } else if (clz == String.class) {
            return "G"; // strinG
        } else if (RmiIdlUtil.isRMIIDLRemoteInterface(clz)) {
            return "R" + clz.getName(); // Remote interface
        } else if (clz == org.omg.CORBA.Object.class) {
            return "M"; // oMg (CORBA Object)
        } else if (org.omg.CORBA.Object.class.isAssignableFrom(clz)) {
            return "N" + clz.getName(); // IDL iNterface
        } else if (IDLEntity.class.isAssignableFrom(clz)) {
            return "L" + clz.getName(); // vaLuetype
        } else if (clz == Serializable.class) {
            return "E"; // sErializablE
        } else if (RmiIdlUtil.isAbstractInterface(clz)) {
            return "A"; // Abstract interface
        } else if (Serializable.class.isAssignableFrom(clz)) {
            return "L" + clz.getName(); // vaLuetype
        } else if (Externalizable.class.isAssignableFrom(clz)) {
            return "X"; // eXternalizable
        } else if (clz == Object.class) {
            return "O"; // Object
        } else {
            return "L" + clz.getName(); // vaLuetype
        }
    }
public static String abbrevFor(Class clz) {
        if (clz == Boolean.TYPE) {
            return "Z";
        } else if (clz == Byte.TYPE) {
            return "B";
        } else if (clz == Character.TYPE) {
            return "C";
        } else if (clz == Double.TYPE) {
            return "D";
        } else if (clz == Float.TYPE) {
            return "F";
        } else if (clz == Integer.TYPE) {
            return "I";
        } else if (clz == Long.TYPE) {
            return "J";
        } else if (clz == Short.TYPE) {
            return "S";
        } else if (clz == Void.TYPE) {
            return "V";
        } else if (clz == String.class) {
            return "G"; // strinG
        } else if (RmiIdlUtil.isRMIIDLRemoteInterface(clz)) {
            return "R" + clz.getName(); // Remote interface
        } else if (clz == org.omg.CORBA.Object.class) {
            return "M"; // oMg (CORBA Object)
        } else if (org.omg.CORBA.Object.class.isAssignableFrom(clz)) {
            return "N" + clz.getName(); // IDL iNterface
        } else if (IDLEntity.class.isAssignableFrom(clz)) {
            return "L" + clz.getName(); // vaLuetype
        } else if (clz == Serializable.class) {
            return "E"; // sErializablE
        } else if (RmiIdlUtil.isAbstractInterface(clz)) {
            return "A"; // Abstract interface
        } else if (Serializable.class.isAssignableFrom(clz)) {
            return "L" + clz.getName(); // vaLuetype
        } else if (Externalizable.class.isAssignableFrom(clz)) {
            return "X"; // eXternalizable
        } else if (clz == Object.class) {
            return "O"; // Object
        } else {
            return "L" + clz.getName(); // vaLuetype
        }
    }
public static String abbrevFor ( Class clz ) { if ( clz == Boolean . TYPE ) { return "Z" ; } else if ( clz == Byte . TYPE ) { return "B" ; } else if ( clz == Character . TYPE ) { return "C" ; } else if ( clz == Double . TYPE ) { return "D" ; } else if ( clz == Float . TYPE ) { return "F" ; } else if ( clz == Integer . TYPE ) { return "I" ; } else if ( clz == Long . TYPE ) { return "J" ; } else if ( clz == Short . TYPE ) { return "S" ; } else if ( clz == Void . TYPE ) { return "V" ; } else if ( clz == String . class ) { return "G" ; // strinG } else if ( RmiIdlUtil . isRMIIDLRemoteInterface ( clz ) ) { return "R" + clz . getName ( ) ; // Remote interface } else if ( clz == org . omg . CORBA . Object . class ) { return "M" ; // oMg (CORBA Object) } else if ( org . omg . CORBA . Object . class . isAssignableFrom ( clz ) ) { return "N" + clz . getName ( ) ; // IDL iNterface } else if ( IDLEntity . class . isAssignableFrom ( clz ) ) { return "L" + clz . getName ( ) ; // vaLuetype } else if ( clz == Serializable . class ) { return "E" ; // sErializablE } else if ( RmiIdlUtil . isAbstractInterface ( clz ) ) { return "A" ; // Abstract interface } else if ( Serializable . class . isAssignableFrom ( clz ) ) { return "L" + clz . getName ( ) ; // vaLuetype } else if ( Externalizable . class . isAssignableFrom ( clz ) ) { return "X" ; // eXternalizable } else if ( clz == Object . class ) { return "O" ; // Object } else { return "L" + clz . getName ( ) ; // vaLuetype } }
Returns the abbreviated name of the marshaller for given
<code>Class</code>.
<p/>
<p>Abbreviated names of marshallers for basic types follow the usual
Java convention:
<br>
<pre>
type           abbrev name
boolean           "Z"
byte              "B"
char              "C"
double            "D"
float             "F"
int               "I"
long              "J"
short             "S"
void              "V"
</pre>
<p/>
<p>The abbreviated names of marshallers for object types are:
<br>
<pre>
java.lang.String                     "G" (strinG)
RMI remote interface                 "R" + interfaceName
RMI abstract interface               "A"
serializable                         "E" (sErializablE)
valuetype                            "L" + className
externalizable                       "X" (eXternalizable)
org.omg.CORBA.Object                 "M" (oMg)
IDL interface                        "N" + interfaceName
java.lang.Object                     "O"
</pre>
<p/>
<p>As an example: the abbreviated name of a marshaller for a valuetype
class named <code>Foo</code> is the string <code>"LFoo"</code>.
Returns the abbreviated name of the marshaller for given <code > Class< / code > . <p / > <p > Abbreviated names of marshallers for basic types follow the usual Java convention : <br > <pre > type abbrev name boolean Z byte B char C double D float F int I long J short S void V < / pre > <p / > <p > The abbreviated names of marshallers for object types are : <br > <pre > java . lang . String G ( strinG ) RMI remote interface R + interfaceName RMI abstract interface A serializable E ( sErializablE ) valuetype L + className externalizable X ( eXternalizable ) org . omg . CORBA . Object M ( oMg ) IDL interface N + interfaceName java . lang . Object O < / pre > <p / > <p > As an example : the abbreviated name of a marshaller for a valuetype class named <code > Foo< / code > is the string <code > LFoo < / code > .