docs: public static int dimension(Class clazz) {
          checkArrayType(clazz);
  
          int result = 0;
          while (clazz.isArray()) {
              result++;
              clazz = clazz.getComponentType();
          }
  
          return result;
      }