in base/src/main/java/org/apache/commons/chain2/base/DispatchCommand.java [67:85]
public Processing execute(C context) {
if (this.getMethod() == null && this.getMethodKey() == null) {
throw new IllegalStateException("Neither 'method' nor 'methodKey' properties are defined ");
}
try {
Method methodObject = extractMethod(context);
return evaluateResult(methodObject.invoke(this,
getArguments(context)));
} catch (NoSuchMethodException e) {
throw new DispatchException("Error extracting method from context", e, context, this);
} catch (IllegalAccessException e) {
throw new DispatchException("Error accessing method", e, context, this);
} catch (InvocationTargetException e) {
Throwable cause = e.getTargetException();
throw new DispatchException("Error in reflected dispatched command", cause, context, this);
}
}