@Test public void verifySubclassed() throws ClassNotFoundException { final Map<String,String> typesForNames = geoapi.typesForNames(); final ClassLoader loader = UML.class.getClassLoader(); final Map<Class<?>,Boolean> hasSubTypes = new HashMap<>(typesForNames.size()); for (final String name : typesForNames.values()) { final Class<?> type = Class.forName(name, false, loader); hasSubTypes.put(type, Boolean.FALSE); } for (final String name : typesForNames.values()) { final Class<?> type = Class.forName(name, false, loader); for (final Class<?> parent : type.getInterfaces()) { hasSubTypes.replace(parent, Boolean.TRUE); } } hasSubTypes.values().removeIf((v) -> !v); if (!hasSubTypes.keySet().equals(geoapi.subclassed())) { final String[] parentTypes = new String[hasSubTypes.size()]; int i = 0; for (final Class<?> c : hasSubTypes.keySet()) { parentTypes[i++] = c.getName(); } assertEquals(parentTypes.length, i); Arrays.sort(parentTypes); final String lineSeparator = System.lineSeparator(); final StringBuilder buffer = new StringBuilder(500).append("Content of ") .append(Interfacing.GeoAPI.SUBCLASSED_LIST).append(" should be:") .append(lineSeparator); for (final String type : parentTypes) { buffer.append(type).append(lineSeparator); } fail(buffer.toString()); } }
public static Interfacing[] values() { synchronized (VALUES) { return VALUES.toArray(new Interfacing[VALUES.size()]); } }
Interfacing extends CodeList<Interfacing> { public static Interfacing[] values() { synchronized (VALUES) { return VALUES.toArray(new Interfacing[VALUES.size()]); } } }
Interfacing extends CodeList<Interfacing> { public static Interfacing[] values() { synchronized (VALUES) { return VALUES.toArray(new Interfacing[VALUES.size()]); } } protected  Interfacing(final String name); }
Interfacing extends CodeList<Interfacing> { public static Interfacing[] values() { synchronized (VALUES) { return VALUES.toArray(new Interfacing[VALUES.size()]); } } protected  Interfacing(final String name); static Interfacing[] values(); @Override Interfacing[] family(); static Interfacing valueOf(final String code); }
Interfacing extends CodeList<Interfacing> { public static Interfacing[] values() { synchronized (VALUES) { return VALUES.toArray(new Interfacing[VALUES.size()]); } } protected  Interfacing(final String name); static Interfacing[] values(); @Override Interfacing[] family(); static Interfacing valueOf(final String code); static final Interfacing GEOAPI; static final Interfacing DEFAULT; }