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 Details

    • 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 - true if 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 - true if 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 - true if 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 - true if this dependency was specified by the user, false if 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 be null
      Returns:
      this builder
    • build

      public ModuleDependency build()
      Build a ModuleDependency using this builder's settings.
      Returns:
      the ModuleDependency. Will not return null