Class ApiAnnotationProcessor

java.lang.Object
javax.annotation.processing.AbstractProcessor
org.opensearch.common.annotation.processor.ApiAnnotationProcessor
All Implemented Interfaces:
Processor

@InternalApi @SupportedAnnotationTypes("org.opensearch.common.annotation.*") public class ApiAnnotationProcessor extends AbstractProcessor
The annotation processor for API related annotations: DeprecatedApi, ExperimentalApi, InternalApi and PublicApi.

The checks are built on top of the following rules:

  • introspect each type annotated with PublicApi, DeprecatedApi or ExperimentalApi, filtering out package-private declarations
  • make sure those leak only PublicApi, DeprecatedApi or ExperimentalApi types as well (exceptions, method return values, method arguments, method generic type arguments, class generic type arguments, annotations)
  • recursively follow the type introspection chains to enforce the rules down the line