public class MatcherRefBuilder extends AbstractBuilder
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.
Modifier and Type | Class and Description |
---|---|
static class |
MatcherRefBuilder.IHeaderMatcherProxy
A class that is a proxy to the actual matcher.
|
Modifier and Type | Field and Description |
---|---|
static String |
ATT_REF_ID
the reference id attribute
|
Constructor and Description |
---|
MatcherRefBuilder() |
Modifier and Type | Method and Description |
---|---|
IHeaderMatcher |
build()
Build the IHeaderMatcher.
|
Class<?> |
builtClass()
Gets the class that is build by this builder.
|
MatcherRefBuilder |
setMatcherMap(Map<String,IHeaderMatcher> matchers)
Set the Map of matcher ids to matcher instances.
|
MatcherRefBuilder |
setRefId(String refId)
Constructs the MatcherReferenceBuilder using the provided reference id.
|
String |
toString() |
getId, hasId, setId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
all, any, copyright, getDescription, matcherRef, not, regex, spdx, text
public static final String ATT_REF_ID
public MatcherRefBuilder setRefId(String refId)
refId
- the reverence to the matcher id.public Class<?> builtClass()
IHeaderMatcher.Builder
public MatcherRefBuilder setMatcherMap(Map<String,IHeaderMatcher> matchers)
matchers
- the Map of ids to instances.public IHeaderMatcher build()
IHeaderMatcher.Builder
public String toString()
toString
in class AbstractBuilder
Copyright © 2006–2024 Apache Software Foundation. All rights reserved.