code: public static void fillAllSuperTypes(@Nonnull Types types, @Nonnull TypeMirror type,
          @Nonnull List<TypeMirror> result) {
  
          try {
              List<? extends TypeMirror> superTypes = types.directSupertypes(type);
  
              for (TypeMirror t : superTypes) {
                  result.add(t);
                  fillAllSuperTypes(types, t, result);
              }
          } catch (RuntimeException e) {
              LOG.debug("Failed to find all super types of type '" + toHumanReadableString(type) + ". Possibly " +
                  "missing classes?", e);
          }
      }
docs: Similar to {@link #getAllSuperTypes(javax.lang.model.util.Types, javax.lang.model.type.TypeMirror)} but avoids
  instantiation of a new list.
  
  @param types  the Types instance of the compilation environment from which the type comes from
  @param type   the type
  @param result the list to add the results to.