public static PolymorphicSchema.Factory getFactoryFromRepeatedValueGenericType(
            Class<?> clazz)
    {
        if (clazz.isArray())
            return ARRAY;

        if (Number.class == clazz)
            return NUMBER;

        if (Class.class == clazz)
            return CLASS;

        if (Enum.class == clazz)
            return ENUM;

        if (Object.class == clazz)
            return OBJECT;

        if (Throwable.class.isAssignableFrom(clazz))
            return THROWABLE;
        
        return null;
    }
Polymorphic types.

@author David Yu
@created Apr 30, 2012
protostuff-runtime/src/main/java/io/protostuff/runtime/PolymorphicSchemaFactories.java