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