net.sourceforge.stripes.controller
Class BeforeAfterMethodInterceptor.FilterMethods

java.lang.Object
  extended by net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.FilterMethods
Enclosing class:
BeforeAfterMethodInterceptor

protected static class BeforeAfterMethodInterceptor.FilterMethods
extends Object

Helper class used to collect Before and After methods for a class and provide easy and rapid access to them by LifecycleStage.

Author:
Jeppe Cramon

Constructor Summary
protected BeforeAfterMethodInterceptor.FilterMethods()
           
 
Method Summary
 void addAfterMethod(LifecycleStage[] stages, Method method)
          Adds a method to be executed after the supplied LifecycleStages.
 void addBeforeMethod(LifecycleStage[] stages, Method method)
          Adds a method to be executed before the supplied LifecycleStages.
 List<Method> getAfterMethods(LifecycleStage stage)
          Gets the Before methods for the given LifecycleStage.
 List<Method> getBeforeMethods(LifecycleStage stage)
          Gets the Before methods for the given LifecycleStage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeforeAfterMethodInterceptor.FilterMethods

protected BeforeAfterMethodInterceptor.FilterMethods()
Method Detail

addBeforeMethod

public void addBeforeMethod(LifecycleStage[] stages,
                            Method method)
Adds a method to be executed before the supplied LifecycleStages.

Parameters:
stages - All the LifecycleStages that the given filter method should be invoked before
method - The filter method to be invoked before the given LifecycleStage(s)

addAfterMethod

public void addAfterMethod(LifecycleStage[] stages,
                           Method method)
Adds a method to be executed after the supplied LifecycleStages.

Parameters:
stages - All the LifecycleStages that the given filter method should be invoked after
method - The filter method to be invoked after the given LifecycleStage(s)

getBeforeMethods

public List<Method> getBeforeMethods(LifecycleStage stage)
Gets the Before methods for the given LifecycleStage.

Parameters:
stage - The LifecycleStage to find Before methods for.
Returns:
A List of before methods, possibly zero length but never null

getAfterMethods

public List<Method> getAfterMethods(LifecycleStage stage)
Gets the Before methods for the given LifecycleStage.

Parameters:
stage - The LifecycleStage to find Before methods for.
Returns:
A List of before methods, possibly zero length but never null


? Copyright 2005-2006, Stripes Development Team.