code: public static boolean isIterableOrMap(final Class<?> elementClass) {
      // TODO(nchalko) handle iterables everywhere this is called.
      return elementClass.isArray() || Iterable.class.isAssignableFrom(elementClass)
          || Map.class.isAssignableFrom(elementClass);
    }
docs: check if elementClass is iterable.
  
  @param elementClass class to check
  @return true if iterable, otherwise false