private static <T> Field<T> createCollectionPojoV(int number, String name,
            final java.lang.reflect.Field f,
            final MessageFactory messageFactory, boolean allowNullElement, 
            final Class<Object> genericType, IdStrategy strategy)
    {
        final HasSchema<Object> schemaV = strategy.getSchemaWrapper(
                genericType, true);
        final Accessor accessor = AF.create(f);
        return new RuntimeCollectionField<T, Object>(FieldType.MESSAGE, number,
                name, f.getAnnotation(Tag.class), messageFactory, allowNullElement)
        {
            @Override
            protected void mergeFrom(Input input, T message) throws IOException
            {
                accessor.set(message, input.mergeObject(
                        accessor.<Collection<Object>>get(message), schema));
            }

            @Override
            protected void writeTo(Output output, T message) throws IOException
            {
                final Collection<Object> existing = accessor.get(message);
                if (existing != null)
                    output.writeObject(number, existing, schema, false);
            }

            @Override
            protected void transfer(Pipe pipe, Input input, Output output,
                    boolean repeated) throws IOException
            {
                output.writeObject(number, pipe, schema.pipeSchema, repeated);
            }

            @Override
            protected void addValueFrom(Input input,
                    Collection<Object> collection) throws IOException
            {
                collection.add(input.mergeObject(null, schemaV.getSchema()));
            }

            @Override
            protected void writeValueTo(Output output, int fieldNumber,
                    Object value, boolean repeated) throws IOException
            {
                if (!genericType.isAssignableFrom(value.getClass()))
                {
                    throw new RuntimeException(f.getDeclaringClass().getName() + 
                            "::" + f.getName() + " - " + value.getClass().getName() + 
                            " is not assignable to " + genericType.getName());
                }
                output.writeObject(fieldNumber, value, schemaV.getSchema(),
                        repeated);
            }

            @Override
            protected void transferValue(Pipe pipe, Input input, Output output,
                    int number, boolean repeated) throws IOException
            {
                output.writeObject(number, pipe, schemaV.getPipeSchema(),
                        repeated);
            }
            
            @Override
            protected Field<T> copy(IdStrategy strategy)
            {
                return createCollectionPojoV(number, name, f, messageFactory, 
                        0 != (strategy.flags & IdStrategy.PRESERVE_NULL_ELEMENTS),
                        genericType, strategy);
            }
        };
    }
For lazy initialization called by {@link RuntimeFieldFactory}.
protostuff-runtime/src/main/java/io/protostuff/runtime/RuntimeCollectionFieldFactory.java