public abstract class SingletonProvider extends Object
SingletonsIsolatedStaticSingletonProvider,
TCCLSingletonProvider,
RegistrySingletonProvider| Modifier | Constructor and Description |
|---|---|
protected |
SingletonProvider() |
| Modifier and Type | Method and Description |
|---|---|
abstract <T> Singleton<T> |
create(Class<? extends T> expectedType)
Create a new singleton
|
static void |
initialize(SingletonProvider instance)
Initialize with an explicit instance
|
static SingletonProvider |
instance() |
static void |
reset() |
public static SingletonProvider instance()
public abstract <T> Singleton<T> create(Class<? extends T> expectedType)
T - type of Java object stored in the singletonexpectedType - represents the type of Java object stored in the singletonpublic static void initialize(SingletonProvider instance)
instance - the explicit instancepublic static void reset()
Copyright © 2008-2015. All Rights Reserved.