Package ovh.mythmc.gestalt
Class GestaltSupplier
java.lang.Object
ovh.mythmc.gestalt.GestaltSupplier
Static holder for the active
Gestalt instance.
The instance can be set exactly once via set(Gestalt); subsequent
calls will throw an AlreadyInitializedException. The stored instance
is retrieved via get().
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
GestaltSupplier
public GestaltSupplier()
-
-
Method Details
-
set
Sets the activeGestaltinstance.- Parameters:
g- the Gestalt instance to register- Throws:
AlreadyInitializedException- if a Gestalt instance has already been set
-
get
Returns the activeGestaltinstance.- Returns:
- the active Gestalt instance
-