public class SimplePatternBasedLicense extends BaseLicense implements IHeaderMatcher
Modifier | Constructor and Description |
---|---|
|
SimplePatternBasedLicense() |
protected |
SimplePatternBasedLicense(MetaData.Datum pLicenseFamilyCategory,
MetaData.Datum pLicenseFamilyName,
String pNotes,
String[] pPatterns) |
Modifier and Type | Method and Description |
---|---|
String[] |
getPatterns() |
boolean |
match(Document pSubject,
String pLine)
Matches the text accumulated to licenses.
|
protected boolean |
matches(String pLine) |
void |
reset()
Resets this matches.
|
void |
setPatterns(String[] pPatterns) |
getLicenseFamilyCategory, getLicenseFamilyName, getNotes, prune, reportOnLicense, setLicenseFamilyCategory, setLicenseFamilyName, setNotes
public SimplePatternBasedLicense()
protected SimplePatternBasedLicense(MetaData.Datum pLicenseFamilyCategory, MetaData.Datum pLicenseFamilyName, String pNotes, String[] pPatterns)
public String[] getPatterns()
public void setPatterns(String[] pPatterns)
protected boolean matches(String pLine)
public void reset()
IHeaderMatcher
IHeaderMatcher.match(org.apache.rat.api.Document, java.lang.String)
will accumulate new text.reset
in interface IHeaderMatcher
public boolean match(Document pSubject, String pLine) throws RatHeaderAnalysisException
IHeaderMatcher
match
in interface IHeaderMatcher
pSubject
- current document.pLine
- next line of text, not nullRatHeaderAnalysisException
- in case of internal RAT errors.Copyright © 2006–2023 Apache Software Foundation. All rights reserved.