code: public static boolean isArray( Class clazz ) {
        return clazz != null
              && (clazz.isArray() || Collection.class.isAssignableFrom( clazz ) || (JSONArray.class.isAssignableFrom( clazz )));
     }
docs: Tests if a Class represents an array or Collection.