Class Types.NativeTypeVariableEquals<X>

java.lang.Object
com.google.common.reflect.Types.NativeTypeVariableEquals<X>
Enclosing class:
Types

static final class Types.NativeTypeVariableEquals<X> extends Object
Per issue 1635, In JDK 1.7.0_51-b13, Types.TypeVariableImpl.equals(Object) is changed to no longer be equal to custom TypeVariable implementations. As a result, we need to make sure our TypeVariable implementation respects symmetry. Moreover, we don't want to reconstruct a native type variable <A> using our implementation unless some of its bounds have changed in resolution. This avoids creating unequal TypeVariable implementation unnecessarily. When the bounds do change, however, it's fine for the synthetic TypeVariable to be unequal to any native TypeVariable anyway.
  • Field Details

    • NATIVE_TYPE_VARIABLE_ONLY

      static final boolean NATIVE_TYPE_VARIABLE_ONLY
  • Constructor Details

    • NativeTypeVariableEquals

      NativeTypeVariableEquals()