iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/marshal/CDRStream.java
public static CDRStreamWriter writerFor(Class clz) {
        if (clz == Boolean.TYPE) {
            return BooleanWriter.instance;
        } else if (clz == Byte.TYPE) {
            return ByteWriter.instance;
        } else if (clz == Character.TYPE) {
            return CharWriter.instance;
        } else if (clz == Double.TYPE) {
            return DoubleWriter.instance;
        } else if (clz == Float.TYPE) {
            return FloatWriter.instance;
        } else if (clz == Integer.TYPE) {
            return IntWriter.instance;
        } else if (clz == Long.TYPE) {
            return LongWriter.instance;
        } else if (clz == Short.TYPE) {
            return ShortWriter.instance;
        } else if (clz == String.class) {
            return StringWriter.instance;
        } else if (clz == Void.TYPE) {
            return null;
        } else if (RmiIdlUtil.isRMIIDLRemoteInterface(clz)) {
            return RemoteWriter.instance;
        } else if (clz == org.omg.CORBA.Object.class) {
            return CorbaObjectWriter.instance;
        } else if (org.omg.CORBA.Object.class.isAssignableFrom(clz)) {
            return new IdlInterfaceWriter(clz);
        } else if (IDLEntity.class.isAssignableFrom(clz)) {
            return new ValuetypeWriter(clz);
        } else if (clz == Serializable.class) {
            return SerializableWriter.instance;
        } else if (RmiIdlUtil.isAbstractInterface(clz)) {
            return AbstractInterfaceWriter.instance;
        } else if (Serializable.class.isAssignableFrom(clz)) {
            return new ValuetypeWriter(clz);
        } else if (Externalizable.class.isAssignableFrom(clz)) {
            return ExternalizableWriter.instance;
        } else if (clz == Object.class) {
            return ObjectWriter.instance;
        } else {
            return new ValuetypeWriter(clz);
        }
    }
public static CDRStreamWriter writerFor(Class clz) {
        if (clz == Boolean.TYPE) {
            return BooleanWriter.instance;
        } else if (clz == Byte.TYPE) {
            return ByteWriter.instance;
        } else if (clz == Character.TYPE) {
            return CharWriter.instance;
        } else if (clz == Double.TYPE) {
            return DoubleWriter.instance;
        } else if (clz == Float.TYPE) {
            return FloatWriter.instance;
        } else if (clz == Integer.TYPE) {
            return IntWriter.instance;
        } else if (clz == Long.TYPE) {
            return LongWriter.instance;
        } else if (clz == Short.TYPE) {
            return ShortWriter.instance;
        } else if (clz == String.class) {
            return StringWriter.instance;
        } else if (clz == Void.TYPE) {
            return null;
        } else if (RmiIdlUtil.isRMIIDLRemoteInterface(clz)) {
            return RemoteWriter.instance;
        } else if (clz == org.omg.CORBA.Object.class) {
            return CorbaObjectWriter.instance;
        } else if (org.omg.CORBA.Object.class.isAssignableFrom(clz)) {
            return new IdlInterfaceWriter(clz);
        } else if (IDLEntity.class.isAssignableFrom(clz)) {
            return new ValuetypeWriter(clz);
        } else if (clz == Serializable.class) {
            return SerializableWriter.instance;
        } else if (RmiIdlUtil.isAbstractInterface(clz)) {
            return AbstractInterfaceWriter.instance;
        } else if (Serializable.class.isAssignableFrom(clz)) {
            return new ValuetypeWriter(clz);
        } else if (Externalizable.class.isAssignableFrom(clz)) {
            return ExternalizableWriter.instance;
        } else if (clz == Object.class) {
            return ObjectWriter.instance;
        } else {
            return new ValuetypeWriter(clz);
        }
    }
public static CDRStreamWriter writerFor ( Class clz ) { if ( clz == Boolean . TYPE ) { return BooleanWriter . instance ; } else if ( clz == Byte . TYPE ) { return ByteWriter . instance ; } else if ( clz == Character . TYPE ) { return CharWriter . instance ; } else if ( clz == Double . TYPE ) { return DoubleWriter . instance ; } else if ( clz == Float . TYPE ) { return FloatWriter . instance ; } else if ( clz == Integer . TYPE ) { return IntWriter . instance ; } else if ( clz == Long . TYPE ) { return LongWriter . instance ; } else if ( clz == Short . TYPE ) { return ShortWriter . instance ; } else if ( clz == String . class ) { return StringWriter . instance ; } else if ( clz == Void . TYPE ) { return null ; } else if ( RmiIdlUtil . isRMIIDLRemoteInterface ( clz ) ) { return RemoteWriter . instance ; } else if ( clz == org . omg . CORBA . Object . class ) { return CorbaObjectWriter . instance ; } else if ( org . omg . CORBA . Object . class . isAssignableFrom ( clz ) ) { return new IdlInterfaceWriter ( clz ) ; } else if ( IDLEntity . class . isAssignableFrom ( clz ) ) { return new ValuetypeWriter ( clz ) ; } else if ( clz == Serializable . class ) { return SerializableWriter . instance ; } else if ( RmiIdlUtil . isAbstractInterface ( clz ) ) { return AbstractInterfaceWriter . instance ; } else if ( Serializable . class . isAssignableFrom ( clz ) ) { return new ValuetypeWriter ( clz ) ; } else if ( Externalizable . class . isAssignableFrom ( clz ) ) { return ExternalizableWriter . instance ; } else if ( clz == Object . class ) { return ObjectWriter . instance ; } else { return new ValuetypeWriter ( clz ) ; } }
Returns the <code>CDRStreamWriter</code> for a given <code>Class</code>.
Returns the <code > CDRStreamWriter< / code > for a given <code > Class< / code > .