class AfterFilter
        implements Filter {
    private static final ThreadLocal<JSONWriter> writerLocal = new ThreadLocal<>();

    public void writeAfter(JSONWriter serializer, Object object) {
        JSONWriter last = writerLocal.get();
        writerLocal.set(serializer);
        writeAfter(object);
        writerLocal.set(last);
    }

    protected final void writeKeyValue(String key, Object value) {<FILL_FUNCTION_BODY>}

    public abstract void writeAfter(Object object);
}

        JSONWriter serializer = writerLocal.get();
        boolean ref = serializer.containsReference(value);
        serializer.writeName(key);
        serializer.writeColon();
        serializer.writeAny(value);
        if (!ref) {
            serializer.removeReference(value);
        }
    
<no_super_class>