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 TypeMethodDescriptionboolean
getId()
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.int
hashCode()
boolean
Attempts to match text in the IHeaders instance.void
reset()
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, wait
Methods inherited from interface org.apache.rat.analysis.IHeaderMatcher
getDescription
Methods inherited from interface org.apache.rat.license.ILicense
compareTo, getFamilyName
-
Method Details
-
toString
-
getFamily
-
getMatcher
Description copied from interface:ILicense
Get the header matcher for this license.- Specified by:
getMatcher
in interfaceILicense
- Returns:
- the header matcher for this license.
-
getId
Description copied from interface:IHeaderMatcher
Get the identifier for this matcher.All matchers must have unique identifiers
- Specified by:
getId
in interfaceIHeaderMatcher
- Returns:
- the identifier for this matcher.
-
reset
public void reset()Description copied from interface:IHeaderMatcher
Resets 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:
reset
in interfaceIHeaderMatcher
-
matches
Description copied from interface:IHeaderMatcher
Attempts to match text in the IHeaders instance.- Specified by:
matches
in interfaceIHeaderMatcher
- Parameters:
line
- the representations of the headers to check- Returns:
true
if the matcher matches the text,false
otherwise.
-
getLicenseFamily
Description copied from interface:ILicense
Gets the license family.- Specified by:
getLicenseFamily
in interfaceILicense
- Returns:
- the ILicenseFamily implementation for this license.
-
equals
-
hashCode
public int hashCode() -
getNote
Description copied from interface:ILicense
Gets the note associated with the license. -
getName
Description copied from interface:ILicense
Returns the name of this license. If no name was specified then the name of the family is returned.
-