private static void executeHooks(final Method[] methods, final Object object, final Object... parameters) {
for (final Method method : methods) {
try {
ReflectionUtils.invokeWithOptionalParameter(method, object, parameters);
} catch (IllegalAccessException | IllegalArgumentException e) {
throw new LifeCycleHookException("The '" + method.toString() + "' hook method can not be invoked on instance: " + object, e);
} catch (final InvocationTargetException e) {
throw new LifeCycleHookException("Exception occured during execution of " + method.toString(), e.getCause());
}
}
}