Interface CaptureType

  • All Superinterfaces:
    java.lang.reflect.Type
    All Known Implementing Classes:
    CaptureTypeImpl

    public interface CaptureType
    extends java.lang.reflect.Type
    CaptureType represents a wildcard that has gone through capture conversion. It is a custom subinterface of Type, not part of the java builtin Type hierarchy.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.reflect.Type[] getLowerBounds()
      Returns an array of Type objects representing the lower bound(s) of this type variable.
      java.lang.reflect.TypeVariable<?> getTypeVariable()  
      java.lang.reflect.Type[] getUpperBounds()
      Returns an array of Type objects representing the upper bound(s) of this capture.
      java.lang.reflect.WildcardType getWildcardType()  
      void setUpperBounds​(java.lang.reflect.Type[] upperBounds)
      Overwrite the upper bounds of this capture.
      • Methods inherited from interface java.lang.reflect.Type

        getTypeName
    • Method Detail

      • getUpperBounds

        java.lang.reflect.Type[] getUpperBounds()
        Returns an array of Type objects representing the upper bound(s) of this capture. This includes both the upper bound of a ? extends wildcard, and the bounds declared with the type variable. References to other (or the same) type variables in bounds coming from the type variable are replaced by their matching capture.
        Returns:
        upper bound(s) of this capture
      • setUpperBounds

        void setUpperBounds​(java.lang.reflect.Type[] upperBounds)
        Overwrite the upper bounds of this capture. Should not normally be used. When transforming a capture type into its annotated version, it might be necessary to set the upper bounds in a separate step to break an otherwise infinite recursion.
        Parameters:
        upperBounds - upper bound(s) of this capture
      • getLowerBounds

        java.lang.reflect.Type[] getLowerBounds()
        Returns an array of Type objects representing the lower bound(s) of this type variable. This is the bound of a ? super wildcard. This normally contains only one or no types; it is an array for consistency with WildcardType.getLowerBounds().
        Returns:
        lower bound(s) of this capture
      • getTypeVariable

        java.lang.reflect.TypeVariable<?> getTypeVariable()
        Returns:
        type variable associated to this capture
      • getWildcardType

        java.lang.reflect.WildcardType getWildcardType()
        Returns:
        wildcard type associated to this capture