private static void writeComponentTo(Output output, Object value, 
            Schema<?> currentSchema, IdStrategy strategy, 
            Class<?> componentType, int dimensions) throws IOException
    {
        strategy.writeArrayIdTo(output, componentType);
        // write the length of the array
        output.writeUInt32(ID_ARRAY_LEN, ((Object[])value).length, false);
        // write the dimensions of the array
        output.writeUInt32(ID_ARRAY_DIMENSION, dimensions, false);

        if (output instanceof StatefulOutput)
        {
            // update using the derived schema.
            ((StatefulOutput) output).updateLast(strategy.ARRAY_SCHEMA, currentSchema);
        }

        strategy.ARRAY_SCHEMA.writeTo(output, value);
    }
A schema for dynamic types (fields where the type is {@link Object}).

@author David Yu
@created Feb 1, 2011
protostuff-runtime/src/main/java/io/protostuff/runtime/ObjectSchema.java