}
private Multimap<String, Object> addFormParams(Multimap<String, ?> tokenValues, Invocation invocation) {
Multimap<String, Object> formMap = LinkedListMultimap.create();
if (invocation.getInvokable().getOwnerType().getRawType().isAnnotationPresent(FormParams.class)) {
FormParams form = invocation.getInvokable().getOwnerType().getRawType().getAnnotation(FormParams.class);
addForm(formMap, form, tokenValues);
}
if (invocation.getInvokable().isAnnotationPresent(FormParams.class)) {
FormParams form = invocation.getInvokable().getAnnotation(FormParams.class);
addForm(formMap, form, tokenValues);
}
for (Entry<String, Object> form : getFormParamKeyValues(invocation).entries()) {
formMap.put(form.getKey(), replaceTokens(form.getValue().toString(), tokenValues));
}
return formMap;
}