public abstract class SingletonProvider
extends java.lang.Object
SingletonsIsolatedStaticSingletonProvider,
TCCLSingletonProvider,
RegistrySingletonProvider| Modifier | Constructor and Description |
|---|---|
protected |
SingletonProvider() |
| Modifier and Type | Method and Description |
|---|---|
abstract <T> Singleton<T> |
create(java.lang.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(java.lang.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.