Class MatcherRefBuilder.IHeaderMatcherProxy
java.lang.Object
org.apache.rat.configuration.builders.MatcherRefBuilder.IHeaderMatcherProxy
- All Implemented Interfaces:
IHeaderMatcher
- Enclosing class:
- MatcherRefBuilder
A class that is a proxy to the actual matcher. It retrieves the actual
matcher from the map of matcher ids to matcher instances on the first use of
the matcher. This allows earlier read matchers to reference later constructed
matchers as long as all the matchers are constructed before the earlier one
is used.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.rat.analysis.IHeaderMatcher
IHeaderMatcher.Builder -
Constructor Summary
ConstructorsConstructorDescriptionIHeaderMatcherProxy(String proxyId, Map<String,IHeaderMatcher> matchers)Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetId()Get the identifier for this matcher.getRefId()Gets the matcher ID that this proxy references.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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.rat.analysis.IHeaderMatcher
getDescription
-
Constructor Details
-
IHeaderMatcherProxy
Constructor. The matchers map should be a reference to an object that will be updated by later processing of matcher definitions.- Parameters:
proxyId- the id of the matcher to find.matchers- a mapping of matchers that have been found.
-
-
Method Details
-
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:
header- the representations of the headers to check- Returns:
trueif the matcher matches the text,falseotherwise.
-
getRefId
Gets the matcher ID that this proxy references.- Returns:
- The matcher ID that this proxy references.
-