Class TypeVariable.Builder

java.lang.Object
org.jboss.jandex.TypeVariable.Builder
Enclosing class:
TypeVariable

public static final class TypeVariable.Builder extends Object
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 Details

  • Method Details

    • addBound

      public TypeVariable.Builder addBound(Type bound)
      Adds a bound.
      Parameters:
      bound - the bound, must not be null
      Returns:
      this builder
    • addBound

      public TypeVariable.Builder addBound(Class<?> clazz)
      Adds a bound.
      Parameters:
      clazz - the class whose type is added as a bound, must not be null
      Returns:
      this builder
    • build

      public TypeVariable build()
      Returns the built type variable.
      Returns:
      the built type variable
    • self

      protected TypeVariable.Builder self()
    • annotationsArray

      protected AnnotationInstance[] annotationsArray()
      Returns:
      the annotations array or null if no annotation was specified
    • addAnnotation

      public TypeVariable.Builder 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 using AnnotationInstance.builder()
      Returns:
      this builder
      See Also: