net.sourceforge.stripes.controller
Class ActionClassCache

java.lang.Object
  extended by net.sourceforge.stripes.controller.ActionClassCache

public class ActionClassCache
extends Object

Quick and dirty class which caches the Class objects representing ActionBeans since it is expensive to look these up using the ResolverUtil.

Author:
Tim Fennell

Method Summary
 Set<Class<ActionBean>> getActionBeanClasses()
          Returns the set of beans in the classpath that implement ActionBean.
static ActionClassCache getInstance()
          Gets access to the singleton instance of this class.
protected static void init(Set<String> urlFilters, Set<String> packageFilters)
          Protected initializer that initializes the cached set of bean Class objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

init

protected static void init(Set<String> urlFilters,
                           Set<String> packageFilters)
Protected initializer that initializes the cached set of bean Class objects. While ResolverUtil does not appear to throw any exceptions, it can throw runtime exceptions which would cause classloading to fail if this initalization were done statically.


getInstance

public static ActionClassCache getInstance()
Gets access to the singleton instance of this class.


getActionBeanClasses

public Set<Class<ActionBean>> getActionBeanClasses()
Returns the set of beans in the classpath that implement ActionBean. This set is cached after the first lookup, so it can be accessed repeatedly without any performance impact. The set is an un-modifiable set.



© Copyright 2005, Stripes Development Team.