private static boolean uncheckedTypeArgument(TypeMirror arg) {
    if (arg.getKind() == TypeKind.WILDCARD) {
      WildcardType wildcard = (WildcardType) arg;
      if (wildcard.getExtendsBound() == null || isJavaLangObject(wildcard.getExtendsBound())) {
        // This is <?>, unless there's a super bound, in which case it is <? super Foo> and
        // is erased.
        return (wildcard.getSuperBound() != null);
      }
    }
    return true;
  }
Returns true if casting to the given type will elicit an unchecked warning from the compiler.
Only generic types such as {@code List<String>} produce such warnings. There will be no warning
if the type's only generic parameters are simple wildcards, as in {@code Map<?, ?>}.
value/src/main/java/com/google/auto/value/processor/TypeSimplifier.java