public abstract class SingletonProvider extends Object
Singleton
sIsolatedStaticSingletonProvider
,
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)
expectedType
- represents the type of Java object stored in the singletonpublic static void initialize(SingletonProvider instance)
instance
- public static void reset()
Copyright © 2014. All Rights Reserved.