Package org.jboss.jandex
Class Type.Builder<THIS extends Type.Builder<THIS>>
- java.lang.Object
-
- org.jboss.jandex.Type.Builder<THIS>
-
- Type Parameters:
THIS- self type
- Direct Known Subclasses:
ArrayType.Builder,ClassType.Builder,ParameterizedType.Builder,TypeVariable.Builder,WildcardType.Builder
- Enclosing class:
- Type
abstract static class Type.Builder<THIS extends Type.Builder<THIS>> extends java.lang.ObjectBase class for type builders.- Since:
- 3.1.0
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<AnnotationInstance>annotationsprotected DotNamename
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description THISaddAnnotation(AnnotationInstance annotation)Adds an annotation to the type being created by this builder.protected AnnotationInstance[]annotationsArray()protected THISself()
-
-
-
Field Detail
-
name
protected final DotName name
-
annotations
protected final java.util.List<AnnotationInstance> annotations
-
-
Constructor Detail
-
Builder
protected Builder(DotName name)
-
-
Method Detail
-
self
protected THIS self()
-
annotationsArray
protected AnnotationInstance[] annotationsArray()
- Returns:
- the annotations array or
nullif no annotation was specified
-
addAnnotation
public THIS addAnnotation(AnnotationInstance annotation)
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:
Type.annotations()
-
-