Package org.jboss.jandex
Class AnnotationTransformation.Builder<THIS extends AnnotationTransformation.Builder<THIS>>
java.lang.Object
org.jboss.jandex.AnnotationTransformation.Builder<THIS>
- Type Parameters:
THIS- type of this builder
- Direct Known Subclasses:
AnnotationTransformation.ClassBuilder,AnnotationTransformation.DeclarationBuilder,AnnotationTransformation.FieldBuilder,AnnotationTransformation.MethodBuilder,AnnotationTransformation.MethodParameterBuilder,AnnotationTransformation.RecordComponentBuilder
- Enclosing interface:
- AnnotationTransformation
public abstract static class AnnotationTransformation.Builder<THIS extends AnnotationTransformation.Builder<THIS>>
extends Object
Abstract class for annotation transformation builders.
- See Also:
-
priority(int)whenAnyMatch(Class...)whenAnyMatch(DotName...)whenAnyMatch(List)whenAnyMatch(Predicate)whenAllMatch(Class...)whenAllMatch(DotName...)whenAllMatch(List)whenAllMatch(Predicate)whenNoneMatch(Class...)whenNoneMatch(DotName...)whenNoneMatch(List)whenNoneMatch(Predicate)when(Predicate)AnnotationTransformation.DeclarationBuilderAnnotationTransformation.ClassBuilderAnnotationTransformation.FieldBuilderAnnotationTransformation.MethodBuilderAnnotationTransformation.MethodParameterBuilderAnnotationTransformation.RecordComponentBuilder
-
Method Summary
Modifier and TypeMethodDescriptionfinal THISpriority(int priority) Sets the priority of the built annotation transformation.transform(Consumer<AnnotationTransformation.TransformationContext> transformation) Builds an annotation transformation based on the giventransformationfunction.Adds a predicate to the list of predicates that will be tested before applying the transformation.final THISwhenAllMatch(Class<? extends Annotation>... classes) Adds a predicate that tests whether all of the current set of annotations are of givenclasses.final THISwhenAllMatch(Predicate<AnnotationInstance> predicate) Adds a predicate that tests whether all of the current set of annotations match the givenpredicate.final THISwhenAllMatch(List<DotName> classes) Adds a predicate that tests whether all of the current set of annotations are of givenclasses.final THISwhenAllMatch(DotName... classes) Adds a predicate that tests whether all of the current set of annotations are of givenclasses.final THISwhenAnyMatch(Class<? extends Annotation>... classes) Adds a predicate that tests whether any of the current set of annotations is of givenclasses.final THISwhenAnyMatch(Predicate<AnnotationInstance> predicate) Adds a predicate that tests whether any of the current set of annotations matches the givenpredicate.final THISwhenAnyMatch(List<DotName> classes) Adds a predicate that tests whether any of the current set of annotations is of givenclasses.final THISwhenAnyMatch(DotName... classes) Adds a predicate that tests whether any of the current set of annotations is of givenclasses.final THISwhenNoneMatch(Class<? extends Annotation>... classes) Adds a predicate that tests whether none of the current set of annotations is of givenclasses.final THISwhenNoneMatch(Predicate<AnnotationInstance> predicate) Adds a predicate that tests whether none of the current set of annotations matches the givenpredicate.final THISwhenNoneMatch(List<DotName> classes) Adds a predicate that tests whether none of the current set of annotations is of givenclasses.final THISwhenNoneMatch(DotName... classes) Adds a predicate that tests whether none of the current set of annotations is of givenclasses.
-
Method Details
-
priority
Sets the priority of the built annotation transformation. By default, the priority isAnnotationTransformation.DEFAULT_PRIORITY_VALUE.- Parameters:
priority- the priority- Returns:
- this builder
-
whenAnyMatch
Adds a predicate that tests whether any of the current set of annotations is of givenclasses.- Parameters:
classes- the annotation classes, must not benull- Returns:
- this builder
- See Also:
-
whenAnyMatch
Adds a predicate that tests whether any of the current set of annotations is of givenclasses.- Parameters:
classes- the annotation classes, must not benull- Returns:
- this builder
- See Also:
-
whenAnyMatch
Adds a predicate that tests whether any of the current set of annotations is of givenclasses.- Parameters:
classes- the annotation classes, must not benull- Returns:
- this builder
- See Also:
-
whenAnyMatch
Adds a predicate that tests whether any of the current set of annotations matches the givenpredicate.- Parameters:
predicate- the predicate, must not benull- Returns:
- this builder
- See Also:
-
whenAllMatch
Adds a predicate that tests whether all of the current set of annotations are of givenclasses.- Parameters:
classes- the annotation classes, must not benull- Returns:
- this builder
- See Also:
-
whenAllMatch
Adds a predicate that tests whether all of the current set of annotations are of givenclasses.- Parameters:
classes- the annotation classes, must not benull- Returns:
- this builder
- See Also:
-
whenAllMatch
Adds a predicate that tests whether all of the current set of annotations are of givenclasses.- Parameters:
classes- the annotation classes, must not benull- Returns:
- this builder
- See Also:
-
whenAllMatch
Adds a predicate that tests whether all of the current set of annotations match the givenpredicate.- Parameters:
predicate- the predicate, must not benull- Returns:
- this builder
- See Also:
-
whenNoneMatch
Adds a predicate that tests whether none of the current set of annotations is of givenclasses.- Parameters:
classes- the annotation classes, must not benull- Returns:
- this builder
- See Also:
-
whenNoneMatch
Adds a predicate that tests whether none of the current set of annotations is of givenclasses.- Parameters:
classes- the annotation classes, must not benull- Returns:
- this builder
- See Also:
-
whenNoneMatch
Adds a predicate that tests whether none of the current set of annotations is of givenclasses.- Parameters:
classes- the annotation classes, must not benull- Returns:
- this builder
- See Also:
-
whenNoneMatch
Adds a predicate that tests whether none of the current set of annotations matches the givenpredicate.- Parameters:
predicate- the predicate, must not benull- Returns:
- this builder
- See Also:
-
when
Adds a predicate to the list of predicates that will be tested before applying the transformation. If some of the predicates returnsfalse, the transformation is not applied. In other words, the predicates are combined using logical and (conjunction).- Parameters:
predicate- the predicate, must not benull- Returns:
- this builder
-
transform
public AnnotationTransformation transform(Consumer<AnnotationTransformation.TransformationContext> transformation) Builds an annotation transformation based on the giventransformationfunction.- Parameters:
transformation- the transformation function, must not benull- Returns:
- the built annotation transformation, never
null
-