public static String dump(DataType dt, boolean recursive) {
		if (!(dt instanceof Composite)) {
			return "";
		}

		Composite composite = (Composite) dt;
		StringBuilder buf = new StringBuilder();
		buf.append(composite.toString());

		if (recursive) {
			TreeSet<Composite> otherComposites = new TreeSet<>(NAME_COMPARATOR);
			collectComposites(composite, otherComposites);
			for (Composite child : otherComposites) {
				buf.append(child.toString());
			}
		}
		return buf.toString();
	}
Dump composite details for examination or test comparison.
@param dt composite datatype
@param recursive if true all child composites will also be dumped recursively
@return dump string
Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/program/model/data/CompositeTestUtils.java