use of org.apache.nifi.annotation.documentation.SeeAlso in project nifi by apache.
the class HtmlDocumentationWriter method writeSeeAlso.
/**
* Writes the list of components that may be linked from this component.
*
* @param configurableComponent the component to describe
* @param xmlStreamWriter the stream writer to use
* @throws XMLStreamException thrown if there was a problem writing the XML
*/
private void writeSeeAlso(ConfigurableComponent configurableComponent, XMLStreamWriter xmlStreamWriter) throws XMLStreamException {
final SeeAlso seeAlso = configurableComponent.getClass().getAnnotation(SeeAlso.class);
if (seeAlso != null) {
writeSimpleElement(xmlStreamWriter, "h3", "See Also:");
xmlStreamWriter.writeStartElement("p");
Class<? extends ConfigurableComponent>[] componentNames = seeAlso.value();
String[] classNames = seeAlso.classNames();
if (componentNames.length > 0 || classNames.length > 0) {
// Write alternatives
iterateAndLinkComponents(xmlStreamWriter, componentNames, classNames, ", ", configurableComponent.getClass().getSimpleName());
} else {
xmlStreamWriter.writeCharacters("No tags provided.");
}
xmlStreamWriter.writeEndElement();
}
}
Aggregations