Class SimpleRegexMatcher
java.lang.Object
org.apache.rat.analysis.matchers.AbstractHeaderMatcher
org.apache.rat.analysis.matchers.SimpleRegexMatcher
- All Implemented Interfaces:
IHeaderMatcher
A simple regular expression matching IHeaderMatcher
-
Nested Class Summary
Nested classes/interfaces inherited from interface IHeaderMatcher
IHeaderMatcher.Builder -
Constructor Summary
ConstructorsConstructorDescriptionSimpleRegexMatcher(String id, Pattern pattern) Constructs a regex pattern matcher with a unique random id and the specified Regex pattern. -
Method Summary
Modifier and TypeMethodDescriptionGets the expression of the underlying matching pattern.booleanAttempts to match text in the IHeaders instance.Methods inherited from class AbstractHeaderMatcher
getId, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface IHeaderMatcher
getDescription, reset
-
Constructor Details
-
SimpleRegexMatcher
-
-
Method Details
-
getExpression
Gets the expression of the underlying matching pattern.- Returns:
- the underlying pattern's construction expression.
-
matches
Description copied from interface:IHeaderMatcherAttempts to match text in the IHeaders instance.- Parameters:
headers- the representations of the headers to check- Returns:
trueif the matcher matches the text,falseotherwise.
-