Interface AnnotationTransformation

    • Method Detail

      • priority

        default int priority()
        Returns the priority of this annotation transformation. Annotation transformations are applied in descending order of priority values (that is, transformation with higher priority value is executed sooner than transformation with smaller priority value).

        By default, the priority is DEFAULT_PRIORITY_VALUE.

        Returns:
        the priority of this annotation transformation
      • supports

        default boolean supports​(AnnotationTarget.Kind kind)
        Returns whether this annotation transformation supports given kind of declarations. A transformation is only applied if it supports the correct kind of declarations.

        By default, the transformation supports all declaration kinds.

        Parameters:
        kind - the kind of declaration, never null
        Returns:
        whether this annotation transformation should apply
      • requiresCompatibleMode

        default boolean requiresCompatibleMode()
        Returns whether this annotation transformation requires the annotation overlay to be in the compatible mode. When this method returns true and the annotation overlay is not set to be in the compatible mode, an exception is thrown during construction of the overlay.

        This method returns false by default and should be overridden sparingly.

        Returns:
        whether this transformation requires the annotation overlay to be in the compatible mode
      • builder

        static AnnotationTransformation.DeclarationBuilder builder()
        Returns a builder for annotation transformation of arbitrary declarations.
        Returns:
        a builder for annotation transformation of arbitrary declarations
      • forClasses

        static AnnotationTransformation.ClassBuilder forClasses()
        Returns a builder for annotation transformation of classes.
        Returns:
        a builder for annotation transformation of classes
      • forFields

        static AnnotationTransformation.FieldBuilder forFields()
        Returns a builder for annotation transformation of fields.
        Returns:
        a builder for annotation transformation of fields
      • forMethods

        static AnnotationTransformation.MethodBuilder forMethods()
        Returns a builder for annotation transformation of methods.
        Returns:
        a builder for annotation transformation of methods
      • forMethodParameters

        static AnnotationTransformation.MethodParameterBuilder forMethodParameters()
        Returns a builder for annotation transformation of method parameters.
        Returns:
        a builder for annotation transformation of method parameters
      • forRecordComponents

        static AnnotationTransformation.RecordComponentBuilder forRecordComponents()
        Returns a builder for annotation transformation of record components.
        Returns:
        a builder for annotation transformation of record components