Interface Module

All Superinterfaces:
Named
All Known Implementing Classes:
DefaultModule, DriverModule

public interface Module extends Named
Represents the main class or entry point of the module. The entry point is allowed to specify own module lifecycle update methods using the module task annotation.
See Also:
  • Method Details

    • init

      Initializes the module with the necessary information. This method can only be called once.
      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.
      Throws:
      IllegalArgumentException - if this module instance is already initialized.
      NullPointerException - if the provided loader, wrapper or module config is null.
    • moduleWrapper

      Get the module wrapper which is associated with this module.
      Returns:
      the module wrapper which is associated with this module.
    • classLoader

      Get the class loader which is responsible for this module.
      Returns:
      the class loader which is responsible for this module.
    • moduleConfig

      Get the module configuration which was deserialized based on the information located in the module.
      Returns:
      the module configuration located in this module file.
    • group

      @NonNull default @NonNull String group()
      Get the group of this module.
      Returns:
      the group id of this module.
    • name

      @NonNull default @NonNull String name()
      Get the name of this module.
      Specified by:
      name in interface Named
      Returns:
      the name of this module.
    • version

      @NonNull default @NonNull String version()
      Get the version of this module.
      Returns:
      the version of this module.
    • website

      @Nullable default @Nullable String website()
      Get the website of this module.
      Returns:
      the website of this module.
    • description

      @Nullable default @Nullable String description()
      Get the description of this module.
      Returns:
      the description of this module.