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
AdaptsFullTextMatchingLicense
to 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 void
addText(java.lang.String text)
boolean
match(Document subject, java.lang.String line)
Matches the text accumulated to licenses.void
setProject(org.apache.tools.ant.Project project)
private void
validate()
-
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:IHeaderMatcher
Matches the text accumulated to licenses. TODO probably a poor design choice - hope to fix later- Specified by:
match
in interfaceIHeaderMatcher
- Overrides:
match
in 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()
-
-