java.lang.Object
io.quarkus.gizmo2.TypeArgument
- Direct Known Subclasses:
TypeArgument.OfExact,TypeArgument.OfWildcard
public abstract sealed class TypeArgument
extends Object
permits TypeArgument.OfExact, TypeArgument.OfWildcard
An actual type argument for a formal type parameter.
Type arguments differ from generic types in that
they may represent wildcard types.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA wildcard type argument that has a bound.static final classAn exact type argument.static final classA wildcard type argument with an upper (extends) bound.static final classA wildcard type argument with a lower (super) bound.static interfaceImplemented by type arguments that contain a type.static final classAn unbounded wildcard type argument.static classA wildcard type argument. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanReturnstrueif any type annotations are present, orfalseotherwise.abstract booleanReturnstrueif runtime-invisible type annotations are present, orfalseotherwise.abstract booleanReturnstrueif runtime-visible type annotations are present, orfalseotherwise.static TypeArgument.OfExactReturns a type argument representing exactly the given type.static TypeArgument.OfExactReturns a type argument representing exactly the given type.static TypeArgument.OfExactReturns a type argument representing exactly the given type.static TypeArgument.OfExtendsofExtends(GenericType.OfReference bound) Returns a type argument representing a wildcard with given upper bound.static TypeArgument.OfSuperofSuper(GenericType.OfReference bound) Returns a type argument representing a wildcard with given lower bound.static TypeArgument.OfUnboundedReturns a type argument representing the unbounded wildcard.toString()Returns the string representation of this type argument.abstract StringBuilderAppend the string representation of this type argument to the given builder, and return it.
-
Method Details
-
of
Returns a type argument representing exactly the given type.- Parameters:
type- the argument type (must not benull)- Returns:
- a type argument representing exactly the given type
-
of
Returns a type argument representing exactly the given type.- Parameters:
type- the argument type (must not benull)- Returns:
- a type argument representing exactly the given type
-
ofExact
Returns a type argument representing exactly the given type.- Parameters:
type- the argument type (must not benull)- Returns:
- a type argument representing exactly the given type
-
ofExtends
Returns a type argument representing a wildcard with given upper bound.- Parameters:
bound- the bound (must not benull)- Returns:
- a type argument representing a wildcard with given upper bound
-
ofSuper
Returns a type argument representing a wildcard with given lower bound.- Parameters:
bound- the bound (must not benull)- Returns:
- a type argument representing a wildcard with given lower bound
-
ofUnbounded
Returns a type argument representing the unbounded wildcard.- Returns:
- a type argument representing the unbounded wildcard
-
hasVisibleAnnotations
public abstract boolean hasVisibleAnnotations()Returnstrueif runtime-visible type annotations are present, orfalseotherwise.- Returns:
trueif runtime-visible type annotations are present, orfalseotherwise
-
hasInvisibleAnnotations
public abstract boolean hasInvisibleAnnotations()Returnstrueif runtime-invisible type annotations are present, orfalseotherwise.- Returns:
trueif runtime-invisible type annotations are present, orfalseotherwise
-
hasAnnotations
public final boolean hasAnnotations()Returnstrueif any type annotations are present, orfalseotherwise.- Returns:
trueif any type annotations are present, orfalseotherwise
-
toString
Append the string representation of this type argument to the given builder, and return it.- Parameters:
b- the string builder (must not benull)- Returns:
- the same string builder (not
null)
-
toString
Returns the string representation of this type argument.
-