Package org.jboss.jandex
Class ParameterizedType.Builder
java.lang.Object
org.jboss.jandex.ParameterizedType.Builder
- Enclosing class:
- ParameterizedType
Convenient builder for
ParameterizedType.- 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.addArgument(Class<?> clazz) Adds aClassTypeargument for the given class.addArgument(Type argument) Adds a type argument.protected AnnotationInstance[]build()Returns the built parameterized type.protected ParameterizedType.Builderself()Sets the owner.
-
Field Details
-
name
-
annotations
-
-
Method Details
-
addArgument
Adds a type argument.- Parameters:
argument- the type argument, must not benull- Returns:
- this builder
-
addArgument
Adds aClassTypeargument for the given class.- Parameters:
clazz- the class whose type is added as a type argument, must not benull- Returns:
- this builder
-
setOwner
Sets the owner.- Parameters:
owner- the owner of the parameterized type being built, must not benull- Returns:
- this builder
- See Also:
-
build
Returns the built parameterized type.- Returns:
- the built parameterized 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:
-