}
try {
method.invoke(instance, args);
} catch (IllegalAccessException e) {
throw new ActionLifecycleException("Error invoking @" + annotation.getSimpleName() + " method '" + method.getName() + "' on class '" + instance.getClass().getName() + "'.", e);
} catch (InvocationTargetException e) {
Throwable targetException = e.getTargetException();
if(targetException instanceof ActionLifecycleException) {
throw (ActionLifecycleException) targetException;
}
throw new ActionLifecycleException("Error invoking @" + annotation.getSimpleName() + " method '" + method.getName() + "' on class '" + instance.getClass().getName() + "'.", targetException);
}
}
}
}