Package org.jboss.modules
Class DependencySpecBuilder
- java.lang.Object
-
- org.jboss.modules.DependencySpecBuilder
-
- Direct Known Subclasses:
LocalDependencySpecBuilder
,ModuleDependencySpecBuilder
public abstract class DependencySpecBuilder extends java.lang.Object
The base class of dependency specification builders.
-
-
Constructor Summary
Constructors Constructor Description DependencySpecBuilder()
Construct a new instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract DependencySpec
build()
Construct the dependency specification.ClassFilter
getClassExportFilter()
Get the class export filter to use.ClassFilter
getClassImportFilter()
Get the class import filter to use.PathFilter
getExportFilter()
Get the export filter to use.PathFilter
getImportFilter()
Get the import filter to use.PathFilter
getResourceExportFilter()
Get the resource export filter to use.PathFilter
getResourceImportFilter()
Get the resource import filter to use.DependencySpecBuilder
setClassExportFilter(ClassFilter classExportFilter)
Set the class export filter to use.DependencySpecBuilder
setClassImportFilter(ClassFilter classImportFilter)
Set the class import filter to use.DependencySpecBuilder
setExport(boolean export)
Set a simple export filter, based on aboolean
flag.DependencySpecBuilder
setExportFilter(PathFilter exportFilter)
Set the export filter to use.DependencySpecBuilder
setImportFilter(PathFilter importFilter)
Set the import filter to use.DependencySpecBuilder
setImportServices(boolean services)
Set a simple import filter, based on aboolean
flag specifying whether services should be imported.DependencySpecBuilder
setResourceExportFilter(PathFilter resourceExportFilter)
Set the resource export filter to use.DependencySpecBuilder
setResourceImportFilter(PathFilter resourceImportFilter)
Set the resource import filter to use.
-
-
-
Method Detail
-
getImportFilter
public PathFilter getImportFilter()
Get the import filter to use. The default value isPathFilters.getDefaultImportFilter()
.- Returns:
- the import filter to use
-
setImportFilter
public DependencySpecBuilder setImportFilter(PathFilter importFilter)
Set the import filter to use.- Parameters:
importFilter
- the import filter to use (must not benull
)- Returns:
- this builder
-
setImportServices
public DependencySpecBuilder setImportServices(boolean services)
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.- Parameters:
services
- the services flag- Returns:
- this builder
-
getExportFilter
public PathFilter getExportFilter()
Get the export filter to use. The default value isPathFilters.rejectAll()
.- Returns:
- the export filter to use
-
setExportFilter
public DependencySpecBuilder setExportFilter(PathFilter exportFilter)
Set the export filter to use.- Parameters:
exportFilter
- the export filter to use (must not benull
)- Returns:
- this builder
-
setExport
public DependencySpecBuilder setExport(boolean export)
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.- Parameters:
export
- the export flag- Returns:
- this builder
-
getResourceImportFilter
public PathFilter getResourceImportFilter()
Get the resource import filter to use. The default value isPathFilters.acceptAll()
.- Returns:
- the resource import filter to use
-
setResourceImportFilter
public DependencySpecBuilder setResourceImportFilter(PathFilter resourceImportFilter)
Set the resource import filter to use.- Parameters:
resourceImportFilter
- the resource import filter to use (must not benull
)- Returns:
- this builder
-
getResourceExportFilter
public PathFilter getResourceExportFilter()
Get the resource export filter to use. The default value isPathFilters.acceptAll()
.- Returns:
- the resource export filter to use
-
setResourceExportFilter
public DependencySpecBuilder setResourceExportFilter(PathFilter resourceExportFilter)
Set the resource export filter to use. The default value isPathFilters.acceptAll()
.- Parameters:
resourceExportFilter
- the resource export filter to use (must not benull
)- Returns:
- this builder
-
getClassImportFilter
public ClassFilter getClassImportFilter()
Get the class import filter to use. The default value isClassFilters.acceptAll()
.- Returns:
- the class import filter to use
-
setClassImportFilter
public DependencySpecBuilder setClassImportFilter(ClassFilter classImportFilter)
Set the class import filter to use.- Parameters:
classImportFilter
- the class import filter to use (must not benull
)- Returns:
- this builder
-
getClassExportFilter
public ClassFilter getClassExportFilter()
Get the class export filter to use. The default value isClassFilters.acceptAll()
.- Returns:
- the class export filter to use
-
setClassExportFilter
public DependencySpecBuilder setClassExportFilter(ClassFilter classExportFilter)
Set the class export filter to use.- Parameters:
classExportFilter
- the class export filter to use (must not benull
)- Returns:
- this builder
-
build
public abstract DependencySpec build()
Construct the dependency specification.- Returns:
- the dependency specification
-
-