Package org.apache.rat.analysis.matchers
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 org.apache.rat.analysis.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 org.apache.rat.analysis.matchers.AbstractHeaderMatcher
getId, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.rat.analysis.IHeaderMatcher
getDescription, reset
-
Constructor Details
-
SimpleRegexMatcher
Constructs a regex pattern matcher with a unique random id and the specified Regex pattern.- Parameters:
id- the id for this matcher, may be null.pattern- the pattern to match.
-
-
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.
-