class QueryVarParamWriter extends AbstractUrlParamWriter {

  @Override
  public void write(URLPathStringBuilder builder, Map<String, Object> args) throws Exception {
    Object value = getParamValue(args);
    if (value == null) {
      // do not write query key to express "null"
      return;
    }

    if (value.getClass().isArray()) {
      writeArray(builder, value);
      return;
    }

    if (Collection.class.isInstance(value)) {
      writeCollection(builder, value);
      return;
    }

    builder.appendQuery(param.getParamName(), encodeNotNullValue(value));
  }

  public  QueryVarParamWriter(RestParam param);

}