Package net.bytebuddy.pool
Class TypePool.Default.LazyTypeDescription.GenericTypeToken.ForUpperBoundWildcard
- java.lang.Object
-
- net.bytebuddy.pool.TypePool.Default.LazyTypeDescription.GenericTypeToken.ForUpperBoundWildcard
-
- All Implemented Interfaces:
TypePool.Default.LazyTypeDescription.GenericTypeToken
- Enclosing interface:
- TypePool.Default.LazyTypeDescription.GenericTypeToken
@Enhance public static class TypePool.Default.LazyTypeDescription.GenericTypeToken.ForUpperBoundWildcard extends java.lang.Object implements TypePool.Default.LazyTypeDescription.GenericTypeToken
A generic type token for a wildcard that is bound above.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
TypePool.Default.LazyTypeDescription.GenericTypeToken.ForUpperBoundWildcard.LazyUpperBoundWildcard
A generic type representation of a tokenized wildcard with an upper bound.-
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
Fields Modifier and Type Field Description private TypePool.Default.LazyTypeDescription.GenericTypeToken
boundTypeToken
A token that represents the wildcard's upper bound.-
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
Constructors Modifier Constructor Description protected
ForUpperBoundWildcard(TypePool.Default.LazyTypeDescription.GenericTypeToken boundTypeToken)
Creates a generic type token for a wildcard that is bound above.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getTypePathPrefix()
Returns the type path prefix that needs to be appended to the existing type path before any further navigation on the parameterized type.boolean
isPrimaryBound(TypePool typePool)
Determines if a generic type tokens represents a primary bound of a type variable.TypeDescription.Generic
toGenericType(TypePool typePool, TypeVariableSource typeVariableSource, java.lang.String typePath, java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> annotationTokens)
Transforms this token into a generic type representation.
-
-
-
Field Detail
-
boundTypeToken
private final TypePool.Default.LazyTypeDescription.GenericTypeToken boundTypeToken
A token that represents the wildcard's upper bound.
-
-
Constructor Detail
-
ForUpperBoundWildcard
protected ForUpperBoundWildcard(TypePool.Default.LazyTypeDescription.GenericTypeToken boundTypeToken)
Creates a generic type token for a wildcard that is bound above.- Parameters:
boundTypeToken
- A token that represents the wildcard's upper bound.
-
-
Method Detail
-
toGenericType
public TypeDescription.Generic toGenericType(TypePool typePool, TypeVariableSource typeVariableSource, java.lang.String typePath, java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> annotationTokens)
Transforms this token into a generic type representation.- Specified by:
toGenericType
in 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.
-
isPrimaryBound
public boolean isPrimaryBound(TypePool typePool)
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.PARAMETERIZED
orTypeDefinition.Sort.VARIABLE
.- Specified by:
isPrimaryBound
in interfaceTypePool.Default.LazyTypeDescription.GenericTypeToken
- Parameters:
typePool
- The type pool to use.- Returns:
true
if this token represents a primary bound.
-
getTypePathPrefix
public java.lang.String 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:
getTypePathPrefix
in 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.
-
-