Class MatcherRefBuilder
java.lang.Object
org.apache.rat.configuration.builders.AbstractBuilder
org.apache.rat.configuration.builders.MatcherRefBuilder
- All Implemented Interfaces:
IHeaderMatcher.Builder
A reference matching Matcher builder.
This class stores a matcher id as a reference to the matcher. It also has a
map of matcher ids to the matcher instances. When build()
is called the matcher
reference is looked up in the map. If it is found then its value is returned
from the build()
call. If the reference is not located then a
IHeaderMatcherProxy is returned. the IHeaderMatcherProxy is resolved in a
later configuration construction phase.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A class that is a proxy to the actual matcher. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the IHeaderMatcher.setMatcherMap
(Map<String, IHeaderMatcher> matchers) Set the Map of matcher ids to matcher instances.Constructs the MatcherReferenceBuilder using the provided reference id.toString()
Methods inherited from class org.apache.rat.configuration.builders.AbstractBuilder
getId, hasId, setId
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.rat.analysis.IHeaderMatcher.Builder
getDescription
-
Constructor Details
-
MatcherRefBuilder
public MatcherRefBuilder()
-
-
Method Details
-
setRefId
Constructs the MatcherReferenceBuilder using the provided reference id.- Parameters:
refId
- the reverence to the matcher id.- Returns:
- this builder for chaining.
-
setMatcherMap
Set the Map of matcher ids to matcher instances.- Parameters:
matchers
- the Map of ids to instances.- Returns:
- this builder for chaining.
-
build
Description copied from interface:IHeaderMatcher.Builder
Build the IHeaderMatcher.Implementations of this interface should return a specific child class of IHeaderMatcher.
- Returns:
- a new IHeaderMatcher.
-
toString
- Overrides:
toString
in classAbstractBuilder
-