Class TypeArgument.OfWildcard

java.lang.Object
io.quarkus.gizmo2.TypeArgument
io.quarkus.gizmo2.TypeArgument.OfWildcard
Direct Known Subclasses:
TypeArgument.OfExtends, TypeArgument.OfSuper, TypeArgument.OfUnbounded
Enclosing class:
TypeArgument

public abstract static sealed class TypeArgument.OfWildcard extends TypeArgument permits TypeArgument.OfExtends, TypeArgument.OfSuper, TypeArgument.OfUnbounded
A wildcard type argument. Its type annotations are present on the wildcard, which corresponds to the following Java syntax:
  • @MyAnn ?
  • @MyAnn ? extends Bound
  • @MyAnn ? super Bound
The bound, if present, may have its own type annotations.
  • Method Details

    • hasVisibleAnnotations

      public boolean hasVisibleAnnotations()
      Description copied from class: TypeArgument
      Returns true if runtime-visible type annotations are present, or false otherwise.
      Specified by:
      hasVisibleAnnotations in class TypeArgument
      Returns:
      true if runtime-visible type annotations are present, or false otherwise
    • hasInvisibleAnnotations

      public boolean hasInvisibleAnnotations()
      Description copied from class: TypeArgument
      Returns true if runtime-invisible type annotations are present, or false otherwise.
      Specified by:
      hasInvisibleAnnotations in class TypeArgument
      Returns:
      true if runtime-invisible type annotations are present, or false otherwise
    • withAnnotations

      public TypeArgument.OfWildcard withAnnotations(Consumer<AnnotatableCreator> builder)
      Returns a copy of this type argument with annotations defined by the given builder.
      Parameters:
      builder - the annotation builder (must not be null)
      Returns:
      a copy of this type argument with annotations defined by the given builder
    • withAnnotation

      public <A extends Annotation> TypeArgument.OfWildcard withAnnotation(Class<A> annotationType)
      Returns a copy of this type argument with the given annotation.
      Parameters:
      annotationType - the annotation type
      Returns:
      a copy of this type argument with the given annotation
    • withAnnotation

      public <A extends Annotation> TypeArgument.OfWildcard withAnnotation(Class<A> annotationType, Consumer<AnnotationCreator<A>> builder)
      Returns a copy of this type argument with the given annotation.
      Parameters:
      annotationType - the annotation type
      builder - the builder for the single annotation (must not be null)
      Returns:
      a copy of this type argument with the given annotation
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(TypeArgument.OfWildcard other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public StringBuilder toString(StringBuilder b)
      Description copied from class: TypeArgument
      Append the string representation of this type argument to the given builder, and return it.
      Specified by:
      toString in class TypeArgument
      Parameters:
      b - the string builder (must not be null)
      Returns:
      the same string builder (not null)