Class ModuleRepository

java.lang.Object
eu.cloudnetservice.driver.module.ModuleRepository
All Implemented Interfaces:
Named

public class ModuleRepository extends Object implements Named
Represents a repository for a module dependency, the dependency is locatable at this repository.
Since:
4.0
See Also:
  • Field Details

  • Constructor Details

    • ModuleRepository

      public ModuleRepository(@NonNull @NonNull String name, @NonNull @NonNull String url)
      Constructs a new instance of this class.
      Parameters:
      name - the name of the repository, must be unique. Duplicate names will override each other.
      url - the url of the repository.
      Throws:
      NullPointerException - if name or url is null
    • ModuleRepository

      @Internal public ModuleRepository()
      This constructor is for internal use only. The name and url of this repository is required. Creating a repository using this constructor will cause an exception when loading the module. See assertComplete().
  • Method Details

    • name

      @NonNull public @NonNull String name()
      Get the name of this repository.
      Specified by:
      name in interface Named
      Returns:
      the name of this repository.
    • url

      @NonNull public @NonNull String url()
      Get the url of this repository.
      Returns:
      the url of this repository.
    • assertComplete

      public void assertComplete()
      Asserts that the required properties (name, url) are present.
      Throws:
      NullPointerException - if one of required properties is not set.