Interface TypeParameterCreator

All Superinterfaces:
AnnotatableCreator

public sealed interface TypeParameterCreator extends AnnotatableCreator
A creator for a type parameter.
  • Method Details

    • name

      String name()
      Returns the name of the type variable being created (not null).
      Returns:
      the name of the type variable being created (not null)
    • setFirstBound

      void setFirstBound(GenericType.OfClass bound)
      Establish the (optional) first bound for the type variable. The first bound is a class type.
      Parameters:
      bound - the first bound (must not be null)
    • setFirstBound

      void setFirstBound(GenericType.OfTypeVariable bound)
      Establish the (optional) first bound for the type variable. The first bound is a type variable. In this case, no other bounds may be present.
      Parameters:
      bound - the first bound (must not be null)
    • setOtherBounds

      void setOtherBounds(List<GenericType.OfClass> bounds)
      Establish the other (secondary) bounds for the type variable. The other bounds must all be interface types. If the first bound is a type variable, there may be no other bounds.

      It is possible to set the other bounds without setting the first bound. In this case, all bounds are interface types.

      Parameters:
      bounds - the secondary bounds (must not be null)
    • setOtherBounds

      default void setOtherBounds(GenericType.OfClass... bounds)
      Establish the other (secondary) bounds for the type variable. The other bounds must all be interface types. If the first bound is a type variable, there may be no other bounds.

      It is possible to set the other bounds without setting the first bound. In this case, all bounds are interface types.

      Parameters:
      bounds - the secondary bounds (must not be null)