Class DefaultModule

java.lang.Object
eu.cloudnetservice.driver.module.DefaultModule
All Implemented Interfaces:
Named, Module
Direct Known Subclasses:
DriverModule

public class DefaultModule extends Object implements Module
Represents the default implementation of the module.
Since:
4.0
See Also:
  • Field Details

  • Constructor Details

    • DefaultModule

      public DefaultModule()
  • Method Details

    • init

      Initializes the module with the necessary information. This method can only be called once.
      Specified by:
      init in interface Module
      Parameters:
      loader - the class loader used to load all dependencies and the main class of the module.
      wrapper - the created module wrapper which wraps this module.
      config - the deserialized module configuration located in the module file.
    • moduleWrapper

      @NonNull public @NonNull ModuleWrapper moduleWrapper()
      Get the module wrapper which is associated with this module.
      Specified by:
      moduleWrapper in interface Module
      Returns:
      the module wrapper which is associated with this module.
    • classLoader

      @NonNull public @NonNull ClassLoader classLoader()
      Get the class loader which is responsible for this module.
      Specified by:
      classLoader in interface Module
      Returns:
      the class loader which is responsible for this module.
    • moduleConfig

      @NonNull public @NonNull ModuleConfiguration moduleConfig()
      Get the module configuration which was deserialized based on the information located in the module.
      Specified by:
      moduleConfig in interface Module
      Returns:
      the module configuration located in this module file.