Package org.jboss.modules

# Class DependencySpecBuilder

java.lang.Object
org.jboss.modules.DependencySpecBuilder

Direct Known Subclasses:
  `LocalDependencySpecBuilder`, `ModuleDependencySpecBuilder`

public abstract class DependencySpecBuilder extends Object
The base class of dependency specification builders.

## Constructor Summary

Constructors
Constructor
Description
`DependencySpecBuilder()`
Construct a new instance.

## Method Summary

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 a `boolean` 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 a `boolean` 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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DependencySpecBuilder

public DependencySpecBuilder()
Construct a new instance.

## Method Details

### getImportFilter

public PathFilter getImportFilter()
Get the import filter to use. The default value is `PathFilters.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 be `null`)
Returns:
  this builder

### setImportServices

public DependencySpecBuilder setImportServices(boolean services)
Set a simple import filter, based on a `boolean` flag specifying whether services should be imported. If the flag is `true`, the import filter is set to `PathFilters.getDefaultImportFilterWithServices()`, otherwise it is set to `PathFilters.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 is `PathFilters.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 be `null`)
Returns:
  this builder

### setExport

public DependencySpecBuilder setExport(boolean export)
Set a simple export filter, based on a `boolean` flag. If the flag is `true`, the export filter is set to `PathFilters.acceptAll()`, otherwise it is set to `PathFilters.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 is `PathFilters.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 be `null`)
Returns:
  this builder

### getResourceExportFilter

public PathFilter getResourceExportFilter()
Get the resource export filter to use. The default value is `PathFilters.acceptAll()`.

Returns:
  the resource export filter to use

### setResourceExportFilter

public DependencySpecBuilder setResourceExportFilter(PathFilter resourceExportFilter)
Set the resource export filter to use. The default value is `PathFilters.acceptAll()`.

Parameters:
  `resourceExportFilter` - the resource export filter to use (must not be `null`)
Returns:
  this builder

### getClassImportFilter

public ClassFilter getClassImportFilter()
Get the class import filter to use. The default value is `ClassFilters.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 be `null`)
Returns:
  this builder

### getClassExportFilter

public ClassFilter getClassExportFilter()
Get the class export filter to use. The default value is `ClassFilters.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 be `null`)
Returns:
  this builder

### build

public abstract DependencySpec build()
Construct the dependency specification.

Returns:
  the dependency specification