Class RegexBuilder
java.lang.Object
org.apache.rat.configuration.builders.AbstractBuilder
org.apache.rat.configuration.builders.RegexBuilder
- All Implemented Interfaces:
IHeaderMatcher.Builder
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 org.apache.rat.configuration.builders.AbstractBuilder
getId, hasId, setIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.rat.analysis.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:
Pattern.compile(String)
-
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
-