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 it is returned
value 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.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the IHeaderMatcher.setMatchers(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
-
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.
-
setMatchers
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.- Returns:
- a new IHeaderMatcher.
-
toString
- Overrides:
toString
in classAbstractBuilder
-