class JFieldBuilder {
    private final Map<String, StringWriter> fieldBuilders = new HashMap<>();

    boolean hasField(String fieldName) {
        return fieldBuilders.containsKey(fieldName);
    }

    StringWriter write(String fieldName) {<FILL_FUNCTION_BODY>}
}

        StringWriter res = fieldBuilders.getOrDefault(fieldName, null);
        if (res != null) {
            return res;
        }
        res = new StringWriter();
        fieldBuilders.put(fieldName, res);
        return res;
    
<no_super_class>