in log4j-docgen/src/main/java/org/apache/logging/log4j/docgen/processor/Annotations.java [162:188]
public Collection<? extends AnnotationMirror> findAttributeAndPropertyAnnotations(final Element element) {
final Collection<AnnotationMirror> annotations = new HashSet<>();
element.accept(
new SimpleElementVisitor8<Void, Collection<? super AnnotationMirror>>() {
@Override
protected Void defaultAction(
final Element e, final Collection<? super AnnotationMirror> annotations) {
for (final AnnotationMirror annotation : e.getAnnotationMirrors()) {
if (contains(pluginAttributeAndElementAnnotations, annotation.getAnnotationType())) {
annotations.add(annotation);
}
}
return null;
}
@Override
public Void visitExecutable(
final ExecutableElement e, final Collection<? super AnnotationMirror> annotations) {
for (final VariableElement param : e.getParameters()) {
param.accept(this, annotations);
}
return super.visitExecutable(e, annotations);
}
},
annotations);
return annotations;
}