Class ThirdPartyModuleRegistry

java.lang.Object
com.helger.base.thirdparty.ThirdPartyModuleRegistry

@ThreadSafe @Singleton public final class ThirdPartyModuleRegistry extends Object
This class manages all registered third party modules
Author:
Philip Helger
  • Method Details

    • isInstantiated

      public static boolean isInstantiated()
      Returns:
      true if the singleton has already been instantiated, false otherwise.
    • getInstance

      public static @NonNull ThirdPartyModuleRegistry getInstance()
      Returns:
      The singleton instance of this registry. Never null.
    • registerThirdPartyModule

      public @NonNull EChange registerThirdPartyModule(@NonNull IThirdPartyModule aModule)
      Register a new third party module.
      Parameters:
      aModule - The module to register. May not be null.
      Returns:
      EChange.CHANGED if the module was successfully registered, EChange.UNCHANGED if it was already registered.
    • getAllRegisteredThirdPartyModules

      @ReturnsMutableCopy public @NonNull Set<IThirdPartyModule> 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.