Package org.jboss.jandex
Class WildcardType.Builder
java.lang.Object
org.jboss.jandex.WildcardType.Builder
- Enclosing class:
- WildcardType
Convenient builder for
WildcardType.
Note that only one bound may be set. If the setUpperBound() and
setLowerBound() methods are called multiple times, only the last
call is taken into account; the previously set bounds are ignored.
- Since:
- 3.1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<AnnotationInstance>protected final DotName -
Method Summary
Modifier and TypeMethodDescriptionaddAnnotation(AnnotationInstance annotation) Adds an annotation to the type being created by this builder.protected AnnotationInstance[]build()Returns the built wildcard type.protected WildcardType.Builderself()setLowerBound(Class<?> lowerBound) Sets the lower bound.setLowerBound(Type lowerBound) Sets the lower bound.setUpperBound(Class<?> upperBound) Sets the upper bound.setUpperBound(Type upperBound) Sets the upper bound.
-
Field Details
-
name
-
annotations
-
-
Method Details
-
setUpperBound
Sets the upper bound.- Parameters:
upperBound- the class whose type is set as the upper bound, must not benull- Returns:
- this builder
-
setUpperBound
Sets the upper bound.- Parameters:
upperBound- the upper bound, must not benull- Returns:
- this builder
-
setLowerBound
Sets the lower bound.- Parameters:
lowerBound- the class whose type is set as the lower bound, must not benull- Returns:
- this builder
-
setLowerBound
Sets the lower bound.- Parameters:
lowerBound- the lower bound, must not benull- Returns:
- this builder
-
build
Returns the built wildcard type.- Returns:
- the built wildcard type
-
self
-
annotationsArray
- Returns:
- the annotations array or
nullif no annotation was specified
-
addAnnotation
Adds an annotation to the type being created by this builder. Note that it becomes a type annotation.- Parameters:
annotation- the annotation instance; can be created usingAnnotationInstance.builder()- Returns:
- this builder
- See Also:
-