package saker.nest.bundle
Builder class for ExternalDependency.
At least one dependency kind must be added before calling build().
public Builder | addEntry( Adds an entry wildcard. |
public Builder | Adds a dependency kind. |
public Builder | addMetaData( Adda a meta-data entry. |
public ExternalDependency | build() Builds the external dependency. |
public boolean | hasMetaData( Checks if a meta-data with the given name is already present. |
public Builder | setIncludesMainArchive( Sets if the main archive is included or not. |
Adds a dependency kind.
kindThe dependency kind.
this
NullPointerExceptionIf the argument is
null
.IllegalArgumentExceptionIf the format of the kind is inappropriate. See BundleDependency.isValidKind(String) .
public Builder addMetaData(String name, String content) throws NullPointerException, IllegalArgumentException
Adda a meta-data entry.
nameThe name of the meta-data.
contentThe value of the meta-data.
this
NullPointerExceptionIf any of the arguments are
null
.IllegalArgumentExceptionIf the format of the meta-data name is inappropriate. See
BundleDependency.isValidMetaDataName(String) .
Builds the external dependency.
The builder can be reused after this call.
The constructed ExternalDependency.
IllegalStateExceptionIf no kinds were specified.
Checks if a meta-data with the given name is already present.
nameThe meta-data name.
true
if the meta-data with the given name is already set.