Package org.jboss.jandex
Interface AnnotationTransformation
public interface AnnotationTransformation
An annotation transformation.
- Since:
- 3.2.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Abstract class for annotation transformation builders.static class
A builder of annotation transformations for classes.static class
A builder of annotation transformations for arbitrary declarations.static class
A builder of annotation transformations for fields.static class
A builder of annotation transformations for methods.static class
A builder of annotation transformations for method parameters.static class
A builder of annotation transformations for record components.static interface
A transformation context. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
Implements the actual annotation transformation.builder()
Returns a builder for annotation transformation of arbitrary declarations.Returns a builder for annotation transformation of classes.Returns a builder for annotation transformation of fields.Returns a builder for annotation transformation of method parameters.Returns a builder for annotation transformation of methods.Returns a builder for annotation transformation of record components.default int
priority()
Returns the priority of this annotation transformation.default boolean
Returns whether this annotation transformation requires the annotation overlay to be in the compatible mode.default boolean
Returns whether this annotation transformation supports givenkind
of declarations.
-
Field Details
-
DEFAULT_PRIORITY_VALUE
static final int DEFAULT_PRIORITY_VALUEThe defaultpriority()
value: 1000.- See Also:
-
-
Method Details
-
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
Returns whether this annotation transformation supports givenkind
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, nevernull
- Returns:
- whether this annotation transformation should apply
-
apply
Implements the actual annotation transformation.- Parameters:
context
- the transformation context, nevernull
-
requiresCompatibleMode
default boolean requiresCompatibleMode()Returns whether this annotation transformation requires the annotation overlay to be in the compatible mode. When this method returnstrue
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
Returns a builder for annotation transformation of arbitrary declarations.- Returns:
- a builder for annotation transformation of arbitrary declarations
-
forClasses
Returns a builder for annotation transformation of classes.- Returns:
- a builder for annotation transformation of classes
-
forFields
Returns a builder for annotation transformation of fields.- Returns:
- a builder for annotation transformation of fields
-
forMethods
Returns a builder for annotation transformation of methods.- Returns:
- a builder for annotation transformation of methods
-
forMethodParameters
Returns a builder for annotation transformation of method parameters.- Returns:
- a builder for annotation transformation of method parameters
-
forRecordComponents
Returns a builder for annotation transformation of record components.- Returns:
- a builder for annotation transformation of record components
-