code: public static int arrayDimensions(Class<?> arrType) {
          if ( null == arrType || !arrType.isArray() )
              return 0;
          return arrType.getName().lastIndexOf('[') + 1;
      }
docs: Find the number of array dimensions for class.
  By counting the number of [ prefixing the class name.
  @param arrType the class to inspect
  @return number of [ name prefixes