in log4j-docgen/src/main/java/org/apache/logging/log4j/docgen/generator/SchemaGenerator.java [113:137]
private static void writeTypes(final TypeLookup lookup, final XMLStreamWriter writer) throws XMLStreamException {
for (final ArtifactSourcedType sourcedType : lookup.values()) {
final Type type = sourcedType.type;
if (isBuiltinXmlType(type.getClassName())) {
continue;
}
if (type instanceof ScalarType) {
writeScalarType((ScalarType) type, writer);
}
if (type instanceof PluginType) {
final PluginType pluginType = (PluginType) type;
writePluginType(lookup, pluginType, writer);
/*
* If a plugin extends another plugin or has multiple aliases
* we also need a <group> element.
*/
if (!pluginType.getAliases().isEmpty()
|| !pluginType.getImplementations().isEmpty()) {
writeAbstractType(lookup, pluginType, writer);
}
} else if (type instanceof AbstractType) {
writeAbstractType(lookup, (AbstractType) type, writer);
}
}
}