Class TypePool.Default.LazyTypeDescription.TokenizedGenericType
java.lang.Object
net.bytebuddy.description.ModifierReviewable.AbstractBase
net.bytebuddy.description.type.TypeDescription.Generic.AbstractBase
net.bytebuddy.description.type.TypeDescription.Generic.LazyProjection
net.bytebuddy.description.type.TypeDescription.Generic.LazyProjection.WithEagerNavigation
net.bytebuddy.pool.TypePool.Default.LazyTypeDescription.TokenizedGenericType
- 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
- Enclosing class:
TypePool.Default.LazyTypeDescription
protected static class TypePool.Default.LazyTypeDescription.TokenizedGenericType
extends TypeDescription.Generic.LazyProjection.WithEagerNavigation
A representation of a generic type that is described by a
TypePool.Default.LazyTypeDescription.GenericTypeToken.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classA lazy description of a non-well-defined described generic type.protected static classA tokenized list of generic types.protected static classA list of tokenized type variables.Nested classes/interfaces inherited from class TypeDescription.Generic.LazyProjection.WithEagerNavigation
TypeDescription.Generic.LazyProjection.WithEagerNavigation.OfAnnotatedElementNested classes/interfaces inherited from class TypeDescription.Generic.LazyProjection
TypeDescription.Generic.LazyProjection.ForLoadedFieldType, TypeDescription.Generic.LazyProjection.ForLoadedReturnType, TypeDescription.Generic.LazyProjection.ForLoadedSuperClass, TypeDescription.Generic.LazyProjection.OfConstructorParameter, TypeDescription.Generic.LazyProjection.OfMethodParameter, TypeDescription.Generic.LazyProjection.OfRecordComponent, TypeDescription.Generic.LazyProjection.WithEagerNavigation, TypeDescription.Generic.LazyProjection.WithLazyNavigation, TypeDescription.Generic.LazyProjection.WithResolvedErasureNested 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 TypeFieldDescriptionprivate final Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>> The tokenized type's type annotation tokens.private final TypePool.Default.LazyTypeDescription.GenericTypeTokenThe token that describes the represented generic type.private final StringA descriptor of the generic type's raw type.private final TypePoolThe type pool to use for locating referenced types.private final TypeVariableSourceThe closest type variable source of this generic type's declaration context.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
ConstructorsModifierConstructorDescriptionprotectedTokenizedGenericType(TypePool typePool, TypePool.Default.LazyTypeDescription.GenericTypeToken genericTypeToken, String rawTypeDescriptor, Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>> annotationTokens, TypeVariableSource typeVariableSource) Creates a new tokenized generic type. -
Method Summary
Modifier and TypeMethodDescriptionReturns the erasure of this type.Returns a list of annotations that are declared by this instance.protected static TypeDescription.Genericof(TypePool typePool, TypePool.Default.LazyTypeDescription.GenericTypeToken genericTypeToken, String rawTypeDescriptor, Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>> annotationTokens, TypeVariableSource typeVariableSource) Creates a new generic type description for a tokenized generic type.protected TypeDescription.Genericresolve()Resolves the actual generic type.protected static TypeDescriptionCreates a type description from a descriptor by looking up the corresponding type.Methods inherited from class TypeDescription.Generic.LazyProjection.WithEagerNavigation
getInterfaces, getSuperClass, iteratorMethods inherited from class TypeDescription.Generic.LazyProjection
accept, equals, findBindingOf, getActualName, getComponentType, getDeclaredFields, getDeclaredMethods, getLowerBounds, getOwnerType, getRecordComponents, getSort, getStackSize, getSymbol, getTypeArguments, getTypeName, getTypeVariableSource, getUpperBounds, hashCode, isArray, isPrimitive, isRecord, represents, toStringMethods 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 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, isEnum
-
Field Details
-
typePool
The type pool to use for locating referenced types. -
genericTypeToken
The token that describes the represented generic type. -
rawTypeDescriptor
A descriptor of the generic type's raw type. -
annotationTokens
private final Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>> annotationTokensThe tokenized type's type annotation tokens. -
typeVariableSource
The closest type variable source of this generic type's declaration context.
-
-
Constructor Details
-
TokenizedGenericType
protected TokenizedGenericType(TypePool typePool, TypePool.Default.LazyTypeDescription.GenericTypeToken genericTypeToken, String rawTypeDescriptor, Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>> annotationTokens, TypeVariableSource typeVariableSource) Creates a new tokenized generic type.- Parameters:
typePool- The type pool to use for locating referenced types.genericTypeToken- The token that describes the represented generic type.rawTypeDescriptor- A descriptor of the generic type's erasure.annotationTokens- The tokenized type's type annotation tokens.typeVariableSource- The closest type variable source of this generic type's declaration context.
-
-
Method Details
-
of
protected static TypeDescription.Generic of(TypePool typePool, TypePool.Default.LazyTypeDescription.GenericTypeToken genericTypeToken, String rawTypeDescriptor, @MaybeNull Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>> annotationTokens, TypeVariableSource typeVariableSource) Creates a new generic type description for a tokenized generic type.- Parameters:
typePool- The type pool to use for locating referenced types.genericTypeToken- The token that describes the represented generic type.rawTypeDescriptor- A descriptor of the generic type's erasure.annotationTokens- The tokenized type's type annotation tokens ornullif no such annotations are defined.typeVariableSource- The closest type variable source of this generic type's declaration context.- Returns:
- A suitable generic type.
-
toErasure
Creates a type description from a descriptor by looking up the corresponding type.- Parameters:
typePool- The type pool to use for locating a type.descriptor- The descriptor to interpret.- Returns:
- A description of the type represented by the descriptor.
-
resolve
Description copied from class:TypeDescription.Generic.LazyProjectionResolves the actual generic type.- Specified by:
resolvein classTypeDescription.Generic.LazyProjection- Returns:
- An actual description of the represented 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.
-
getDeclaredAnnotations
Returns a list of annotations that are declared by this instance.- Returns:
- A list of declared annotations.
-