code: @Nonnull
      public static List<TypeMirror> getAllSuperClasses(@Nonnull Types types, @Nonnull TypeMirror type) {
          List<TypeMirror> ret = new ArrayList<>();
  
          try {
              List<? extends TypeMirror> superTypes = types.directSupertypes(type);
              while (superTypes != null && !superTypes.isEmpty()) {
                  TypeMirror superClass = superTypes.get(0);
                  ret.add(superClass);
                  superTypes = types.directSupertypes(superClass);
              }
          } catch (RuntimeException e) {
              LOG.debug("Failed to find all super classes of type '" + toHumanReadableString(type) + ". Possibly " +
                  "missing classes?", e);
          }
  
          return ret;
      }
docs: Returns all the super classes of given type. I.e. the returned list does NOT contain any interfaces
  the class or tis superclasses implement.
  
  @param types the Types instance of the compilation environment from which the type comes from
  @param type  the type
  
  @return the list of super classes