Package org.apache.rat.analysis
Interface IHeaderMatcher
- All Known Subinterfaces:
ILicense
- All Known Implementing Classes:
AbstractHeaderMatcher,AbstractMatcherContainer,AndMatcher,CopyrightMatcher,FullTextMatcher,MatcherRefBuilder.IHeaderMatcherProxy,NotMatcher,OrMatcher,SimpleLicense,SimpleRegexMatcher,SimpleTextMatcher,SPDXMatcherFactory.Match,UnknownLicense
public interface IHeaderMatcher
Performs explicit checks against a line from the header of a file. For
implementations that need to check multiple lines the implementation must
cache the earlier lines.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAn IHeaderMatcher builder. -
Method Summary
Modifier and TypeMethodDescriptiondefault DescriptionGenerates the component Description.getId()Get the identifier for this matcher.booleanAttempts to match text in the IHeaders instance.default voidreset()Resets this state of this matcher to its initial state in preparation for use with another document scan.
-
Method Details
-
getId
String getId()Get the identifier for this matcher.All matchers must have unique identifiers
- Returns:
- the identifier for this matcher.
-
reset
default void reset()Resets this state of this matcher to its initial state in preparation for use with another document scan. In most cases this method does not need to do anything. -
matches
Attempts to match text in the IHeaders instance.- Parameters:
headers- the representations of the headers to check- Returns:
trueif the matcher matches the text,falseotherwise.
-
getDescription
Generates the component Description.- Returns:
- the component description.
-