Package org.apache.rat.anttasks
Class FullTextLicenseMatcher
- java.lang.Object
-
- org.apache.rat.analysis.license.BaseLicense
-
- org.apache.rat.analysis.license.FullTextMatchingLicense
-
- org.apache.rat.anttasks.FullTextLicenseMatcher
-
- All Implemented Interfaces:
IHeaderMatcher
public class FullTextLicenseMatcher extends FullTextMatchingLicense
AdaptsFullTextMatchingLicenseto Ant's method naming conventions so it becomes easy to write text matching based license matchers inside an Ant build file.- Since:
- Rat Antlib 0.9
-
-
Constructor Summary
Constructors Constructor Description FullTextLicenseMatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddText(java.lang.String text)booleanmatch(Document subject, java.lang.String line)Matches the text accumulated to licenses.voidsetProject(org.apache.tools.ant.Project project)private voidvalidate()-
Methods inherited from class org.apache.rat.analysis.license.FullTextMatchingLicense
hasFullText, reset, setFullText
-
Methods inherited from class org.apache.rat.analysis.license.BaseLicense
getLicenseFamilyCategory, getLicenseFamilyName, getNotes, prune, reportOnLicense, setLicenseFamilyCategory, setLicenseFamilyName, setNotes
-
-
-
-
Method Detail
-
setProject
public void setProject(org.apache.tools.ant.Project project)
-
addText
public void addText(java.lang.String text)
-
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- Overrides:
matchin classFullTextMatchingLicense- 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.
-
validate
private void validate()
-
-