java.lang.Object
io.quarkus.gizmo2.TypeParameter
- All Implemented Interfaces:
GenericTyped,SimpleTyped,Typed
- Direct Known Subclasses:
TypeParameter.OfConstructor,TypeParameter.OfMethod,TypeParameter.OfType
public abstract sealed class TypeParameter
extends Object
implements GenericTyped
permits TypeParameter.OfConstructor, TypeParameter.OfMethod, TypeParameter.OfType
A type parameter on a class, interface, or method.
The difference between type parameters and type variables
is that type parameters may declare bounds.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA type parameter on a constructor.static final classA type parameter on a method.static final classA type parameter on a class or interface. -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(TypeParameter other) Returnstrueif this object is equal to the given object, orfalseif it is not.final booleanReturnstrueif this object is equal to the given object, orfalseif it is not.erasure()Returns the erased type of this type variable (notnull).Returns the optional first (primary) bound (not null).Returns the generic type corresponding to this type variable (notnull).booleanReturnstrueif this value has a generic type, orfalseif it does not have one.inthashCode()Returns the hash code for this type variable.name()Returns the type variable name.Returns the other (secondary) bounds (notnull).toString()Returns the name of this type variable.type()Returns the type of this type variable, which is equal to its erasure (notnull).abstract booleanvisibleIn(ConstructorDesc desc) Returnstrueif this type variable is visible throughout the given constructor, orfalseif it is not.abstract booleanvisibleIn(MethodDesc desc) Returnstrueif this type variable is visible throughout the given method, orfalseif it is not.abstract booleanReturnstrueif this type variable is visible throughout the given class, orfalseif it is not.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.quarkus.gizmo2.SimpleTyped
isPrimitive, isVoid, slotSize, typeKind
-
Method Details
-
firstBound
Returns the optional first (primary) bound (not null). This should be a class or type variable bound.- Returns:
- the optional first (primary) bound (not null)
-
otherBounds
Returns the other (secondary) bounds (notnull). This should be a list of interface types, or empty if the first bound is a type variable.- Returns:
- the other (secondary) bounds (not
null)
-
name
Returns the type variable name.- Returns:
- the type variable name
-
genericType
Returns the generic type corresponding to this type variable (notnull).- Specified by:
genericTypein interfaceGenericTyped- Returns:
- the generic type corresponding to this type variable (not
null)
-
hasGenericType
public boolean hasGenericType()Description copied from interface:GenericTypedReturnstrueif this value has a generic type, orfalseif it does not have one.- Specified by:
hasGenericTypein interfaceGenericTyped- Returns:
trueif this value has a generic type, orfalseif it does not have one
-
type
Returns the type of this type variable, which is equal to its erasure (notnull).- Specified by:
typein interfaceSimpleTyped- Specified by:
typein interfaceTyped- Returns:
- the type of this type variable, which is equal to its erasure (not
null)
-
visibleIn
Returnstrueif this type variable is visible throughout the given class, orfalseif it is not.- Returns:
trueif this type variable is visible throughout the given class, orfalseif it is not
-
visibleIn
Returnstrueif this type variable is visible throughout the given method, orfalseif it is not.- Returns:
trueif this type variable is visible throughout the given method, orfalseif it is not
-
visibleIn
Returnstrueif this type variable is visible throughout the given constructor, orfalseif it is not.- Returns:
trueif this type variable is visible throughout the given constructor, orfalseif it is not
-
equals
Returnstrueif this object is equal to the given object, orfalseif it is not. -
equals
Returnstrueif this object is equal to the given object, orfalseif it is not.- Returns:
trueif this object is equal to the given object, orfalseif it is not
-
hashCode
public int hashCode()Returns the hash code for this type variable. -
toString
Returns the name of this type variable. -
erasure
Returns the erased type of this type variable (notnull).- Returns:
- the erased type of this type variable (not
null)
-