Package com.helger.base.thirdparty
Class ThirdPartyModuleRegistry
java.lang.Object
com.helger.base.thirdparty.ThirdPartyModuleRegistry
This class manages all registered third party modules
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescription@NonNull Set<IThirdPartyModule> static @NonNull ThirdPartyModuleRegistryintstatic boolean@NonNull EChangeregisterThirdPartyModule(@NonNull IThirdPartyModule aModule) Register a new third party module.voidReinitialize this registry by clearing all modules and reloading from SPI.
-
Method Details
-
isInstantiated
public static boolean isInstantiated()- Returns:
trueif the singleton has already been instantiated,falseotherwise.
-
getInstance
- Returns:
- The singleton instance of this registry. Never
null.
-
registerThirdPartyModule
Register a new third party module.- Parameters:
aModule- The module to register. May not benull.- Returns:
EChange.CHANGEDif the module was successfully registered,EChange.UNCHANGEDif it was already registered.
-
getAllRegisteredThirdPartyModules
- Returns:
- A mutable copy of all registered third party modules. Never
null.
-
getRegisteredThirdPartyModuleCount
@Nonnegative public int getRegisteredThirdPartyModuleCount()- Returns:
- The number of registered third party modules. Always ≥ 0.
-
reinitialize
public void reinitialize()Reinitialize this registry by clearing all modules and reloading from SPI.
-