code: public Class<?> getRootComponentType(Object array) {
          if (!isArray(array)) { return null; }
  
          // search for root type
          Class<?> type = array.getClass();
          while (type.isArray()) {
              type = type.getComponentType();
          }
  
          return type;
      }
docs: Get the root component type of the given array. The root component type
  is the actual underlying type of the array. This is especially useful
  in multi-dimensional arrays since {@link #getComponentType(Object)} would
  return <code>Type[]</code> rather than <code>Type</code>.
  
  @param array The array to get the root component type from
  
  @return The root component type or <code>null</code>
  
  @see #getComponentType(Object)