Class ModuleDependency
java.lang.Object
eu.cloudnetservice.driver.module.ModuleDependency
Represents a dependency for the desired module. The module dependencies for a module are specified in the module
configuration.
The specified dependency in the module configuration has to match in the following parts:
- group
- name
- version
- Since:
- 4.0
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new module dependency instance.ModuleDependency(@Nullable String repo, @NonNull String group, @NonNull String name, @NonNull String version) Creates a new module dependency instance.ModuleDependency(@Nullable String repo, @Nullable String url, @NonNull String group, @NonNull String name, @NonNull String version, @Nullable String checksum) Creates a new module dependency instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidAsserts that the required properties (group, name, version) are present.checksum()Get the checksum of this dependency, if known.group()Get the group of this dependency.name()Get the name of this dependency.repo()Get the repository this dependency is located in.toString()url()Get the direct download url of this dependency.version()Get the version of this dependency.
-
Field Details
-
repo
-
url
-
group
-
name
-
version
-
checksum
-
-
Constructor Details
-
ModuleDependency
public ModuleDependency(@NonNull @NonNull String group, @NonNull @NonNull String name, @NonNull @NonNull String version) Creates a new module dependency instance. This dependency will require another module to be loaded before.- Parameters:
group- the group of the dependency.name- the name of the dependency.version- the version of the dependency.- Throws:
NullPointerException- if group, name or version is null.
-
ModuleDependency
public ModuleDependency(@Nullable @Nullable String repo, @NonNull @NonNull String group, @NonNull @NonNull String name, @NonNull @NonNull String version) Creates a new module dependency instance. This dependency type will (when the repository is provided) require a dependency from a remote repository which needs to be downloaded. If the repository is not provided (in this case null) this dependency will require another module to be loaded before.- Parameters:
repo- the repository in which this dependency is located.group- the group of the dependency.name- the name of the dependency.version- the version of the dependency.- Throws:
NullPointerException- if group, name or version is null.
-
ModuleDependency
public ModuleDependency(@Nullable @Nullable String repo, @Nullable @Nullable String url, @NonNull @NonNull String group, @NonNull @NonNull String name, @NonNull @NonNull String version, @Nullable @Nullable String checksum) Creates a new module dependency instance. This dependency type will (when the repository is provided) require a dependency from a remote repository which needs to be downloaded. If the direct download url is provided this dependency will be loaded from the direct url. Please note: if both the repository and url is provided, the direct download url will be ignored. If neither the repository nor the direct url is not provided (in this case null) this dependency will require another module to be loaded before.- Parameters:
repo- the repository in which this dependency is located.url- the direct download url of this dependency.group- the group of the dependency.name- the name of the dependency.version- the version of the dependency.checksum- the checksum of the dependency, null if this dependency represents a module.- Throws:
NullPointerException- if group, name or version is null.
-
-
Method Details
-
repo
-
url
-
group
-
name
-
version
-
checksum
-
assertDefaultPropertiesSet
public void assertDefaultPropertiesSet()Asserts that the required properties (group, name, version) are present.- Throws:
NullPointerException- if one of required properties is not set.
-
toString
-