BasicConstraintFactory implements ConstraintFactory<T> { @Override public void showOn(PrintStream out) { final int paramIdWidth = 12; for (Entry<T, Map<String, ConstraintBuilder<?>>> entry : buildersByType.entrySet()) { out.println(); out.println(entry.getKey()); for (ConstraintBuilder<?> builder : entry.getValue().values()) { out.println(); out.println("\t" + builder.executionType().getSimpleName()); out.println("\t'" + builder.id() + "\'\t" + builder.docs()); for (Parameter<?> p : builder.parameters()) { out.print("\t\t"); StringUtil.printLeftJustified('\'' + p.id() + '\'', out, paramIdWidth); out.println("\t" + p.description()); if (p instanceof AbstractEnumerationParameter) { AbstractEnumerationParameter<?> aep = AbstractEnumerationParameter.class.cast(p); for (RegisteredItem option : aep.values()) { out.println("\t\t\t" + option.id() + "\t" + option.description()); } } } } } } BasicConstraintFactory(Map<String, T> typesByRawTypeMapping); @Override void register(T type, ConstraintBuilder<?> ...builders); @Override Set<T> registeredTypes(); @Override ConstraintBuilder<?> builderFor(String rawType, String id); @Override ConstraintBuilder<?> builderFor(T type, String id); @Override void showOn(PrintStream out);  }
@Test public void showOn() { try { AvroConfiguration.ConstraintFactory.showOn(System.out); } catch (Exception ex) { fail(ex.getMessage()); } }