Package org.apache.rat.analysis
Class UnknownLicense
java.lang.Object
org.apache.rat.analysis.UnknownLicense
- All Implemented Interfaces:
Comparable<ILicense>
,IHeaderMatcher
,ILicense
An ILicense implementation that represents an unknown license.
The UnknownLicense is used during processing to report that a document license can not be determined.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.rat.analysis.IHeaderMatcher
IHeaderMatcher.State
Nested classes/interfaces inherited from interface org.apache.rat.license.ILicense
ILicense.Builder
-
Method Summary
Modifier and TypeMethodDescriptionint
Gets the the current state of the matcher.Gets the final state for this matcher.getId()
Get the identifier for this matcher.getName()
Returns the name of this license.getNotes()
Attempts to matchline
and returns the State after the match is attempted.void
reset()
Resets this stateState.i
.
-
Method Details
-
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 stateState.i
. If text is being cached this method should clear that cache.- Specified by:
reset
in interfaceIHeaderMatcher
-
matches
Description copied from interface:IHeaderMatcher
Attempts to matchline
and returns the State after the match is attempted.- Specified by:
matches
in interfaceIHeaderMatcher
- Parameters:
line
- next line of text, not null- Returns:
- the new state after the matching was attempted.
-
finalizeState
Description copied from interface:IHeaderMatcher
Gets the final state for this matcher. This is called after the EOF on the input. At this point there should be no matchers in anState.i
state.- Specified by:
finalizeState
in interfaceIHeaderMatcher
-
currentState
Description copied from interface:IHeaderMatcher
Gets the the current state of the matcher. All matchers should be inState.i
at the start.- Specified by:
currentState
in interfaceIHeaderMatcher
- Returns:
- the current state of the matcher.
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ILicense>
-
getLicenseFamily
- Specified by:
getLicenseFamily
in interfaceILicense
- Returns:
- the ILicenseFamily implementation for this license.
-
getNotes
-
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. -
derivedFrom
- Specified by:
derivedFrom
in interfaceILicense
- Returns:
- the id of a license that this license is derived from. May be null.
-