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
-
Nested Class Summary
Nested classes/interfaces inherited from class io.quarkus.gizmo2.TypeArgument
TypeArgument.OfBounded, TypeArgument.OfExact, TypeArgument.OfExtends, TypeArgument.OfSuper, TypeArgument.OfTyped, TypeArgument.OfUnbounded, TypeArgument.OfWildcard -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(TypeArgument.OfWildcard other) booleaninthashCode()booleanReturnstrueif runtime-invisible type annotations are present, orfalseotherwise.booleanReturnstrueif runtime-visible type annotations are present, orfalseotherwise.Append the string representation of this type argument to the given builder, and return it.<A extends Annotation>
TypeArgument.OfWildcardwithAnnotation(Class<A> annotationType) Returns a copy of this type argument with the given annotation.<A extends Annotation>
TypeArgument.OfWildcardwithAnnotation(Class<A> annotationType, Consumer<AnnotationCreator<A>> builder) Returns a copy of this type argument with the given annotation.withAnnotations(Consumer<AnnotatableCreator> builder) Returns a copy of this type argument with annotations defined by the given builder.Methods inherited from class io.quarkus.gizmo2.TypeArgument
hasAnnotations, of, of, ofExact, ofExtends, ofSuper, ofUnbounded, toString
-
Method Details
-
hasVisibleAnnotations
public boolean hasVisibleAnnotations()Description copied from class:TypeArgumentReturnstrueif runtime-visible type annotations are present, orfalseotherwise.- Specified by:
hasVisibleAnnotationsin classTypeArgument- Returns:
trueif runtime-visible type annotations are present, orfalseotherwise
-
hasInvisibleAnnotations
public boolean hasInvisibleAnnotations()Description copied from class:TypeArgumentReturnstrueif runtime-invisible type annotations are present, orfalseotherwise.- Specified by:
hasInvisibleAnnotationsin classTypeArgument- Returns:
trueif runtime-invisible type annotations are present, orfalseotherwise
-
withAnnotations
Returns a copy of this type argument with annotations defined by the given builder.- Parameters:
builder- the annotation builder (must not benull)- Returns:
- a copy of this type argument with annotations defined by the given builder
-
withAnnotation
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 typebuilder- the builder for the single annotation (must not benull)- Returns:
- a copy of this type argument with the given annotation
-
equals
-
equals
-
hashCode
public int hashCode() -
toString
Description copied from class:TypeArgumentAppend the string representation of this type argument to the given builder, and return it.- Specified by:
toStringin classTypeArgument- Parameters:
b- the string builder (must not benull)- Returns:
- the same string builder (not
null)
-