class FieldReaderCollectionMethodReadOnly<T>
        extends FieldReaderObject<T> {
    FieldReaderCollectionMethodReadOnly(
            String fieldName,
            Type fieldType,
            Class fieldClass,
            int ordinal,
            long features,
            String format,
            JSONSchema schema,
            Method setter,
            Field field
    ) {
        super(fieldName, fieldType, fieldClass, ordinal, features, format, null, null, schema, setter, field, null);
        Type itemType = null;
        if (fieldType instanceof ParameterizedType) {
            Type[] actualTypeArguments = ((ParameterizedType) fieldType).getActualTypeArguments();
            if (actualTypeArguments.length > 0) {
                itemType = actualTypeArguments[0];
            }
        }
        this.itemType = itemType;
    }

    @Override
    public void accept(T object, Object value) {<FILL_FUNCTION_BODY>}

    @Override
    public boolean isReadOnly() {
        return true;
    }

    @Override
    public void readFieldValue(JSONReader jsonReader, T object) {
        if (initReader == null) {
            initReader = jsonReader
                    .getContext()
                    .getObjectReader(fieldType);
        }
        Object value = jsonReader.jsonb
                ? initReader.readJSONBObject(jsonReader, fieldType, fieldName, 0)
                : initReader.readObject(jsonReader, fieldType, fieldName, 0);
        accept(object, value);
    }
}

        if (value == null) {
            return;
        }

        Collection collection;
        try {
            collection = (Collection) method.invoke(object);
        } catch (Exception e) {
            throw new JSONException("set " + fieldName + " error", e);
        }

        if (collection == Collections.EMPTY_LIST
                || collection == Collections.EMPTY_SET
                || collection == null
                || collection.equals(value)) {
            if (schema != null) {
                schema.assertValidate(collection);
            }

            return;
        }

        String name = collection.getClass().getName();
        if ("java.util.Collections$UnmodifiableRandomAccessList".equals(name)
                || "java.util.Arrays$ArrayList".equals(name)
                || "java.util.Collections$SingletonList".equals(name)
                || name.startsWith("java.util.ImmutableCollections$")) {
            return;
        }

        if (value == collection) {
            return;
        }

        Collection values = (Collection) value;
        for (Object item : values) {
            if (item == null) {
                collection.add(null);
                continue;
            }

            if (item instanceof Map && itemType instanceof Class) {
                if (!((Class) itemType).isAssignableFrom(item.getClass())) {
                    if (itemReader == null) {
                        itemReader = JSONFactory
                                .getDefaultObjectReaderProvider()
                                .getObjectReader(itemType);
                    }
                    item = itemReader.createInstance((Map) item, 0L);
                }
            }
            collection.add(item);
        }

        if (schema != null) {
            schema.assertValidate(collection);
        }
    
<methods>public void <init>(java.lang.String, java.lang.reflect.Type, Class#RAW, int, long, java.lang.String, java.util.Locale, java.lang.Object, com.alibaba.fastjson2.schema.JSONSchema, java.lang.reflect.Method, java.lang.reflect.Field, BiConsumer#RAW) ,public void accept(T, boolean) ,public void accept(T, byte) ,public void accept(T, short) ,public void accept(T, int) ,public void accept(T, long) ,public void accept(T, float) ,public void accept(T, double) ,public void accept(T, char) ,public void accept(T, java.lang.Object) ,public BiConsumer#RAW getFunction() ,public ObjectReader#RAW getInitReader() ,public ObjectReader#RAW getObjectReader(com.alibaba.fastjson2.JSONReader) ,public ObjectReader#RAW getObjectReader(com.alibaba.fastjson2.JSONReader.Context) ,public void processExtra(com.alibaba.fastjson2.JSONReader, java.lang.Object) ,public void readFieldValue(com.alibaba.fastjson2.JSONReader, T) ,public java.lang.Object readFieldValue(com.alibaba.fastjson2.JSONReader) ,public void readFieldValueJSONB(com.alibaba.fastjson2.JSONReader, T) <variables>protected final non-sealed BiConsumer#RAW function,protected ObjectReader#RAW initReader