}
Class<?> clazz = invocationTarget.getClass();
Method method = ReflectUtil.findMethod(clazz, methodName, argDescriptors, args);
if (method==null) {
throw new WireException("method "+ReflectUtil.getSignature(methodName, argDescriptors, args)+" unavailable");
}
Object returnValue = ReflectUtil.invoke(method, invocationTarget, args);
if (variableName!=null) {
execution.setVariable(variableName, returnValue);
}
} catch (WireException e) {
throw e;
} catch (Exception e) {
throw new WireException("couldn't invoke method "+methodName+": "+e.getMessage(), e);
}
}