iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/ir/InterfaceRepository.java
private TypeCode getTypeCode(Class cls)
            throws IRConstructionException, RMIIIOPViolationException {
        if (cls == null)
            throw IIOPLogger.ROOT_LOGGER.invalidNullClass();

        TypeCode ret = (TypeCode) typeCodeMap.get(cls);

        if (ret == null) {
            if (cls == java.lang.String.class)
                ret = getJavaLangString().type();
            else if (cls == java.lang.Object.class)
                ret = getJavaLang_Object().type();
            else if (cls == java.lang.Class.class)
                ret = getJavaxRmiCORBAClassDesc().type();
            else if (cls == java.io.Serializable.class)
                ret = getJavaIoSerializable().type();
            else if (cls == java.io.Externalizable.class)
                ret = getJavaIoExternalizable().type();
            else {
                // Try adding a mapping of the the class to the IR
                addClass(cls);

                // Lookup again, it should be there now.
                ret = (TypeCode) typeCodeMap.get(cls);

                if (ret == null)
                    throw IIOPLogger.ROOT_LOGGER.unknownTypeCodeForClass(cls.getName());
                else
                    return ret;
            }

            typeCodeMap.put(cls, ret);
        }

        return ret;
    }
private TypeCode getTypeCode(Class cls)
            throws IRConstructionException, RMIIIOPViolationException {
        if (cls == null)
            throw IIOPLogger.ROOT_LOGGER.invalidNullClass();

        TypeCode ret = (TypeCode) typeCodeMap.get(cls);

        if (ret == null) {
            if (cls == java.lang.String.class)
                ret = getJavaLangString().type();
            else if (cls == java.lang.Object.class)
                ret = getJavaLang_Object().type();
            else if (cls == java.lang.Class.class)
                ret = getJavaxRmiCORBAClassDesc().type();
            else if (cls == java.io.Serializable.class)
                ret = getJavaIoSerializable().type();
            else if (cls == java.io.Externalizable.class)
                ret = getJavaIoExternalizable().type();
            else {
                // Try adding a mapping of the the class to the IR
                addClass(cls);

                // Lookup again, it should be there now.
                ret = (TypeCode) typeCodeMap.get(cls);

                if (ret == null)
                    throw IIOPLogger.ROOT_LOGGER.unknownTypeCodeForClass(cls.getName());
                else
                    return ret;
            }

            typeCodeMap.put(cls, ret);
        }

        return ret;
    }
private TypeCode getTypeCode ( Class cls ) throws IRConstructionException , RMIIIOPViolationException { if ( cls == null ) throw IIOPLogger . ROOT_LOGGER . invalidNullClass ( ) ; TypeCode ret = ( TypeCode ) typeCodeMap . get ( cls ) ; if ( ret == null ) { if ( cls == java . lang . String . class ) ret = getJavaLangString ( ) . type ( ) ; else if ( cls == java . lang . Object . class ) ret = getJavaLang_Object ( ) . type ( ) ; else if ( cls == java . lang . Class . class ) ret = getJavaxRmiCORBAClassDesc ( ) . type ( ) ; else if ( cls == java . io . Serializable . class ) ret = getJavaIoSerializable ( ) . type ( ) ; else if ( cls == java . io . Externalizable . class ) ret = getJavaIoExternalizable ( ) . type ( ) ; else { // Try adding a mapping of the the class to the IR addClass ( cls ) ; // Lookup again, it should be there now. ret = ( TypeCode ) typeCodeMap . get ( cls ) ; if ( ret == null ) throw IIOPLogger . ROOT_LOGGER . unknownTypeCodeForClass ( cls . getName ( ) ) ; else return ret ; } typeCodeMap . put ( cls , ret ) ; } return ret ; }
Returns the TypeCode IDL TypeCodes for parameter, result, attribute
and value member types.
This may provoke a mapping of the class argument.
<p/>
Exception classes map to both values and exceptions. For these, this
method returns the typecode for the value, and you can use the
<code>getExceptionTypeCode</code> TODO method to get the typecode for the
mapping to exception.

@param cls The Java class denoting the java type.
Returns the TypeCode IDL TypeCodes for parameter result attribute and value member types . This may provoke a mapping of the class argument . <p / > Exception classes map to both values and exceptions . For these this method returns the typecode for the value and you can use the <code > getExceptionTypeCode< / code > TODO method to get the typecode for the mapping to exception .