Package org.jboss.jandex
Class TypeVariable.Builder
- java.lang.Object
-
- org.jboss.jandex.Type.Builder<TypeVariable.Builder>
-
- org.jboss.jandex.TypeVariable.Builder
-
- Enclosing class:
- TypeVariable
public static final class TypeVariable.Builder extends Type.Builder<TypeVariable.Builder>
Convenient builder forTypeVariable
. If no bound is added, the built type variable will have a single bound ofjava.lang.Object
.- Since:
- 3.1.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Type>
bounds
private java.lang.String
identifier
-
Fields inherited from class org.jboss.jandex.Type.Builder
annotations, name
-
-
Constructor Summary
Constructors Constructor Description Builder(java.lang.String identifier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeVariable.Builder
addBound(java.lang.Class<?> clazz)
Adds a bound.TypeVariable.Builder
addBound(Type bound)
Adds a bound.TypeVariable
build()
Returns the built type variable.-
Methods inherited from class org.jboss.jandex.Type.Builder
addAnnotation, annotationsArray, self
-
-
-
-
Field Detail
-
identifier
private final java.lang.String identifier
-
bounds
private final java.util.List<Type> bounds
-
-
Method Detail
-
addBound
public TypeVariable.Builder addBound(Type bound)
Adds a bound.- Parameters:
bound
- the bound, must not benull
- Returns:
- this builder
-
addBound
public TypeVariable.Builder addBound(java.lang.Class<?> clazz)
Adds a bound.- Parameters:
clazz
- the class whose type is added as a bound, must not benull
- Returns:
- this builder
-
build
public TypeVariable build()
Returns the built type variable.- Returns:
- the built type variable
-
-