Class TypePool.Default.LazyTypeDescription.GenericTypeToken.ForUpperBoundWildcard.LazyUpperBoundWildcard

    • Constructor Detail

      • LazyUpperBoundWildcard

        protected LazyUpperBoundWildcard​(TypePool typePool,
                                         TypeVariableSource typeVariableSource,
                                         java.lang.String typePath,
                                         java.util.Map<java.lang.String,​java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> annotationTokens,
                                         TypePool.Default.LazyTypeDescription.GenericTypeToken boundTypeToken)
        Creates a new lazy upper bound wildcard.
        Parameters:
        typePool - The type pool to use.
        typeVariableSource - The type variable source for locating type variables.
        typePath - This type's type path.
        annotationTokens - This type's type annotations.
        boundTypeToken - A tokenized representation of this wildcard's bound.
    • 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.
      • getLowerBounds

        public TypeList.Generic getLowerBounds()

        Returns the lower bounds of this type.

        Only wildcard types (TypeDefinition.Sort.WILDCARD) define a lower bound. For other types, an IllegalStateException is thrown.

        Returns:
        The lower bounds of this type.
      • getDeclaredAnnotations

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