Package net.bytebuddy.pool
Interface TypePool.Default.LazyTypeDescription.GenericTypeToken
-
- All Known Implementing Classes:
TypePool.Default.LazyTypeDescription.GenericTypeToken.ForGenericArray,TypePool.Default.LazyTypeDescription.GenericTypeToken.ForLowerBoundWildcard,TypePool.Default.LazyTypeDescription.GenericTypeToken.ForParameterizedType,TypePool.Default.LazyTypeDescription.GenericTypeToken.ForParameterizedType.Nested,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
- Enclosing class:
- TypePool.Default.LazyTypeDescription
protected static interface TypePool.Default.LazyTypeDescription.GenericTypeTokenA token that represents a generic Java type.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTypePool.Default.LazyTypeDescription.GenericTypeToken.ForGenericArrayA generic type token that represents a generic array.static classTypePool.Default.LazyTypeDescription.GenericTypeToken.ForLowerBoundWildcardA generic type token for a wildcard that is bound below.static classTypePool.Default.LazyTypeDescription.GenericTypeToken.ForParameterizedTypeA generic type token that represents a parameterized type.static classTypePool.Default.LazyTypeDescription.GenericTypeToken.ForPrimitiveTypeA generic type token that represents a primitive type.static classTypePool.Default.LazyTypeDescription.GenericTypeToken.ForRawTypeA generic type token that represents a non-generic type.static classTypePool.Default.LazyTypeDescription.GenericTypeToken.ForTypeVariableA generic type token that represents a type variable.static classTypePool.Default.LazyTypeDescription.GenericTypeToken.ForUnboundWildcardA generic type token that represents an unbound wildcard.static classTypePool.Default.LazyTypeDescription.GenericTypeToken.ForUpperBoundWildcardA generic type token for a wildcard that is bound above.static classTypePool.Default.LazyTypeDescription.GenericTypeToken.LazyTokenListA lazy list of type tokens.static interfaceTypePool.Default.LazyTypeDescription.GenericTypeToken.OfFormalTypeVariableRepresents a generic type token for a formal type variable.static interfaceTypePool.Default.LazyTypeDescription.GenericTypeToken.ResolutionA resolution of a type's, method's or field's generic types.
-
Field Summary
Fields Modifier and Type Field Description static charCOMPONENT_TYPE_PATHRepresents a step to a component type within a type path.static java.lang.StringEMPTY_TYPE_PATHRepresents an empty type path.static charINDEXED_TYPE_DELIMITERRepresents an index type delimiter within a type path.static charINNER_CLASS_PATHRepresents a (reversed) step to an inner class within a type path.static charWILDCARD_TYPE_PATHRepresents a wildcard type step within a type path.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetTypePathPrefix()Returns 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.TypeDescription.GenerictoGenericType(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
-
EMPTY_TYPE_PATH
static final java.lang.String EMPTY_TYPE_PATH
Represents an empty type path.- See Also:
- Constant Field Values
-
COMPONENT_TYPE_PATH
static final char COMPONENT_TYPE_PATH
Represents a step to a component type within a type path.- See Also:
- Constant Field Values
-
WILDCARD_TYPE_PATH
static final char WILDCARD_TYPE_PATH
Represents a wildcard type step within a type path.- See Also:
- Constant Field Values
-
INNER_CLASS_PATH
static final char INNER_CLASS_PATH
Represents a (reversed) step to an inner class within a type path.- See Also:
- Constant Field Values
-
INDEXED_TYPE_DELIMITER
static final char INDEXED_TYPE_DELIMITER
Represents an index type delimiter within a type path.- See Also:
- Constant Field Values
-
-
Method Detail
-
toGenericType
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.- 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
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.PARAMETERIZEDorTypeDefinition.Sort.VARIABLE.- Parameters:
typePool- The type pool to use.- Returns:
trueif this token represents a primary bound.
-
getTypePathPrefix
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- Returns:
- A type path segment that needs to be appended to the base type path before any further navigation on the parameterized type.
-
-