class ObjectSerializerAdapter
            implements ObjectWriter {
        final ObjectSerializer serializer;

        public ObjectSerializerAdapter(ObjectSerializer serializer) {
            this.serializer = serializer;
        }

        @Override
        public void write(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) {
            JSONSerializer serializer = new JSONSerializer(jsonWriter);

            try {
                this.serializer.write(serializer, object, fieldName, fieldType, 0);
            } catch (IOException e) {
                throw new JSONException("serializer write error", e);
            }
        }
    }

    public void addFilter(Class<?> clazz, SerializeFilter filter) {
        ObjectWriter objectWriter = getProvider().getObjectWriter(clazz);
        objectWriter.setFilter(filter);
    }

    @Deprecated
    public boolean put(Object type, Object value) {
        return put((Type) type, (ObjectSerializer) value);
    }

    public ObjectSerializer getObjectWriter(Class<?> clazz) {<FILL_FUNCTION_BODY>

        ObjectWriter objectWriter = getProvider().getObjectWriter(clazz);
        if (objectWriter instanceof ObjectSerializer) {
            return (ObjectSerializer) objectWriter;
        }

        return new JavaBeanSerializer(objectWriter);
    
<no_super_class>