Class ModuleDependency.Builder
java.lang.Object
org.jboss.as.server.deployment.module.ModuleDependency.Builder
- Enclosing class:
- ModuleDependency
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build aModuleDependencyusing this builder's settings.static ModuleDependency.BuildersetExport(boolean export) Sets whether the dependent module should export this dependency's resources.setImportServices(boolean importServices) Sets whether the dependent module should be able to import services from this dependency.setOptional(boolean optional) Sets whether this dependency is optional.Sets an informational reason describing why this dependency was added.setUserSpecified(boolean userSpecified) Sets whether this dependency was explicitly specified by the user.
-
Method Details
-
of
public static ModuleDependency.Builder of(org.jboss.modules.ModuleLoader moduleLoader, String moduleName) -
setExport
Sets whether the dependent module should export this dependency's resources.- Parameters:
export-trueif the dependencies resources should be exported- Returns:
- this builder
-
setImportServices
Sets whether the dependent module should be able to import services from this dependency.- Parameters:
importServices-trueif the dependent module should be able to load services from the dependency- Returns:
- this builder
-
setOptional
Sets whether this dependency is optional.- Parameters:
optional-trueif the dependency is optional- Returns:
- this builder
-
setUserSpecified
Sets whether this dependency was explicitly specified by the user.- Parameters:
userSpecified-trueif this dependency was specified by the user,falseif it was automatically added- Returns:
- this builder
-
setReason
Sets an informational reason describing why this dependency was added.- Parameters:
reason- the reason. May benull- Returns:
- this builder
-
build
Build aModuleDependencyusing this builder's settings.- Returns:
- the
ModuleDependency. Will not returnnull
-