Class AnnotationsTransformer.Builder
java.lang.Object
org.jboss.resteasy.reactive.common.processor.transformation.AnnotationsTransformer.Builder
- Enclosing interface:
AnnotationsTransformer
A convenient builder.
-
Method Summary
Modifier and TypeMethodDescriptionappliesTo(org.jboss.jandex.AnnotationTarget.Kind appliesToKind) priority(int priority) The given transformation logic is only performed if all conditions added viawhen(Predicate)are met.The transformation logic is only performed if the given predicate is evaluated to true.whenContainsAll(Class<? extends Annotation>... annotationNames) AnnotationsTransformer.TransformationContext.getAnnotations()must contain ALL of the given annotations.whenContainsAll(List<org.jboss.jandex.DotName> annotationNames) AnnotationsTransformer.TransformationContext.getAnnotations()must contain ALL of the given annotations.whenContainsAll(org.jboss.jandex.DotName... annotationNames) AnnotationsTransformer.TransformationContext.getAnnotations()must contain ALL of the given annotations.whenContainsAny(Class<? extends Annotation>... annotationNames) AnnotationsTransformer.TransformationContext.getAnnotations()must contain ANY of the given annotations.whenContainsAny(List<org.jboss.jandex.DotName> annotationNames) AnnotationsTransformer.TransformationContext.getAnnotations()must contain ANY of the given annotations.whenContainsAny(org.jboss.jandex.DotName... annotationNames) AnnotationsTransformer.TransformationContext.getAnnotations()must contain ANY of the given annotations.whenContainsNone(Class<? extends Annotation>... annotationNames) AnnotationsTransformer.TransformationContext.getAnnotations()must NOT contain any of the given annotations.whenContainsNone(List<org.jboss.jandex.DotName> annotationNames) AnnotationsTransformer.TransformationContext.getAnnotations()must NOT contain any of the given annotations.whenContainsNone(org.jboss.jandex.DotName... annotationNames) AnnotationsTransformer.TransformationContext.getAnnotations()must NOT contain any of the given annotations.
-
Method Details
-
appliesTo
public AnnotationsTransformer.Builder appliesTo(org.jboss.jandex.AnnotationTarget.Kind appliesToKind) - Parameters:
appliesToKind-- Returns:
- self
- See Also:
-
appliesTo
public AnnotationsTransformer.Builder appliesTo(Predicate<org.jboss.jandex.AnnotationTarget.Kind> appliesTo) - Parameters:
appliesTo-- Returns:
- self
- See Also:
-
priority
- Parameters:
priority-- Returns:
- self
-
whenContainsAll
public AnnotationsTransformer.Builder whenContainsAll(List<org.jboss.jandex.DotName> annotationNames) AnnotationsTransformer.TransformationContext.getAnnotations()must contain ALL of the given annotations.- Parameters:
annotationNames-- Returns:
- self
-
whenContainsAll
AnnotationsTransformer.TransformationContext.getAnnotations()must contain ALL of the given annotations.- Parameters:
annotationNames-- Returns:
- self
-
whenContainsAll
@SafeVarargs public final AnnotationsTransformer.Builder whenContainsAll(Class<? extends Annotation>... annotationNames) AnnotationsTransformer.TransformationContext.getAnnotations()must contain ALL of the given annotations.- Parameters:
annotationNames-- Returns:
- self
-
whenContainsAny
public AnnotationsTransformer.Builder whenContainsAny(List<org.jboss.jandex.DotName> annotationNames) AnnotationsTransformer.TransformationContext.getAnnotations()must contain ANY of the given annotations.- Parameters:
annotationNames-- Returns:
- self
-
whenContainsAny
AnnotationsTransformer.TransformationContext.getAnnotations()must contain ANY of the given annotations.- Parameters:
annotationNames-- Returns:
- self
-
whenContainsAny
@SafeVarargs public final AnnotationsTransformer.Builder whenContainsAny(Class<? extends Annotation>... annotationNames) AnnotationsTransformer.TransformationContext.getAnnotations()must contain ANY of the given annotations.- Parameters:
annotationNames-- Returns:
- self
-
whenContainsNone
public AnnotationsTransformer.Builder whenContainsNone(List<org.jboss.jandex.DotName> annotationNames) AnnotationsTransformer.TransformationContext.getAnnotations()must NOT contain any of the given annotations.- Parameters:
annotationNames-- Returns:
- self
-
whenContainsNone
AnnotationsTransformer.TransformationContext.getAnnotations()must NOT contain any of the given annotations.- Parameters:
annotationNames-- Returns:
- self
-
whenContainsNone
@SafeVarargs public final AnnotationsTransformer.Builder whenContainsNone(Class<? extends Annotation>... annotationNames) AnnotationsTransformer.TransformationContext.getAnnotations()must NOT contain any of the given annotations.- Parameters:
annotationNames-- Returns:
- self
-
when
public AnnotationsTransformer.Builder when(Predicate<AnnotationsTransformer.TransformationContext> when) The transformation logic is only performed if the given predicate is evaluated to true. Multiple predicates are logically-ANDed.- Parameters:
when-- Returns:
- self
-
transform
public AnnotationsTransformer transform(Consumer<AnnotationsTransformer.TransformationContext> consumer) The given transformation logic is only performed if all conditions added viawhen(Predicate)are met.- Parameters:
consumer-- Returns:
- a new annotation transformer
-