Class GenericType.OfThrows

Direct Known Subclasses:
GenericType.OfClass, GenericType.OfTypeVariable
Enclosing class:
GenericType

public abstract static class GenericType.OfThrows extends GenericType.OfReference
A generic type corresponding to a reference type that is suitable for use in a method throws clause.
  • Method Details

    • withAnnotations

      public GenericType.OfThrows withAnnotations(Consumer<AnnotatableCreator> builder)
      Description copied from class: GenericType
      Returns this generic type with annotations added by the given builder (not null).
      Overrides:
      withAnnotations in class GenericType.OfReference
      Parameters:
      builder - the annotation builder (must not be null)
      Returns:
      this generic type with annotations added by the given builder (not null)
    • withAnnotation

      public <A extends Annotation> GenericType.OfThrows withAnnotation(Class<A> annotationType)
      Description copied from class: GenericType
      Returns this generic type with the given additional annotation (not null).
      Overrides:
      withAnnotation in class GenericType.OfReference
      Parameters:
      annotationType - the annotation type (must not be null)
      Returns:
      this generic type with the given additional annotation (not null)
    • withAnnotation

      public <A extends Annotation> GenericType.OfThrows withAnnotation(Class<A> annotationType, Consumer<AnnotationCreator<A>> builder)
      Description copied from class: GenericType
      Returns this generic type with the given additional annotation (not null).
      Overrides:
      withAnnotation in class GenericType.OfReference
      Parameters:
      annotationType - the annotation type (must not be null)
      builder - the builder for the given annotation type (must not be null)
      Returns:
      this generic type with the given additional annotation (not null)
    • equals

      public final boolean equals(GenericType.OfReference other)
      Description copied from class: GenericType.OfReference
      Returns true if this object is equal to the given object, or false if it is not.
      Overrides:
      equals in class GenericType.OfReference
      Returns:
      true if this object is equal to the given object, or false if it is not
    • equals

      public boolean equals(GenericType.OfThrows other)
      Returns true if this object is equal to the given object, or false if it is not.
      Returns:
      true if this object is equal to the given object, or false if it is not