Package org.apache.rat.analysis.license
Class AppliedApacheSoftwareLicense20
- java.lang.Object
-
- org.apache.rat.analysis.license.BaseLicense
-
- org.apache.rat.analysis.license.CopyrightHeader
-
- org.apache.rat.analysis.license.AppliedApacheSoftwareLicense20
-
- All Implemented Interfaces:
IHeaderMatcher
public class AppliedApacheSoftwareLicense20 extends CopyrightHeader
Matches an applied AL 2.0 License header, including a required initial copyright header line, conforming the template from the AL 2.0 license itself.- Since:
- Rat 0.9
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringASL20_LICENSE_DEFNprivate FullTextMatchingLicensetextMatcher-
Fields inherited from class org.apache.rat.analysis.license.CopyrightHeader
COPYRIGHT_PREFIX_PATTERN_DEFN
-
-
Constructor Summary
Constructors Constructor Description AppliedApacheSoftwareLicense20()AppliedApacheSoftwareLicense20(java.lang.String copyrightOwner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanmatch(Document subject, java.lang.String s)Matches the text accumulated to licenses.voidreset()Resets this matches.-
Methods inherited from class org.apache.rat.analysis.license.CopyrightHeader
getCopyRightOwner, hasCopyrightPattern, isCopyrightMatch, matchCopyright, setCopyrightOwner
-
Methods inherited from class org.apache.rat.analysis.license.BaseLicense
getLicenseFamilyCategory, getLicenseFamilyName, getNotes, prune, reportOnLicense, setLicenseFamilyCategory, setLicenseFamilyName, setNotes
-
-
-
-
Field Detail
-
ASL20_LICENSE_DEFN
public static final java.lang.String ASL20_LICENSE_DEFN
- See Also:
- Constant Field Values
-
textMatcher
private final FullTextMatchingLicense textMatcher
-
-
Method Detail
-
match
public boolean match(Document subject, java.lang.String s) 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 classCopyrightHeader- Parameters:
subject- current document.s- next line of text, not null- Returns:
- whether the current line matched in the document.
- Throws:
RatHeaderAnalysisException- in case of internal RAT errors.
-
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- Overrides:
resetin classCopyrightHeader
-
-