Package org.apache.rat.license
Interface ILicense.Builder
- All Superinterfaces:
IHeaderMatcher.Builder
- All Known Implementing Classes:
SimpleLicense.Builder
- Enclosing interface:
- ILicense
A builder for ILicense instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the license.Set the family category for this license.Sets the ID of the license.setLicenseFamilies(SortedSet<ILicenseFamily> licenseFamilies)Sets the set of license families to use during build.setMatcher(IHeaderMatcher matcher)Sets the matcher.setMatcher(IHeaderMatcher.Builder matcher)Sets the matcher from a builder.Sets the name of the license.Sets the notes for the license.Methods inherited from interface org.apache.rat.analysis.IHeaderMatcher.Builder
getDescription
-
Method Details
-
setMatcher
Sets the matcher from a builder.- Parameters:
matcher- the builder for the matcher for the license.- Returns:
- this builder for chaining.
-
setMatcher
Sets the matcher.- Parameters:
matcher- the matcher for the license.- Returns:
- this builder for chaining.
-
setNote
Sets the notes for the license. If called multiple times the notes are concatenated to create a single note.- Parameters:
notes- the notes for the license.- Returns:
- this builder for chaining.
-
setId
Sets the ID of the license. If the ID is not set then the ID of the license family is used.- Parameters:
id- the ID for the license- Returns:
- this builder for chaining.
-
setFamily
Set the family category for this license. The category must be unique across all licenses and must be 5 characters. If more than 5 characters are provided then only the first 5 are taken. If fewer than 5 characters are provided the category is padded with spaces.- Parameters:
licenseFamilyCategory- the family category for the license.- Returns:
- this builder for chaining.
-
setName
Sets the name of the license. If the name is not set then the name of the license family is used.- Parameters:
name- the name for the license- Returns:
- this builder for chaining.
-
setLicenseFamilies
Sets the set of license families to use during build.- Parameters:
licenseFamilies- the license families to use- Returns:
- this builder.
-
build
ILicense build()Builds the license.- Specified by:
buildin interfaceIHeaderMatcher.Builder- Returns:
- A new License implementation.
-