|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jasperreports.engine.util.JRSingletonCache
public class JRSingletonCache
Utility to use as a soft cache of singleton instances.
Constructor Summary | |
---|---|
JRSingletonCache(java.lang.Class itf)
Creates a cache of singleton instances. |
Method Summary | |
---|---|
protected java.lang.Object |
createInstance(java.lang.String className)
|
java.lang.Object |
getCachedInstance(java.lang.String className)
Returns the singleton instance corresponding to a class. |
protected java.util.Map |
getContextInstanceCache()
|
protected java.lang.Object |
getContextKey()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JRSingletonCache(java.lang.Class itf)
itf
- a interface or class that should be implemented by all classes cached by this objectMethod Detail |
---|
public java.lang.Object getCachedInstance(java.lang.String className) throws JRException
The instance is first searched into the cache and created if not found.
The class is expected to have a no-argument constructor.
className
-
JRException
protected java.lang.Object createInstance(java.lang.String className) throws JRException
JRException
protected java.util.Map getContextInstanceCache()
protected java.lang.Object getContextKey()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |