Constructor and Description |
---|
SingleInitGuard(java.lang.Class<?> owner)
Constructor initialises with the owner of this guard
|
SingleInitGuard(java.lang.String className)
Constructor initialises with the name of the owner of this guard
|
Modifier and Type | Method and Description |
---|---|
void |
assertInitialised()
Call to assert that initialisation has taken place prior to this call
|
void |
assertNotInitialised()
Call to assert that initialisation has NOT taken place prior to this call
|
void |
initialise()
Call to initialise, can be called once
|
boolean |
isInitialised()
Returns true if the state is initialised
|
void |
uninitialise()
Call to un-initialise this object
|
public SingleInitGuard(java.lang.Class<?> owner)
java.lang.NullPointerException
- An argument is nullpublic SingleInitGuard(java.lang.String className)
java.lang.NullPointerException
- An argument is nullpublic void initialise()
initialise
in interface InitGuard
public void uninitialise()
uninitialise
in interface InitGuard
public void assertInitialised()
assertInitialised
in interface InitGuard
public void assertNotInitialised()
assertNotInitialised
in interface InitGuard
public boolean isInitialised()
isInitialised
in interface InitGuard