Package org.apache.rat.license
Class SimpleLicense
java.lang.Object
org.apache.rat.license.SimpleLicense
- All Implemented Interfaces:
Comparable<ILicense>,IHeaderMatcher,ILicense
A simple implementation of ILicense.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleangetId()Get the identifier for this matcher.Gets the license family.Get the header matcher for this license.getName()Returns the name of this license.getNote()Gets the note associated with the license.inthashCode()booleanAttempts to match text in the IHeaders instance.voidreset()Resets this state of this matcher to its initial state in preparation for use with another document scan.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.rat.analysis.IHeaderMatcher
getDescriptionMethods inherited from interface org.apache.rat.license.ILicense
compareTo, getFamilyName
-
Method Details
-
toString
-
getFamily
-
getMatcher
Description copied from interface:ILicenseGet the header matcher for this license.- Specified by:
getMatcherin interfaceILicense- Returns:
- the header matcher for this license.
-
getId
Description copied from interface:IHeaderMatcherGet the identifier for this matcher.All matchers must have unique identifiers
- Specified by:
getIdin interfaceIHeaderMatcher- Returns:
- the identifier for this matcher.
-
reset
public void reset()Description copied from interface:IHeaderMatcherResets this state of this matcher to its initial state in preparation for use with another document scan. In most cases this method does not need to do anything.- Specified by:
resetin interfaceIHeaderMatcher
-
matches
Description copied from interface:IHeaderMatcherAttempts to match text in the IHeaders instance.- Specified by:
matchesin interfaceIHeaderMatcher- Parameters:
line- the representations of the headers to check- Returns:
trueif the matcher matches the text,falseotherwise.
-
getLicenseFamily
Description copied from interface:ILicenseGets the license family.- Specified by:
getLicenseFamilyin interfaceILicense- Returns:
- the ILicenseFamily implementation for this license.
-
equals
-
hashCode
public int hashCode() -
getNote
Description copied from interface:ILicenseGets the note associated with the license. -
getName
Description copied from interface:ILicenseReturns the name of this license. If no name was specified then the name of the family is returned.
-