Package org.apache.rat.analysis
Interface IHeaderMatcher
- All Known Subinterfaces:
ILicense
- All Known Implementing Classes:
AbstractHeaderMatcher
,AbstractMatcherContainer
,AbstractSimpleMatcher
,AndMatcher
,CopyrightMatcher
,FullTextMatcher
,NotMatcher
,OrMatcher
,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
Modifier and TypeInterfaceDescriptionstatic interface
An IHeaderMatcher builder.static class
The state of the matcher. -
Method Summary
-
Method Details
-
getId
String getId()Get the identifier for this matcher.All matchers must have unique identifiers
- Returns:
- the Identifier for this matcher.
-
reset
void reset()Resets this stateState.i
. If text is being cached this method should clear that cache. -
matches
Attempts to matchline
and returns the State after the match is attempted.- Parameters:
line
- next line of text, not null- Returns:
- the new state after the matching was attempted.
-
finalizeState
IHeaderMatcher.State finalizeState()Gets the final state for this matcher. This is called after the EOF on the input. At this point there should be no matchers in anState.i
state. -
currentState
IHeaderMatcher.State currentState()Gets the the current state of the matcher. All matchers should be inState.i
at the start.- Returns:
- the current state of the matcher.
-