private static boolean isJavaLangObject(TypeMirror type) {
    if (type.getKind() != TypeKind.DECLARED) {
      return false;
    }
    DeclaredType declaredType = (DeclaredType) type;
    TypeElement typeElement = (TypeElement) declaredType.asElement();
    return typeElement.getQualifiedName().contentEquals("java.lang.Object");
  }
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