Package io.quarkus.arc.processor
Class AnnotationsTransformer.Builder
- java.lang.Object
-
- io.quarkus.arc.processor.AnnotationsTransformer.Builder
-
- Enclosing interface:
- AnnotationsTransformer
public static final class AnnotationsTransformer.Builder extends Object
A convenient builder.
-
-
Method Summary
-
-
-
Method Detail
-
appliesTo
public AnnotationsTransformer.Builder appliesTo(org.jboss.jandex.AnnotationTarget.Kind appliesToKind)
- Parameters:
appliesToKind-- Returns:
- self
- See Also:
AnnotationsTransformer.appliesTo(Kind)
-
appliesTo
public AnnotationsTransformer.Builder appliesTo(Predicate<org.jboss.jandex.AnnotationTarget.Kind> appliesTo)
- Parameters:
appliesTo-- Returns:
- self
- See Also:
AnnotationsTransformer.appliesTo(Kind)
-
priority
public AnnotationsTransformer.Builder priority(int 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
public AnnotationsTransformer.Builder whenContainsAll(org.jboss.jandex.DotName... annotationNames)
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
public AnnotationsTransformer.Builder whenContainsAny(org.jboss.jandex.DotName... annotationNames)
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
public AnnotationsTransformer.Builder whenContainsNone(org.jboss.jandex.DotName... annotationNames)
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:
predicate-- 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
-
-