}
private Multimap<String, Object> addQueryParams(Multimap<String, ?> tokenValues, Invocation invocation) {
Multimap<String, Object> queryMap = LinkedListMultimap.create();
if (invocation.getInvokable().getOwnerType().getRawType().isAnnotationPresent(QueryParams.class)) {
QueryParams query = invocation.getInvokable().getOwnerType().getRawType().getAnnotation(QueryParams.class);
addQuery(queryMap, query, tokenValues);
}
if (invocation.getInvokable().isAnnotationPresent(QueryParams.class)) {
QueryParams query = invocation.getInvokable().getAnnotation(QueryParams.class);
addQuery(queryMap, query, tokenValues);
}
for (Entry<String, Object> query : getQueryParamKeyValues(invocation).entries()) {
queryMap.put(query.getKey(), replaceTokens(query.getValue().toString(), tokenValues));
}
return queryMap;
}