Class ModuleDependency.Builder
- java.lang.Object
-
- org.jboss.as.server.deployment.module.ModuleDependency.Builder
-
- Enclosing class:
- ModuleDependency
public static final class ModuleDependency.Builder extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ModuleDependencybuild()Build aModuleDependencyusing this builder's settings.static ModuleDependency.Builderof(org.jboss.modules.ModuleLoader moduleLoader, String moduleName)ModuleDependency.BuildersetExport(boolean export)Sets whether the dependent module should export this dependency's resources.ModuleDependency.BuildersetImportServices(boolean importServices)Sets whether the dependent module should be able to import services from this dependency.ModuleDependency.BuildersetOptional(boolean optional)Sets whether this dependency is optional.ModuleDependency.BuildersetReason(String reason)Sets an informational reason describing why this dependency was added.ModuleDependency.BuildersetUserSpecified(boolean userSpecified)Sets whether this dependency was explicitly specified by the user.
-
-
-
Method Detail
-
of
public static ModuleDependency.Builder of(org.jboss.modules.ModuleLoader moduleLoader, String moduleName)
-
setExport
public ModuleDependency.Builder setExport(boolean export)
Sets whether the dependent module should export this dependency's resources.- Parameters:
export-trueif the dependencies resources should be exported- Returns:
- this builder
-
setImportServices
public ModuleDependency.Builder setImportServices(boolean importServices)
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
public ModuleDependency.Builder setOptional(boolean optional)
Sets whether this dependency is optional.- Parameters:
optional-trueif the dependency is optional- Returns:
- this builder
-
setUserSpecified
public ModuleDependency.Builder setUserSpecified(boolean userSpecified)
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
public ModuleDependency.Builder setReason(String reason)
Sets an informational reason describing why this dependency was added.- Parameters:
reason- the reason. May benull- Returns:
- this builder
-
build
public ModuleDependency build()
Build aModuleDependencyusing this builder's settings.- Returns:
- the
ModuleDependency. Will not returnnull
-
-