Package net.bytebuddy.pool
Class TypePool.Default.LazyTypeDescription.GenericTypeToken.ForParameterizedType.Nested
java.lang.Object
net.bytebuddy.pool.TypePool.Default.LazyTypeDescription.GenericTypeToken.ForParameterizedType.Nested
- All Implemented Interfaces:
TypePool.Default.LazyTypeDescription.GenericTypeToken
@Enhance
public static class TypePool.Default.LazyTypeDescription.GenericTypeToken.ForParameterizedType.Nested
extends Object
implements TypePool.Default.LazyTypeDescription.GenericTypeToken
A generic type token to describe a parameterized type description with a generic owner type.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classA lazy description of a parameterized type with an owner type.Nested classes/interfaces inherited from interface net.bytebuddy.pool.TypePool.Default.LazyTypeDescription.GenericTypeToken
TypePool.Default.LazyTypeDescription.GenericTypeToken.ForGenericArray, TypePool.Default.LazyTypeDescription.GenericTypeToken.ForLowerBoundWildcard, TypePool.Default.LazyTypeDescription.GenericTypeToken.ForParameterizedType, TypePool.Default.LazyTypeDescription.GenericTypeToken.ForPrimitiveType, TypePool.Default.LazyTypeDescription.GenericTypeToken.ForRawType, TypePool.Default.LazyTypeDescription.GenericTypeToken.ForTypeVariable, TypePool.Default.LazyTypeDescription.GenericTypeToken.ForUnboundWildcard, TypePool.Default.LazyTypeDescription.GenericTypeToken.ForUpperBoundWildcard, TypePool.Default.LazyTypeDescription.GenericTypeToken.LazyTokenList, TypePool.Default.LazyTypeDescription.GenericTypeToken.OfFormalTypeVariable, TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe name of the parameterized type's erasure.private final TypePool.Default.LazyTypeDescription.GenericTypeTokenA token that describes the described parameterized type's owner type.private final List<TypePool.Default.LazyTypeDescription.GenericTypeToken> A list of tokens that represent the parameters of the represented type.Fields inherited from interface net.bytebuddy.pool.TypePool.Default.LazyTypeDescription.GenericTypeToken
COMPONENT_TYPE_PATH, EMPTY_TYPE_PATH, INDEXED_TYPE_DELIMITER, INNER_CLASS_PATH, WILDCARD_TYPE_PATH -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNested(String name, List<TypePool.Default.LazyTypeDescription.GenericTypeToken> parameterTypeTokens, TypePool.Default.LazyTypeDescription.GenericTypeToken ownerTypeToken) Creates a type token that represents a parameterized type. -
Method Summary
Modifier and TypeMethodDescriptionReturns the type path prefix that needs to be appended to the existing type path before any further navigation on the parameterized type.booleanisPrimaryBound(TypePool typePool) Determines if a generic type tokens represents a primary bound of a type variable.toGenericType(TypePool typePool, TypeVariableSource typeVariableSource, String typePath, Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>> annotationTokens) Transforms this token into a generic type representation.
-
Field Details
-
name
The name of the parameterized type's erasure. -
parameterTypeTokens
A list of tokens that represent the parameters of the represented type. -
ownerTypeToken
A token that describes the described parameterized type's owner type.
-
-
Constructor Details
-
Nested
protected Nested(String name, List<TypePool.Default.LazyTypeDescription.GenericTypeToken> parameterTypeTokens, TypePool.Default.LazyTypeDescription.GenericTypeToken ownerTypeToken) Creates a type token that represents a parameterized type.- Parameters:
name- The name of the parameterized type's erasure.parameterTypeTokens- A list of tokens that represent the parameters of the represented type.ownerTypeToken- A token that describes the described parameterized type's owner type.
-
-
Method Details
-
toGenericType
public TypeDescription.Generic toGenericType(TypePool typePool, TypeVariableSource typeVariableSource, String typePath, Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>> annotationTokens) Transforms this token into a generic type representation.- Specified by:
toGenericTypein interfaceTypePool.Default.LazyTypeDescription.GenericTypeToken- Parameters:
typePool- The type pool to be used for locating non-generic type descriptions.typeVariableSource- The type variable source.typePath- The type path of the resolved generic type.annotationTokens- A mapping of the type's annotation tokens by their type path.- Returns:
- A description of the represented generic type.
-
getTypePathPrefix
Returns the type path prefix that needs to be appended to the existing type path before any further navigation on the parameterized type. This method must only be called on type tokens that represent parameterized type- Specified by:
getTypePathPrefixin interfaceTypePool.Default.LazyTypeDescription.GenericTypeToken- Returns:
- A type path segment that needs to be appended to the base type path before any further navigation on the parameterized type.
-
isPrimaryBound
Determines if a generic type tokens represents a primary bound of a type variable. This method must only be invoked on types that represent aTypeDefinition.Sort.NON_GENERIC,TypeDefinition.Sort.PARAMETERIZEDorTypeDefinition.Sort.VARIABLE.- Specified by:
isPrimaryBoundin interfaceTypePool.Default.LazyTypeDescription.GenericTypeToken- Parameters:
typePool- The type pool to use.- Returns:
trueif this token represents a primary bound.
-