Package org.jboss.jandex
Class MutableAnnotationOverlay.Builder
- java.lang.Object
-
- org.jboss.jandex.MutableAnnotationOverlay.Builder
-
- Enclosing interface:
- MutableAnnotationOverlay
public static final class MutableAnnotationOverlay.Builder extends java.lang.ObjectThe builder for a mutable annotation overlay.
-
-
Field Summary
Fields Modifier and Type Field Description private booleancompatibleModeprivate IndexViewindexprivate booleaninheritedAnnotationsprivate booleanruntimeAnnotationsOnly
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MutableAnnotationOverlaybuild()Builds and returns a mutable annotation overlay based on the configuration of this builder.MutableAnnotationOverlay.BuildercompatibleMode()When called, the built annotation overlay shall treat method parameters as part of methods.MutableAnnotationOverlay.BuilderinheritedAnnotations()When called, the built annotation overlay shall return inherited annotations per the Java rules.MutableAnnotationOverlay.BuilderruntimeAnnotationsOnly()When called, the built annotation overlay shall only return runtime-retained annotations; class-retained annotations are ignored.
-
-
-
Field Detail
-
index
private final IndexView index
-
compatibleMode
private boolean compatibleMode
-
runtimeAnnotationsOnly
private boolean runtimeAnnotationsOnly
-
inheritedAnnotations
private boolean inheritedAnnotations
-
-
Constructor Detail
-
Builder
Builder(IndexView index)
-
-
Method Detail
-
compatibleMode
public MutableAnnotationOverlay.Builder compatibleMode()
When called, the built annotation overlay shall treat method parameters as part of methods. This means that annotations on method parameters are returned when asking for annotations of a method, asking for annotations on method parameters results in an exception, and annotation transformations for methods are produced when adding/removing annotations to/from a method parameter.This method is called
compatibleModebecause the built annotation overlay is compatible with the previous implementation of the same concept in Quarkus.- Returns:
- this builder
-
runtimeAnnotationsOnly
public MutableAnnotationOverlay.Builder runtimeAnnotationsOnly()
When called, the built annotation overlay shall only return runtime-retained annotations; class-retained annotations are ignored. Note that this only applies to annotations present in class files (and therefore in Jandex); annotations added to the overlay usingMutableAnnotationOverlay.addAnnotation(Declaration, AnnotationInstance)are not inspected and are always returned.- Returns:
- this builder
-
inheritedAnnotations
public MutableAnnotationOverlay.Builder inheritedAnnotations()
When called, the built annotation overlay shall return inherited annotations per the Java rules.- Returns:
- this builder
-
build
public MutableAnnotationOverlay build()
Builds and returns a mutable annotation overlay based on the configuration of this builder.- Returns:
- the mutable annotation overlay, never
null
-
-