Source:
void setArguments(Object[] args) { if (args == null) { return; } int count = args.length; if (!isSynchronous) { count -= 1; } for (int i = 0; i < count; i++) { String name = paramNames[i]; Object value = args[i]; RestMethodInfo.ParamUsage paramUsage = paramUsages[i]; switch (paramUsage) { case PATH: if (value == null) { throw new IllegalArgumentException( "Path parameter \"" + name + "\" value must not be null."); } addPathParam(name, value.toString()); break; case QUERY: if (value != null) { if (value instanceof Iterable) { Iterable<?> casted = (Iterable<?>) value; for (Object currObj : casted) if (currObj != null) addQueryParam(name, currObj.toString()); } else addQueryParam(name, value.toString()); } break; case HEADER: if (value != null) { addHeader(name, value.toString()); } break; case FIELD: if (value != null) { formBody.addField(name, value.toString()); } break; case PART: if (value != null) { if (value instanceof TypedOutput) { multipartBody.addPart(name, (TypedOutput) value); } else if (value instanceof String) { multipartBody.addPart(name, new TypedString((String) value)); } else { multipartBody.addPart(name, converter.toBody(value)); } } break; case BODY: if (value == null) { throw new IllegalArgumentException("Body parameter value must not be null."); } if (value instanceof TypedOutput) { body = (TypedOutput) value; } else { body = converter.toBody(value); } break; default: throw new IllegalArgumentException("Unknown parameter usage: " + paramUsage); } } }

Target:
void setArguments(Object[] args) { if (args == null) { return; } int count = args.length; if (!isSynchronous) { count -= 1; } for (int i = 0; i < count; i++) { String name = paramNames[i]; Object value = args[i]; RestMethodInfo.ParamUsage paramUsage = paramUsages[i]; switch (paramUsage) { case PATH: if (value == null) { throw new IllegalArgumentException( "Path parameter \"" + name + "\" value must not be null."); } addPathParam(name, value.toString()); break; case ENCODED_PATH: if (value == null) { throw new IllegalArgumentException( "Path parameter \"" + name + "\" value must not be null."); } addEncodedPathParam(name, value.toString()); break; case QUERY: if (value != null) { if (value instanceof Iterable) { Iterable<?> casted = (Iterable<?>) value; for (Object currObj : casted) { if (currObj != null) { addQueryParam(name, currObj.toString()); } } } else { addQueryParam(name, value.toString()); } } break; case ENCODED_QUERY: if (value != null) { addEncodedQueryParam(name, value.toString()); } break; case HEADER: if (value != null) { addHeader(name, value.toString()); } break; case FIELD: if (value != null) { formBody.addField(name, value.toString()); } break; case PART: if (value != null) { if (value instanceof TypedOutput) { multipartBody.addPart(name, (TypedOutput) value); } else if (value instanceof String) { multipartBody.addPart(name, new TypedString((String) value)); } else { multipartBody.addPart(name, converter.toBody(value)); } } break; case BODY: if (value == null) { throw new IllegalArgumentException("Body parameter value must not be null."); } if (value instanceof TypedOutput) { body = (TypedOutput) value; } else { body = converter.toBody(value); } break; default: throw new IllegalArgumentException("Unknown parameter usage: " + paramUsage); } } }