iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/Util.java
public static boolean isValidRMIIIOP(Class cls)
            throws RMIIIOPViolationException {
        if (cls.isPrimitive())
            return true;

        if (cls.isArray())
            return isValidRMIIIOP(cls.getComponentType());

        // special interfaces
        if (cls == Serializable.class || cls == Externalizable.class)
            return true;

        // interface?
        if (cls.isInterface() && java.rmi.Remote.class.isAssignableFrom(cls)) {
            InterfaceAnalysis.getInterfaceAnalysis(cls);
            return true;
        }

        // exception?
        if (Throwable.class.isAssignableFrom(cls)) {
            if (Exception.class.isAssignableFrom(cls) &&
                    !RuntimeException.class.isAssignableFrom(cls)) {
                ExceptionAnalysis.getExceptionAnalysis(cls);
            }
            return true;
        }

        // special values
        if (cls == Object.class || cls == String.class || cls == Class.class)
            return true;

        // got to be value
        ValueAnalysis.getValueAnalysis(cls);
        return true;
    }
public static boolean isValidRMIIIOP(Class cls)
            throws RMIIIOPViolationException {
        if (cls.isPrimitive())
            return true;

        if (cls.isArray())
            return isValidRMIIIOP(cls.getComponentType());

        // special interfaces
        if (cls == Serializable.class || cls == Externalizable.class)
            return true;

        // interface?
        if (cls.isInterface() && java.rmi.Remote.class.isAssignableFrom(cls)) {
            InterfaceAnalysis.getInterfaceAnalysis(cls);
            return true;
        }

        // exception?
        if (Throwable.class.isAssignableFrom(cls)) {
            if (Exception.class.isAssignableFrom(cls) &&
                    !RuntimeException.class.isAssignableFrom(cls)) {
                ExceptionAnalysis.getExceptionAnalysis(cls);
            }
            return true;
        }

        // special values
        if (cls == Object.class || cls == String.class || cls == Class.class)
            return true;

        // got to be value
        ValueAnalysis.getValueAnalysis(cls);
        return true;
    }
Check if this class is valid for RMI/IIOP mapping.
This method will either throw an exception or return true.