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

public abstract class ChildContainerBuilder extends AbstractBuilder
Constructs a builder that contains other builders.
  • Field Details

    • children

      protected final List<IHeaderMatcher.Builder> children
      The list of builders that will build the enclosed matchers.
    • resource

      protected String 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

      public AbstractBuilder setResource(String resourceName)
      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

      public AbstractBuilder addEnclosed(IHeaderMatcher.Builder child)
      Adds a builder to the list of builders.
      Parameters:
      child - the child builder to add.
      Returns:
      this for chaining.
    • addEnclosed

      public AbstractBuilder addEnclosed(Collection<IHeaderMatcher.Builder> children)
      Adds a collection of builders to the list of child builders.
      Parameters:
      children - the children to add.
      Returns:
      this for chaining.
    • getEnclosedBuilders

      public List<IHeaderMatcher.Builder> getEnclosedBuilders()
    • getEnclosed

      public List<IHeaderMatcher> getEnclosed()
      Returns:
      the list of child builders for this builder.
    • toString

      public String toString()
      Overrides:
      toString in class AbstractBuilder