private @Nullable TypeElement superclass(TypeElement type) {
      TypeMirror sup = type.getSuperclass();
      if (sup.getKind() == TypeKind.DECLARED) {
        // asElement returns non-null for DECLARED types.
        return MoreElements.asType(requireNonNull(typeUtils.asElement(sup)));
      } else {
        return null;
      }
    }
Returns the method from within the given type that has the same erased signature as the given
method, or null if there is no such method.
common/src/main/java/com/google/auto/common/Overrides.java