@Override
public Object executeWithArgs(ExecutionType executionType, Object[] args) throws CommandActionExecutionException {
if (ExecutionType.SYNCHRONOUS.equals(executionType)) {
return execute(object, method, args);
} else {
Closure closure = ClosureFactoryRegistry.getFactory(executionType).createClosure(method, object, args);
return execute(closure.getClosureObj(), closure.getClosureMethod());
}
}