Package com.levigo.jadice.web.server
Class ContextualFactories
java.lang.Object
com.levigo.jadice.web.server.ContextualFactories
Utilities for working with
ContextualFactory objects.-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ContextualFactory<T> singleton(T instance) Generate a singletonContextualFactoryproviding the given instance.
-
Method Details
-
singleton
Generate a singletonContextualFactoryproviding the given instance. The resultingContextualFactorywill always return the same instance, completely ignoring the givenInvocationContext- Type Parameters:
T- the type of object to be held as a singlton- Parameters:
instance- the instance that shall be provided as a singleton- Returns:
- a
ContextualFactoryreturning the giveninstance.
-