Package org.apache.rat.analysis.matchers
Class SimpleTextMatcher
java.lang.Object
org.apache.rat.analysis.matchers.AbstractHeaderMatcher
org.apache.rat.analysis.matchers.AbstractSimpleMatcher
org.apache.rat.analysis.matchers.SimpleTextMatcher
- All Implemented Interfaces:
IHeaderMatcher
A simple text matching IHeaderMatcher implementation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.rat.analysis.IHeaderMatcher
IHeaderMatcher.Builder, IHeaderMatcher.State -
Constructor Summary
ConstructorsConstructorDescriptionSimpleTextMatcher(String pattern)Constructs the simple text matcher for the simple string.SimpleTextMatcher(String id, String pattern)Constructs the simple text matcher for the simple string. -
Method Summary
Methods inherited from class org.apache.rat.analysis.matchers.AbstractSimpleMatcher
currentState, finalizeState, matches, resetMethods inherited from class org.apache.rat.analysis.matchers.AbstractHeaderMatcher
getId, toString
-
Constructor Details
-
SimpleTextMatcher
Constructs the simple text matcher for the simple string.- Parameters:
pattern- 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.pattern- The pattern to match. Will only match a single line from the input stream.
-
-
Method Details
-
doMatch
Description copied from class:AbstractSimpleMatcherPerforms the actual match test.- Specified by:
doMatchin classAbstractSimpleMatcher- Parameters:
line- the line to check.- Returns:
trueif the line matches,falseotherwise.
-