1. //под кат
  2. protected static final class PageInterceptor extends Interceptor {
  3. public PageInterceptor()
  4. {
  5. super();
  6. }
  7. @Override
  8. public synchronized Object intercept(Object page, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
  9. if (method.isAnnotationPresent(Page.PageMethod.class))
  10. { //if there are actions with a page
  11. ((Page) page).switchToMe();
  12. }
  13. try
  14. {
  15. return methodProxy.invokeSuper(page, args);
  16. }
  17. catch (Exception e)
  18. {
  19. /*
  20. */
  21. return handleException((Page) page, method, methodProxy, args, e);
  22. /*
  23. */
  24. }
  25. }
  26. }
Comments powered by Disqus