static S renderConcept(Concept.Ref ref) { ret renderConcept(ref.get()); } static S renderConcept(Concept c) { if (c == null) ret "null"; new StringBuilder buf; buf.append(c.id + " " + shortDynamicClassName(c)); for (S field : conceptFields(c)) { O val = cget(c, field); if (val != null) { if (eq(val, Bool.FALSE) && isPrimitiveBoolField(c, field)) continue; buf.append(" " + field + "="); buf.append(renderConcept_short(c, val)); } } ret str(buf); } // renders a value in a concept sS renderConcept_short(Concept c, O val) { if (val instanceof Concept) ret shortDynamicClassName(val) + ((Concept) val).id; else if (val instanceof Concept.RefL) ret squareBracket(joinWithComma(lmap(v -> renderConcept_short(c, v), (L) val))); else { new structure_Data data; data.seen.put(c, 0); // for ConceptInList et al ret struct(val, data); } }