Class TypeDescription.Generic.OfWildcardType.ForLoadedType

    • Field Detail

      • wildcardType

        private final java.lang.reflect.WildcardType wildcardType
        The represented loaded wildcard type.
    • Constructor Detail

      • ForLoadedType

        public ForLoadedType​(java.lang.reflect.WildcardType wildcardType)
        Creates a description of a loaded wildcard.
        Parameters:
        wildcardType - The represented loaded wildcard type.
      • ForLoadedType

        protected ForLoadedType​(java.lang.reflect.WildcardType wildcardType,
                                TypeDescription.Generic.AnnotationReader annotationReader)
        Creates a description of a loaded wildcard.
        Parameters:
        wildcardType - The represented loaded wildcard type.
        annotationReader - The annotation reader to query for the wildcard type's annotations.
    • 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.
      • represents

        public boolean represents​(java.lang.reflect.Type type)
        Checks if the type described by this instance represents type.
        Specified by:
        represents in interface TypeDefinition
        Overrides:
        represents in class TypeDescription.Generic.OfWildcardType
        Parameters:
        type - The type of interest.
        Returns:
        true if the type described by this instance represents type.