private static <T> Field<T> createCollectionEnumV(int number, String name,
            java.lang.reflect.Field f,
            final MessageFactory messageFactory,
            final Class<Object> genericType, 
            final IdStrategy strategy)
    {
        final EnumIO<?> eio = strategy.getEnumIO(genericType);
        final Accessor accessor = AF.create(f);
        return new Field<T>(FieldType.ENUM, number, name, true,
                f.getAnnotation(Tag.class))
        {
            @Override
            protected void mergeFrom(Input input, T message) throws IOException
            {
                final Enum<?> value = eio.readFrom(input);
                Collection<Enum<?>> existing = accessor.get(message);
                if (existing == null)
                    accessor.set(message, existing = messageFactory.newMessage());
                
                existing.add(value);
            }

            @Override
            protected void writeTo(Output output, T message) throws IOException
            {
                final Collection<Enum<?>> collection = accessor.get(message);
                if (collection != null && !collection.isEmpty())
                {
                    for (Enum<?> en : collection)
                    {
                        if (en != null)
                            eio.writeTo(output, number, true, en);
                    }
                }
            }

            @Override
            protected void transfer(Pipe pipe, Input input, Output output,
                    boolean repeated) throws IOException
            {
                EnumIO.transfer(pipe, input, output, number, repeated, strategy);
            }
        };
    }
For lazy initialization called by {@link RuntimeFieldFactory}.
protostuff-runtime/src/main/java/io/protostuff/runtime/RuntimeRepeatedFieldFactory.java