Class GeneratedLicenseNotRequired
- java.lang.Object
-
- org.apache.rat.analysis.generation.GeneratedLicenseNotRequired
-
- All Implemented Interfaces:
IHeaderMatcher
public class GeneratedLicenseNotRequired extends java.lang.Object implements IHeaderMatcher
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String[]DEFAULT_PHRASESprivate static java.util.regex.Pattern[]EMPTY_PATTERN_ARRAYprivate static java.lang.String[]EMPTY_STRING_ARRAYprivate java.util.regex.Pattern[]linePatternsprivate java.lang.String[]phrases
-
Constructor Summary
Constructors Constructor Description GeneratedLicenseNotRequired()GeneratedLicenseNotRequired(java.lang.String[] lines)GeneratedLicenseNotRequired(java.util.regex.Pattern[] linePatterns)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanmatch(Document subject, java.lang.String line)Matches the text accumulated to licenses.private voidreportOnLicense(Document subject)voidreset()Resets this matches.
-
-
-
Field Detail
-
EMPTY_STRING_ARRAY
private static final java.lang.String[] EMPTY_STRING_ARRAY
-
EMPTY_PATTERN_ARRAY
private static final java.util.regex.Pattern[] EMPTY_PATTERN_ARRAY
-
DEFAULT_PHRASES
private static final java.lang.String[] DEFAULT_PHRASES
-
linePatterns
private final java.util.regex.Pattern[] linePatterns
-
phrases
private final java.lang.String[] phrases
-
-
Method Detail
-
match
public boolean match(Document subject, java.lang.String line) throws RatHeaderAnalysisException
Description copied from interface:IHeaderMatcherMatches the text accumulated to licenses. TODO probably a poor design choice - hope to fix later- Specified by:
matchin 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.
-
reportOnLicense
private void reportOnLicense(Document subject)
-
reset
public void reset()
Description copied from interface:IHeaderMatcherResets this matches. Subsequent calls toIHeaderMatcher.match(org.apache.rat.api.Document, java.lang.String)will accumulate new text.- Specified by:
resetin interfaceIHeaderMatcher
-
-