Class RegexBuilder
java.lang.Object
org.apache.rat.configuration.builders.AbstractBuilder
org.apache.rat.configuration.builders.RegexBuilder
- All Implemented Interfaces:
IHeaderMatcher.Builder
- Direct Known Subclasses:
Regex
A builder for the regex matcher.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the IHeaderMatcher.setExpression(String expression) Sets the regex expression.toString()Methods inherited from class AbstractBuilder
getId, hasId, setIdMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface IHeaderMatcher.Builder
getDescription
-
Constructor Details
-
RegexBuilder
public RegexBuilder()
-
-
Method Details
-
setExpression
Sets the regex expression. This method compiles the string into a pattern and may throw any exception thrown by thePattern.compile(String)method.- Parameters:
expression- the expression as a string.- Returns:
- this builder for chaining.
- See Also:
-
build
Description copied from interface:IHeaderMatcher.BuilderBuild the IHeaderMatcher.Implementations of this interface should return a specific child class of IHeaderMatcher.
- Returns:
- a new IHeaderMatcher.
-
toString
- Overrides:
toStringin classAbstractBuilder
-