Class TypeDescription.Generic.OfWildcardType
- All Implemented Interfaces:
Iterable<TypeDefinition>, AnnotationSource, ModifierReviewable, ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForModuleDescription, ModifierReviewable.ForModuleRequirement, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration, ModifierReviewable.OfMandatable, NamedElement, TypeDefinition, TypeDescription.Generic
- Direct Known Subclasses:
TypeDescription.Generic.OfWildcardType.ForLoadedType, TypeDescription.Generic.OfWildcardType.Latent, TypePool.Default.LazyTypeDescription.GenericTypeToken.ForLowerBoundWildcard.LazyLowerBoundWildcard, TypePool.Default.LazyTypeDescription.GenericTypeToken.ForUnboundWildcard.LazyUnboundWildcard, TypePool.Default.LazyTypeDescription.GenericTypeToken.ForUpperBoundWildcard.LazyUpperBoundWildcard
- Enclosing interface:
TypeDescription.Generic
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDescription of a loaded wildcard.static classA latent description of a wildcard type.Nested classes/interfaces inherited from interface AnnotationSource
AnnotationSource.Empty, AnnotationSource.ExplicitNested classes/interfaces inherited from interface ModifierReviewable
ModifierReviewable.AbstractBase, ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForModuleDescription, ModifierReviewable.ForModuleRequirement, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration, ModifierReviewable.OfMandatableNested classes/interfaces inherited from interface NamedElement
NamedElement.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeNameNested classes/interfaces inherited from interface TypeDefinition
TypeDefinition.Sort, TypeDefinition.SuperClassIteratorNested classes/interfaces inherited from interface TypeDescription.Generic
TypeDescription.Generic.AbstractBase, TypeDescription.Generic.AnnotationReader, TypeDescription.Generic.Builder, TypeDescription.Generic.LazyProjection, TypeDescription.Generic.LazyProxy, TypeDescription.Generic.OfGenericArray, TypeDescription.Generic.OfNonGenericType, TypeDescription.Generic.OfParameterizedType, TypeDescription.Generic.OfTypeVariable, TypeDescription.Generic.OfWildcardType, TypeDescription.Generic.Visitor<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe source code representation of a wildcard.Fields inherited from interface ModifierReviewable
EMPTY_MASKFields inherited from interface NamedElement
EMPTY_NAME, NO_NAMEFields inherited from interface TypeDefinition
RAW_TYPES_PROPERTYFields inherited from interface TypeDescription.Generic
ANNOTATION, CLASS, OBJECT, UNDEFINED, VOID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(TypeDescription.Generic.Visitor<T> visitor) Applies a visitor to this generic type description.Returns the erasure of this type.booleanfindBindingOf(TypeDescription.Generic typeVariable) Returns the parameter binding of the supplied type variable.Returns the display name of this element as it is found in the source code.Returns the component type of this type.Returns the fields that this type declares.Returns the methods that this type declares.Returns the interfaces that this type implements.Returns the owner type of this type.Returns the list of record components that are declared by this type.getSort()Returns the sort of the generic type this instance represents.Returns the size of the type described by this instance.Returns the super class of this type.Returns the symbol of this type variable.Returns the type arguments of this type.Returns the name of the type.Returns the source of this type variable.inthashCode()booleanisArray()Checks if the type described by this entity is an array.booleanChecks if the type described by this entity is a primitive type.booleanisRecord()Checks if this type is a Java record.iterator()booleanrepresents(Type type) Checks if the type described by this instance representstype.toString()Methods inherited from class TypeDescription.Generic.AbstractBase
asGenericType, asRawType, getModifiersMethods inherited from class ModifierReviewable.AbstractBase
getEnumerationState, getFieldManifestation, getFieldPersistence, getMandate, getMethodManifestation, getMethodStrictness, getOpenness, getOwnership, getParameterManifestation, getProvisioningState, getRequiredPhase, getSynchronizationState, getSyntheticState, getTransitivity, getTypeManifestation, getVisibility, isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isOpen, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStaticPhase, isStrict, isSynchronized, isSynthetic, isTransient, isTransitive, isVarArgs, isVolatileMethods inherited from interface AnnotationSource
getDeclaredAnnotationsMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface ModifierReviewable
getSyntheticState, isFinal, isSyntheticMethods inherited from interface ModifierReviewable.ForTypeDefinition
getTypeManifestation, isAnnotation, isInterfaceMethods inherited from interface ModifierReviewable.OfAbstraction
isAbstractMethods inherited from interface ModifierReviewable.OfByteCodeElement
getOwnership, getVisibility, isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStaticMethods inherited from interface ModifierReviewable.OfEnumeration
getEnumerationState, isEnumMethods inherited from interface TypeDescription.Generic
getLowerBounds, getUpperBounds
-
Field Details
-
SYMBOL
-
-
Constructor Details
-
OfWildcardType
public OfWildcardType()
-
-
Method Details
-
getSort
Returns the sort of the generic type this instance represents.- Returns:
- The sort of the generic type.
-
asErasure
Returns the erasure of this type. Wildcard types (TypeDefinition.Sort.WILDCARD) do not have a well-defined erasure and cause anIllegalStateExceptionto be thrown.- Returns:
- The erasure of this type.
-
getSuperClass
Returns the super class of this type. A super type is only defined for non-generic types (TypeDefinition.Sort.NON_GENERIC), parameterized types (TypeDefinition.Sort.PARAMETERIZED) or generic array types (TypeDefinition.Sort.GENERIC_ARRAY) types. Interface types and theObjectclass do not define a super class wherenullis returned. Array types defineObjectas their direct super class.- Returns:
- The super class of this type or
nullif no super class exists for this type.
-
getInterfaces
Returns the interfaces that this type implements. A super type is only defined for non-generic types (TypeDefinition.Sort.NON_GENERIC), parameterized types (TypeDefinition.Sort.PARAMETERIZED) or generic array types (TypeDefinition.Sort.GENERIC_ARRAY) types.- Returns:
- The interfaces that this type implements.
-
getDeclaredFields
Returns the fields that this type declares. A super type is only defined for non-generic types (TypeDefinition.Sort.NON_GENERIC), parameterized types (TypeDefinition.Sort.PARAMETERIZED) or generic array types (TypeDefinition.Sort.GENERIC_ARRAY) types. Generic array types never define fields and the returned list is always empty for such types.- Returns:
- The fields that this type declares. A super type is only defined for non-generic types (
TypeDefinition.Sort.NON_GENERIC), parameterized types (TypeDefinition.Sort.PARAMETERIZED) or generic array types (TypeDefinition.Sort.GENERIC_ARRAY) types. Generic array types never define methods and the returned list is always empty for such types.
-
getDeclaredMethods
Returns the methods that this type declares.- Returns:
- The methods that this type declares.
-
getRecordComponents
Returns the list of record components that are declared by this type. If this type is not a record, the returned list is empty.- Returns:
- A list of record components that this type declares.
-
getComponentType
Returns the component type of this type.
Only non-generic types (
TypeDefinition.Sort.NON_GENERIC) and generic array typesTypeDefinition.Sort.GENERIC_ARRAY) define a component type. For other types, anIllegalStateExceptionis thrown.- Returns:
- The component type of this type or
nullif this type does not represent an array type.
-
getTypeVariableSource
Returns the source of this type variable. A type variable source is only well-defined for an attached type variable (TypeDefinition.Sort.VARIABLE. For other types, this method throws anIllegalStateException.- Returns:
- This type's type variable source.
-
getTypeArguments
Returns the type arguments of this type.
Parameters are only well-defined for parameterized types (
TypeDefinition.Sort.PARAMETERIZED). For all other types, this method throws anIllegalStateException.- Returns:
- A list of this type's type parameters.
-
findBindingOf
Returns the parameter binding of the supplied type variable.
This method must only be called for parameterized types (
TypeDefinition.Sort.PARAMETERIZED). For all other types, this method throws anIllegalStateException.- Parameters:
typeVariable- The type variable for which a value should be located.- Returns:
- The value that is bound to the supplied type variable or
nullif the type variable is not bound by this parameterized type.
-
getOwnerType
Returns the owner type of this type. A type's owner type describes a nested type's declaring type. If it exists, the returned type can be a non-generic or parameterized type. If a class has no declaring type,
nullis returned.An owner type is only well-defined for parameterized types (
TypeDefinition.Sort.PARAMETERIZED), for non-generic types (TypeDefinition.Sort.NON_GENERIC) and for generic arrays (TypeDefinition.Sort.GENERIC_ARRAY). For all other types, this method throws anIllegalStateException.- Returns:
- This type's owner type or
nullif no owner type exists.
-
getSymbol
Returns the symbol of this type variable. A symbol is only well-defined for type variables (TypeDefinition.Sort.VARIABLE,TypeDefinition.Sort.VARIABLE_SYMBOLIC). For other types, this method throws anIllegalStateException.- Returns:
- This type's type variable symbol.
-
getTypeName
Returns the name of the type. For generic types, this name is theirObject.toString()representations. For a non-generic type, it is the fully qualified binary name of the type.- Returns:
- The name of this type.
-
getActualName
Returns the display name of this element as it is found in the source code. If no such name exists, an empty string is returned.- Returns:
- The name of this element as given in a Java program's source code.
-
isPrimitive
public boolean isPrimitive()Checks if the type described by this entity is a primitive type.- Returns:
trueif this type description represents a primitive type.
-
isArray
public boolean isArray()Checks if the type described by this entity is an array.- Returns:
trueif this type description represents an array.
-
isRecord
public boolean isRecord()Checks if this type is a Java record.- Returns:
trueif this type is a Java record.
-
represents
Checks if the type described by this instance representstype.- Specified by:
representsin interfaceTypeDefinition- Overrides:
representsin classTypeDescription.Generic.AbstractBase- Parameters:
type- The type of interest.- Returns:
trueif the type described by this instance representstype.
-
iterator
-
accept
Applies a visitor to this generic type description.- Type Parameters:
T- The value that this visitor yields.- Parameters:
visitor- The visitor to apply.- Returns:
- The visitor's return value.
-
getStackSize
Returns the size of the type described by this instance. Wildcard types (TypeDefinition.Sort.WILDCARDdo not have a well-defined a stack size and cause anIllegalStateExceptionto be thrown.- Returns:
- The size of the type described by this instance.
-
hashCode
-
equals
-
toString
-