Interface AnnotationTransformer<T extends Annotation>

Type Parameters:
T - The annotation type
All Known Subinterfaces:
NamedAnnotationTransformer, TypedAnnotationTransformer<T>
All Known Implementing Classes:
AndroidxNullableTransformer, CoreNonNullTransformer, CoreNullableTransformer, IntrospectedToBeanPropertiesTransformer, JavaxNonnullTransformer, JavaxNullableTransformer, JavaxPostConstructTransformer, JavaxPreDestroyTransformer, JdtNullableTransformer, JspecifyNullableTransformer, KotlinDeprecatedTransformer, KotlinNotNullMapper, KotlinNullableMapper, ReactivexNullableTransformer, ReactorNullableTransformer, Rxjava3NullableTransformer, SpotbugsNullableTransformer

public interface AnnotationTransformer<T extends Annotation>
An AnnotationTransformer transforms an annotation definition into one or many other annotation definitions discarding the original annotation.

Unlike AnnotationMapper which retains the original annotation information this interface can be used to optimize produced annotation metadata and discard unnecessary annotations.

Since:
2.0
Author:
graemerocher
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    transform(AnnotationValue<T> annotation, VisitorContext visitorContext)
    The transform method will be called for each instances of the annotation returned via this method.
  • Method Details

    • transform

      List<AnnotationValue<?>> transform(AnnotationValue<T> annotation, VisitorContext visitorContext)
      The transform method will be called for each instances of the annotation returned via this method.
      Parameters:
      annotation - The annotation values
      visitorContext - The context that is being visited
      Returns:
      A list of zero or many annotations and values to map to