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

public class SimpleTextMatcher extends AbstractHeaderMatcher
A simple text matching IHeaderMatcher implementation.
  • Constructor Details

    • SimpleTextMatcher

      public SimpleTextMatcher(String simpleText)
      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

      public SimpleTextMatcher(String id, String simpleText)
      Constructs the simple text matcher for the simple string.
      Parameters:
      id - The id for this matcher.
      simpleText - The pattern to match.
  • Method Details

    • getSimpleText

      public String getSimpleText()
    • matches

      public boolean matches(IHeaders headers)
      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.