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_PHRASES
private static java.util.regex.Pattern[]
EMPTY_PATTERN_ARRAY
private static java.lang.String[]
EMPTY_STRING_ARRAY
private java.util.regex.Pattern[]
linePatterns
private 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 boolean
match(Document subject, java.lang.String line)
Matches the text accumulated to licenses.private void
reportOnLicense(Document subject)
void
reset()
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: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.
-
reportOnLicense
private void reportOnLicense(Document subject)
-
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
-
-