Package org.apache.rat.analysis.matchers
Class SimpleTextMatcher
java.lang.Object
org.apache.rat.analysis.matchers.AbstractHeaderMatcher
org.apache.rat.analysis.matchers.SimpleTextMatcher
- All Implemented Interfaces:
IHeaderMatcher
- Direct Known Subclasses:
FullTextMatcher
A simple text matching IHeaderMatcher implementation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.rat.analysis.IHeaderMatcher
IHeaderMatcher.Builder
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleTextMatcher
(String simpleText) Constructs the simple text matcher for the simple string.SimpleTextMatcher
(String id, String simpleText) Constructs the simple text matcher for the simple string. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Attempts to match text in the IHeaders instance.Methods inherited from class org.apache.rat.analysis.matchers.AbstractHeaderMatcher
getId, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.rat.analysis.IHeaderMatcher
getDescription, reset
-
Constructor Details
-
SimpleTextMatcher
Constructs the simple text matcher for the simple string.- Parameters:
simpleText
- The pattern to match. Will only match a single line from the input stream.
-
SimpleTextMatcher
Constructs the simple text matcher for the simple string.- Parameters:
id
- The id for this matcher.simpleText
- The pattern to match.
-
-
Method Details
-
getSimpleText
-
matches
Description copied from interface:IHeaderMatcher
Attempts to match text in the IHeaders instance.- Parameters:
headers
- the representations of the headers to check- Returns:
true
if the matcher matches the text,false
otherwise.
-