in audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/tools/DocletEnvironmentProcessor.java [58:91]
private boolean excluded(final Element e) {
if (e == null) {
return true;
}
// Exclude private and limited private types
if (e.getAnnotation(InterfaceAudience.Private.class) != null) {
return true;
}
if (e.getAnnotation(InterfaceAudience.LimitedPrivate.class) != null) {
return true;
}
if (e.getAnnotation(InterfaceAudience.Public.class) == null) {
// No audience annotations
if (treatUnannotatedClassesAsPrivate) {
// Exclude classes and interfaces if they are not annotated
return e.getKind().isClass() || e.getKind().isInterface();
}
}
// At this point, everything is either public audience or unannotated
// and treat-as-public, which means they must have a stability
// annotation as well.
// Filter types based on stability
if (e.getAnnotation(InterfaceStability.Unstable.class) != null) {
return stability == StabilityOption.STABLE
|| stability == StabilityOption.EVOLVING;
}
if (e.getAnnotation(InterfaceStability.Evolving.class) != null) {
return stability == StabilityOption.STABLE;
}
// Public, but no stability? This is an error, so we exclude
return e.getAnnotation(InterfaceStability.Stable.class) == null;
}