use of org.apache.nifi.annotation.behavior.WritesAttributes in project nifi by apache.
the class HtmlProcessorDocumentationWriter method getWritesAttributes.
/**
* Collects the attributes that a processor is writing to.
*
* @param processor the processor to describe
* @return the list of attributes the processor is writing
*/
private List<WritesAttribute> getWritesAttributes(Processor processor) {
List<WritesAttribute> attributes = new ArrayList<>();
WritesAttributes writesAttributes = processor.getClass().getAnnotation(WritesAttributes.class);
if (writesAttributes != null) {
attributes.addAll(Arrays.asList(writesAttributes.value()));
}
WritesAttribute writeAttribute = processor.getClass().getAnnotation(WritesAttribute.class);
if (writeAttribute != null) {
attributes.add(writeAttribute);
}
return attributes;
}
Aggregations