code: public static List<Class<?>> getAllSuperclasses(final Class<?> cls) {
          if (cls == null) {
              return null;
          }
          final List<Class<?>> classes = new ArrayList<>();
          Class<?> superclass = cls.getSuperclass();
          while (superclass != null) {
              classes.add(superclass);
              superclass = superclass.getSuperclass();
          }
          return classes;
      }
docs: <p>Gets a {@code List} of superclasses for the given class.</p>
  
  @param cls  the class to look up, may be {@code null}
  @return the {@code List} of superclasses in order going up from this one
  {@code null} if null input