@SuppressWarnings("unchecked")
    static void writeObjectTo(Output output, Object value,
            Schema<?> currentSchema, IdStrategy strategy) throws IOException
    {
        final HasSchema<Object> hs = strategy.tryWritePojoIdTo(output, ID_POJO, 
                (Class<Object>)value.getClass(), true);
        
        if (hs == null)
        {
            PolymorphicMapSchema.writeObjectTo(output, value, currentSchema, strategy);
            return;
        }
        
        final Schema<Object> schema = hs.getSchema();
        
        if (output instanceof StatefulOutput)
        {
            // update using the derived schema.
            ((StatefulOutput) output).updateLast(schema, currentSchema);
        }
        
        schema.writeTo(output, value);
    }
Placeholder for annotated interface/object fields configured to use this.

@author David Yu
@created May 19, 2016
protostuff-runtime/src/main/java/io/protostuff/runtime/PolymorphicPojoMapSchema.java