Package org.apache.rat.testhelpers
Class TestingLicense
java.lang.Object
org.apache.rat.testhelpers.TestingLicense
- All Implemented Interfaces:
Comparable<ILicense>,IHeaderMatcher,ILicense
A class to quickly build testing licenses.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.rat.license.ILicense
ILicense.Builder -
Constructor Summary
ConstructorsConstructorDescriptionTestingLicense(String id) Creates a testing license with the specified id and a default TestingMatcherTestingLicense(String family, String id) Creates a testing license with the specified id and a default TestingMatcherTestingLicense(String family, String id, IHeaderMatcher matcher) Creates a testing license with the specified id and matcher.TestingLicense(String id, IHeaderMatcher matcher, ILicenseFamily family) Creates a testing license with the specified matcher and family. -
Method Summary
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
-
Constructor Details
-
TestingLicense
Creates a testing license with the specified id and a default TestingMatcher- Parameters:
id- the id to use.- See Also:
-
TestingLicense
Creates a testing license with the specified id and a default TestingMatcher- Parameters:
family- the Family id.id- the id to use.- See Also:
-
TestingLicense
Creates a testing license with the specified id and matcher.- Parameters:
id- the id to use.matcher- the matcher to execute.
-
TestingLicense
Creates a testing license with the specified matcher and family.- Parameters:
id- the license id to use.matcher- the matcher to use.family- the family for this license.
-
-
Method Details
-
getFamily
Gets the family from the license.- Returns:
- the license family.
-
getMatcher
Gets the matcher from the license.- Specified by:
getMatcherin interfaceILicense- Returns:
- the matcher.
-
setName
Sets the name from value for this license.- Parameters:
name- the name of this license.
-
getId
- Specified by:
getIdin interfaceIHeaderMatcher
-
reset
public void reset()- Specified by:
resetin interfaceIHeaderMatcher
-
matches
- Specified by:
matchesin interfaceIHeaderMatcher
-
getLicenseFamily
- Specified by:
getLicenseFamilyin interfaceILicense
-
getNote
-
getName
-
equals
-
hashCode
public int hashCode() -
toString
-