Package org.jboss.jandex
Class TypeVariable.Builder
java.lang.Object
org.jboss.jandex.TypeVariable.Builder
- Enclosing class:
- TypeVariable
Convenient builder for
TypeVariable. If no bound is added, the built
type variable will have a single bound of java.lang.Object.- 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.Adds a bound.Adds a bound.protected AnnotationInstance[]build()Returns the built type variable.protected TypeVariable.Builderself()
-
Field Details
-
name
-
annotations
-
-
Method Details
-
addBound
Adds a bound.- Parameters:
bound- the bound, must not benull- Returns:
- this builder
-
addBound
Adds a bound.- Parameters:
clazz- the class whose type is added as a bound, must not benull- Returns:
- this builder
-
build
Returns the built type variable.- Returns:
- the built type variable
-
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:
-