docs: public static Optional<DeclaredType> nonObjectSuperclass(final Types types, Elements elements,
        DeclaredType type) {
      checkNotNull(types);
      checkNotNull(elements);
      checkNotNull(type);
  
      final TypeMirror objectType =
          elements.getTypeElement(Object.class.getCanonicalName()).asType();
      // It's guaranteed there's only a single CLASS superclass because java doesn't have multiple
      // class inheritance.
      TypeMirror superclass =
          getOnlyElement(
              FluentIterable.from(types.directSupertypes(type))
                  .filter(
                      new Predicate<TypeMirror>() {
                        @Override
                        public boolean apply(TypeMirror input) {
                          return input.getKind().equals(TypeKind.DECLARED)
                              && (MoreElements.asType(MoreTypes.asDeclared(input).asElement()))
                                  .getKind()
                                  .equals(ElementKind.CLASS)
                              && !types.isSameType(objectType, input);
                        }
                      }),
              null);
      return superclass != null
          ? Optional.of(MoreTypes.asDeclared(superclass))
          : Optional.<DeclaredType>absent();
    }