code: public static Type toArrayType(final Type type) {
          return type instanceof Class ? toArrayClass((Class<?>) type)
                  : new GenericArrayTypeImpl(type);
      }
docs: There are two possible cases:
  <ul>
  <li>Type is pure class - then arrays is simple class (e.g. {@code int[].class} or {@code List[].class}) </li>
  <li>Type is generified - then {@link GenericArrayType} must be used (e.g. for parameterized type
  {@code List<String>})</li>
  </ul>
  
  @param type type to get array of
  @return array type
  @see #toArrayClass(Class) for pure class case