25 public Object
apply(Map<String, Object> arguments) {
26 LinkedHashMap<String, Object> argumentsCopy =
new LinkedHashMap<>(this.propertyDefinition);
27 for (Map.Entry<String,String> param :
this.propertyDefinition.entrySet()){
28 argumentsCopy.replace(param.getKey(),typeCast(arguments.get(param.getKey()),param.getValue()));
31 return function.invoke(functionHolder, argumentsCopy.values().toArray());
32 }
catch (Exception e) {
33 throw new RuntimeException(
"Failed to invoke tool: " +
function.getName(), e);