public class JRSingletonCache<T> extends Object
| Constructor and Description |
|---|
JRSingletonCache(Class<T> itf)
Creates a cache of singleton instances.
|
| Modifier and Type | Method and Description |
|---|---|
protected T |
createInstance(String className) |
T |
getCachedInstance(String className)
Returns the singleton instance corresponding to a class.
|
protected Map<String,T> |
getContextInstanceCache() |
protected Object |
getContextKey() |
public T getCachedInstance(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 - JRExceptionprotected T createInstance(String className) throws JRException
JRExceptionprotected Object getContextKey()
Copyright © 2015. All rights reserved.