|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.seaf.factory.impl.support.DelegatingFactoryBase
net.sf.seaf.factory.impl.CachingFactory
public class CachingFactory
Factory that caches object instances.
On each request, if an instance of the requested type has already been cached, returns the cached instance as is. Otherwise delegates its instantiation to a supplied instantiating factory, caches the newly created instance for further requests and returns it.
| Constructor Summary | |
|---|---|
CachingFactory()
Default empty constructor. |
|
CachingFactory(Factory instantiatingFactory)
Full constructor. |
|
| Method Summary | ||
|---|---|---|
|
getInstanceOf(Class<Type> type)
Return an initialized instance of the specified type. |
|
| Methods inherited from class net.sf.seaf.factory.impl.support.DelegatingFactoryBase |
|---|
getInstantiatingFactory, setInstantiatingFactory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CachingFactory()
public CachingFactory(Factory instantiatingFactory)
instantiatingFactory - The instantiating factory| Method Detail |
|---|
public final <Type> Type getInstanceOf(Class<Type> type)
Factory
getInstanceOf in interface Factorytype - The type of the requested instance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||