Package org.jboss.modules
Class LocalDependencySpecBuilder
- java.lang.Object
-
- org.jboss.modules.DependencySpecBuilder
-
- org.jboss.modules.LocalDependencySpecBuilder
-
public final class LocalDependencySpecBuilder extends DependencySpecBuilder
A local dependency specification builder, which includes a module's own content or some other, external content.
-
-
Constructor Summary
Constructors Constructor Description LocalDependencySpecBuilder()
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DependencySpec
build()
Construct the dependency specification.PathFilter
getImportFilter()
Get the import filter to use.java.util.Set<java.lang.String>
getLoaderPaths()
Get the loader paths set.LocalLoader
getLocalLoader()
Get the local loader to use.LocalDependencySpecBuilder
setClassExportFilter(ClassFilter classExportFilter)
Set the class export filter to use.LocalDependencySpecBuilder
setClassImportFilter(ClassFilter classImportFilter)
Set the class import filter to use.LocalDependencySpecBuilder
setExport(boolean export)
Set a simple export filter, based on aboolean
flag.LocalDependencySpecBuilder
setExportFilter(PathFilter exportFilter)
Set the export filter to use.LocalDependencySpecBuilder
setImportFilter(PathFilter importFilter)
Set the import filter to use.LocalDependencySpecBuilder
setImportServices(boolean services)
Set a simple import filter, based on aboolean
flag specifying whether services should be imported.LocalDependencySpecBuilder
setLoaderPaths(java.util.Set<java.lang.String> loaderPaths)
Set the loader paths set.LocalDependencySpecBuilder
setLocalLoader(LocalLoader localLoader)
Set the local loader to use.LocalDependencySpecBuilder
setResourceExportFilter(PathFilter resourceExportFilter)
Set the resource export filter to use.LocalDependencySpecBuilder
setResourceImportFilter(PathFilter resourceImportFilter)
Set the resource import filter to use.-
Methods inherited from class org.jboss.modules.DependencySpecBuilder
getClassExportFilter, getClassImportFilter, getExportFilter, getResourceExportFilter, getResourceImportFilter
-
-
-
-
Method Detail
-
getImportFilter
public PathFilter getImportFilter()
Get the import filter to use. The default value isPathFilters.acceptAll()
.- Overrides:
getImportFilter
in classDependencySpecBuilder
- Returns:
- the import filter to use
-
setImportFilter
public LocalDependencySpecBuilder setImportFilter(PathFilter importFilter)
Description copied from class:DependencySpecBuilder
Set the import filter to use.- Overrides:
setImportFilter
in classDependencySpecBuilder
- Parameters:
importFilter
- the import filter to use (must not benull
)- Returns:
- this builder
-
setImportServices
public LocalDependencySpecBuilder setImportServices(boolean services)
Description copied from class:DependencySpecBuilder
Set a simple import filter, based on aboolean
flag specifying whether services should be imported. If the flag istrue
, the import filter is set toPathFilters.getDefaultImportFilterWithServices()
, otherwise it is set toPathFilters.getDefaultImportFilter()
. Any previous import filter setting is overwritten.- Overrides:
setImportServices
in classDependencySpecBuilder
- Parameters:
services
- the services flag- Returns:
- this builder
-
setExportFilter
public LocalDependencySpecBuilder setExportFilter(PathFilter exportFilter)
Description copied from class:DependencySpecBuilder
Set the export filter to use.- Overrides:
setExportFilter
in classDependencySpecBuilder
- Parameters:
exportFilter
- the export filter to use (must not benull
)- Returns:
- this builder
-
setExport
public LocalDependencySpecBuilder setExport(boolean export)
Description copied from class:DependencySpecBuilder
Set a simple export filter, based on aboolean
flag. If the flag istrue
, the export filter is set toPathFilters.acceptAll()
, otherwise it is set toPathFilters.rejectAll()
. Any previous export filter setting is overwritten.- Overrides:
setExport
in classDependencySpecBuilder
- Parameters:
export
- the export flag- Returns:
- this builder
-
setResourceImportFilter
public LocalDependencySpecBuilder setResourceImportFilter(PathFilter resourceImportFilter)
Description copied from class:DependencySpecBuilder
Set the resource import filter to use.- Overrides:
setResourceImportFilter
in classDependencySpecBuilder
- Parameters:
resourceImportFilter
- the resource import filter to use (must not benull
)- Returns:
- this builder
-
setResourceExportFilter
public LocalDependencySpecBuilder setResourceExportFilter(PathFilter resourceExportFilter)
Description copied from class:DependencySpecBuilder
Set the resource export filter to use. The default value isPathFilters.acceptAll()
.- Overrides:
setResourceExportFilter
in classDependencySpecBuilder
- Parameters:
resourceExportFilter
- the resource export filter to use (must not benull
)- Returns:
- this builder
-
setClassImportFilter
public LocalDependencySpecBuilder setClassImportFilter(ClassFilter classImportFilter)
Description copied from class:DependencySpecBuilder
Set the class import filter to use.- Overrides:
setClassImportFilter
in classDependencySpecBuilder
- Parameters:
classImportFilter
- the class import filter to use (must not benull
)- Returns:
- this builder
-
setClassExportFilter
public LocalDependencySpecBuilder setClassExportFilter(ClassFilter classExportFilter)
Description copied from class:DependencySpecBuilder
Set the class export filter to use.- Overrides:
setClassExportFilter
in classDependencySpecBuilder
- Parameters:
classExportFilter
- the class export filter to use (must not benull
)- Returns:
- this builder
-
getLocalLoader
public LocalLoader getLocalLoader()
Get the local loader to use. The default value isnull
, indicating that the content should come from the module being defined.- Returns:
- the local loader to use, or
null
to use the module's own content
-
setLocalLoader
public LocalDependencySpecBuilder setLocalLoader(LocalLoader localLoader)
Set the local loader to use.- Parameters:
localLoader
- the local loader to use, ornull
to use the module's own content- Returns:
- this builder
-
getLoaderPaths
public java.util.Set<java.lang.String> getLoaderPaths()
Get the loader paths set. The default is the empty set. This value is ignored if the dependency specification refers to the module's own content.- Returns:
- the loader paths set
-
setLoaderPaths
public LocalDependencySpecBuilder setLoaderPaths(java.util.Set<java.lang.String> loaderPaths)
Set the loader paths set.- Parameters:
loaderPaths
- the loader paths set (must not benull
)- Returns:
- this builder
-
build
public DependencySpec build()
Description copied from class:DependencySpecBuilder
Construct the dependency specification.- Specified by:
build
in classDependencySpecBuilder
- Returns:
- the dependency specification
-
-