Class TypePool.Default.LazyTypeDescription.GenericTypeToken.ForTypeVariable.Formal.LazyTypeVariable

    • Field Detail

      • typePool

        private final TypePool typePool
        The type pool to use for locating type descriptions.
      • typeVariableSource

        private final TypeVariableSource typeVariableSource
        The type variable source to use for locating type variables.
      • boundaryAnnotationTokens

        private final java.util.Map<java.lang.Integer,​java.util.Map<java.lang.String,​java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> boundaryAnnotationTokens
        A mapping of the type variable bounds' type annotation tokens by their indices.
      • symbol

        private final java.lang.String symbol
        The type variable's symbol.
    • Constructor Detail

      • LazyTypeVariable

        protected LazyTypeVariable​(TypePool typePool,
                                   TypeVariableSource typeVariableSource,
                                   java.util.Map<java.lang.String,​java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> annotationTokens,
                                   java.util.Map<java.lang.Integer,​java.util.Map<java.lang.String,​java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> boundaryAnnotationTokens,
                                   java.lang.String symbol,
                                   java.util.List<TypePool.Default.LazyTypeDescription.GenericTypeToken> boundTypeTokens)
        Creates a lazy type description of a type variables.
        Parameters:
        typePool - The type pool to use for locating type descriptions.
        typeVariableSource - The type variable source to use for locating type variables.
        annotationTokens - The type variable's type annotation tokens.
        boundaryAnnotationTokens - A mapping of the type variable bounds' type annotation tokens by their indices.
        symbol - The type variable's symbol.
        boundTypeTokens - Tokenized representations of the type variables bound types.
    • Method Detail

      • getUpperBounds

        public TypeList.Generic getUpperBounds()

        Returns the upper bounds of this type. Any type with a well-defined upper bound is bound by at least one type. If no such type is defined, the bound is implicitly Object.

        Only non-symbolic type variables (TypeDefinition.Sort.VARIABLE, and wildcard types (TypeDefinition.Sort.WILDCARD) have well-defined upper bounds. For other types, an IllegalStateException is thrown.

        Returns:
        The upper bounds of this type.
      • getTypeVariableSource

        public TypeVariableSource 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 an IllegalStateException.
        Returns:
        This type's type variable source.
      • getDeclaredAnnotations

        public AnnotationList getDeclaredAnnotations()
        Returns a list of annotations that are declared by this instance.
        Returns:
        A list of declared annotations.