Class GsonTypes.WildcardTypeImpl

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.reflect.Type, java.lang.reflect.WildcardType
    Enclosing class:
    GsonTypes

    private static final class GsonTypes.WildcardTypeImpl
    extends java.lang.Object
    implements java.lang.reflect.WildcardType, java.io.Serializable
    The WildcardType interface supports multiple upper bounds and multiple lower bounds. We only support what the target Java version supports - at most one bound, see also https://bugs.openjdk.java.net/browse/JDK-8250660. If a lower bound is set, the upper bound must be Object.class.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.reflect.Type lowerBound  
      private static long serialVersionUID  
      private java.lang.reflect.Type upperBound  
    • Constructor Summary

      Constructors 
      Constructor Description
      WildcardTypeImpl​(java.lang.reflect.Type[] upperBounds, java.lang.reflect.Type[] lowerBounds)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)  
      java.lang.reflect.Type[] getLowerBounds()  
      java.lang.reflect.Type[] getUpperBounds()  
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.reflect.Type

        getTypeName
    • Field Detail

      • upperBound

        private final java.lang.reflect.Type upperBound
      • lowerBound

        private final java.lang.reflect.Type lowerBound
    • Constructor Detail

      • WildcardTypeImpl

        WildcardTypeImpl​(java.lang.reflect.Type[] upperBounds,
                         java.lang.reflect.Type[] lowerBounds)
    • Method Detail

      • getUpperBounds

        public java.lang.reflect.Type[] getUpperBounds()
        Specified by:
        getUpperBounds in interface java.lang.reflect.WildcardType
      • getLowerBounds

        public java.lang.reflect.Type[] getLowerBounds()
        Specified by:
        getLowerBounds in interface java.lang.reflect.WildcardType
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object