Package org.apache.rat.analysis.util
Class HeaderMatcherMultiplexer
- java.lang.Object
-
- org.apache.rat.analysis.util.HeaderMatcherMultiplexer
-
- All Implemented Interfaces:
IHeaderMatcher
public final class HeaderMatcherMultiplexer extends java.lang.Object implements IHeaderMatcher
Delegates to an ordered set of matchers.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<IHeaderMatcher>
matchers
-
Constructor Summary
Constructors Constructor Description HeaderMatcherMultiplexer(java.util.List<IHeaderMatcher> matchers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
match(Document subject, java.lang.String line)
Matches the text accumulated to licenses.void
reset()
Resets this matches.
-
-
-
Field Detail
-
matchers
private final java.util.List<IHeaderMatcher> matchers
-
-
Constructor Detail
-
HeaderMatcherMultiplexer
public HeaderMatcherMultiplexer(java.util.List<IHeaderMatcher> matchers)
-
-
Method Detail
-
match
public boolean match(Document subject, java.lang.String line) throws RatHeaderAnalysisException
Description copied from interface:IHeaderMatcher
Matches the text accumulated to licenses. TODO probably a poor design choice - hope to fix later- Specified by:
match
in interfaceIHeaderMatcher
- Parameters:
subject
- current document.line
- next line of text, not null- Returns:
- whether the current line matched in the document.
- Throws:
RatHeaderAnalysisException
- in case of internal RAT errors.
-
reset
public void reset()
Description copied from interface:IHeaderMatcher
Resets this matches. Subsequent calls toIHeaderMatcher.match(org.apache.rat.api.Document, java.lang.String)
will accumulate new text.- Specified by:
reset
in interfaceIHeaderMatcher
-
-