static void writeObjectTo(Output output, Object value,
            Schema<?> currentSchema, IdStrategy strategy) throws IOException
    {
        final Class<?> clazz = value.getClass();
        if (clazz.getSuperclass() != null && clazz.getSuperclass().isEnum())
        {
            EnumIO<?> eio = strategy.getEnumIO(clazz.getSuperclass());
            strategy.writeEnumIdTo(output, ID_ENUM, clazz.getSuperclass());
            eio.writeTo(output, ID_ENUM_VALUE, false, (Enum<?>) value);
        }
        else
        {
            EnumIO<?> eio = strategy.getEnumIO(clazz);
            strategy.writeEnumIdTo(output, ID_ENUM, clazz);
            eio.writeTo(output, ID_ENUM_VALUE, false, (Enum<?>) value);
        }
    }
Used when a field is declared as {@code Enum<?>} (with or with-out generics).

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