Class ChildContainerBuilder
java.lang.Object
org.apache.rat.configuration.builders.AbstractBuilder
org.apache.rat.configuration.builders.ChildContainerBuilder
- All Implemented Interfaces:
IHeaderMatcher.Builder
- Direct Known Subclasses:
AllBuilder
,AnyBuilder
,NotBuilder
Constructs a builder that contains other builders.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List
<IHeaderMatcher.Builder> The list of builders that will build the enclosed matchers.protected String
The resource the builders came from if it was read from a resource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddEnclosed
(Collection<IHeaderMatcher.Builder> children) Adds a collection of builders to the list of child builders.Adds a builder to the list of builders.setResource
(String resourceName) Reads a text file.toString()
Methods inherited from class org.apache.rat.configuration.builders.AbstractBuilder
getId, hasId, setId
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.rat.analysis.IHeaderMatcher.Builder
build, getDescription
-
Field Details
-
children
The list of builders that will build the enclosed matchers. -
resource
The resource the builders came from if it was read from a resource
-
-
Constructor Details
-
ChildContainerBuilder
protected ChildContainerBuilder()Empty default constructor.
-
-
Method Details
-
setResource
Reads a text file. Each line becomes a text matcher in the resulting list.- Parameters:
resourceName
- the name of the resource to read.- Returns:
- a List of Matchers, one for each non-empty line in the input file.
-
addEnclosed
Adds a builder to the list of builders.- Parameters:
child
- the child builder to add.- Returns:
- this for chaining.
-
addEnclosed
Adds a collection of builders to the list of child builders.- Parameters:
children
- the children to add.- Returns:
- this for chaining.
-
getEnclosedBuilders
-
getEnclosed
- Returns:
- the list of child builders for this builder.
-
toString
- Overrides:
toString
in classAbstractBuilder
-