iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/marshal/CDRStream.java
public static CDRStreamReader readerFor(String s, ClassLoader cl) {
        switch (s.charAt(0)) {

            case 'A':
                return AbstractInterfaceReader.instance;
            case 'B':
                return ByteReader.instance;
            case 'C':
                return CharReader.instance;
            case 'D':
                return DoubleReader.instance;
            case 'E':
                return SerializableReader.instance;
            case 'F':
                return FloatReader.instance;
            case 'G':
                return StringReader.instance;
            case 'I':
                return IntReader.instance;
            case 'J':
                return LongReader.instance;
            case 'L':
                try {
                    // Use Class.forName() (rather than cl.loadClass()), because
                    // Class.forName() loads Java array types (which are valuetypes).
                    return new ValuetypeReader(Class.forName(s.substring(1),
                            true,
                            cl));
                } catch (ClassNotFoundException e) {
                    throw IIOPLogger.ROOT_LOGGER.errorLoadingClass(s.substring(1), e);
                }
            case 'M':
                return CorbaObjectReader.instance;
            case 'N':
                try {
                    return new IdlInterfaceReader(cl.loadClass(s.substring(1)));
                } catch (ClassNotFoundException e) {
                    throw IIOPLogger.ROOT_LOGGER.errorLoadingClass(s.substring(1), e);
                }
            case 'O':
                return ObjectReader.instance;
            case 'R':
                try {
                    return new RemoteReader(cl.loadClass(s.substring(1)));
                } catch (ClassNotFoundException e) {
                    throw IIOPLogger.ROOT_LOGGER.errorLoadingClass(s.substring(1), e);
                }
            case 'S':
                return ShortReader.instance;
            case 'V':
                return null;
            case 'X':
                return ExternalizableReader.instance;
            case 'Z':
                return BooleanReader.instance;
            default:
                return null;
        }
    }
public static CDRStreamReader readerFor(String s, ClassLoader cl) {
        switch (s.charAt(0)) {

            case 'A':
                return AbstractInterfaceReader.instance;
            case 'B':
                return ByteReader.instance;
            case 'C':
                return CharReader.instance;
            case 'D':
                return DoubleReader.instance;
            case 'E':
                return SerializableReader.instance;
            case 'F':
                return FloatReader.instance;
            case 'G':
                return StringReader.instance;
            case 'I':
                return IntReader.instance;
            case 'J':
                return LongReader.instance;
            case 'L':
                try {
                    // Use Class.forName() (rather than cl.loadClass()), because
                    // Class.forName() loads Java array types (which are valuetypes).
                    return new ValuetypeReader(Class.forName(s.substring(1),
                            true,
                            cl));
                } catch (ClassNotFoundException e) {
                    throw IIOPLogger.ROOT_LOGGER.errorLoadingClass(s.substring(1), e);
                }
            case 'M':
                return CorbaObjectReader.instance;
            case 'N':
                try {
                    return new IdlInterfaceReader(cl.loadClass(s.substring(1)));
                } catch (ClassNotFoundException e) {
                    throw IIOPLogger.ROOT_LOGGER.errorLoadingClass(s.substring(1), e);
                }
            case 'O':
                return ObjectReader.instance;
            case 'R':
                try {
                    return new RemoteReader(cl.loadClass(s.substring(1)));
                } catch (ClassNotFoundException e) {
                    throw IIOPLogger.ROOT_LOGGER.errorLoadingClass(s.substring(1), e);
                }
            case 'S':
                return ShortReader.instance;
            case 'V':
                return null;
            case 'X':
                return ExternalizableReader.instance;
            case 'Z':
                return BooleanReader.instance;
            default:
                return null;
        }
    }
public static CDRStreamReader readerFor ( String s , ClassLoader cl ) { switch ( s . charAt ( 0 ) ) { case ' ' : return AbstractInterfaceReader . instance ; case ' ' : return ByteReader . instance ; case ' ' : return CharReader . instance ; case ' ' : return DoubleReader . instance ; case ' ' : return SerializableReader . instance ; case ' ' : return FloatReader . instance ; case ' ' : return StringReader . instance ; case ' ' : return IntReader . instance ; case ' ' : return LongReader . instance ; case ' ' : try { // Use Class.forName() (rather than cl.loadClass()), because // Class.forName() loads Java array types (which are valuetypes). return new ValuetypeReader ( Class . forName ( s . substring ( 1 ) , true , cl ) ) ; } catch ( ClassNotFoundException e ) { throw IIOPLogger . ROOT_LOGGER . errorLoadingClass ( s . substring ( 1 ) , e ) ; } case ' ' : return CorbaObjectReader . instance ; case ' ' : try { return new IdlInterfaceReader ( cl . loadClass ( s . substring ( 1 ) ) ) ; } catch ( ClassNotFoundException e ) { throw IIOPLogger . ROOT_LOGGER . errorLoadingClass ( s . substring ( 1 ) , e ) ; } case ' ' : return ObjectReader . instance ; case ' ' : try { return new RemoteReader ( cl . loadClass ( s . substring ( 1 ) ) ) ; } catch ( ClassNotFoundException e ) { throw IIOPLogger . ROOT_LOGGER . errorLoadingClass ( s . substring ( 1 ) , e ) ; } case ' ' : return ShortReader . instance ; case ' ' : return null ; case ' ' : return ExternalizableReader . instance ; case ' ' : return BooleanReader . instance ; default : return null ; } }
Returns a <code>CDRStreamReader</code> given an abbreviated name
and a <code>ClassLoader</code> for valuetype classes.
Returns a <code > CDRStreamReader< / code > given an abbreviated name and a <code > ClassLoader< / code > for valuetype classes .