public class ChainedExtractorBuilder extends Object implements ExtractorBuilder
ExtractorBuilder
implementation that delegates building
ValueExtractor
s to a chain of ExtractorBuilders
and returns the result from the first ExtractorBuilder to return a
non-null value from its realize(String, int, String)
method.Modifier and Type | Field and Description |
---|---|
protected List<ExtractorBuilder> |
f_listBuilders
The chain of
ExtractorBuilder s to delegate to. |
Constructor and Description |
---|
ChainedExtractorBuilder(ExtractorBuilder... aBuilders)
Construct a ChainedExtractorBuilder that uses the specified chain of
ExtractorBuilder s to realize instances of ValueExtractor s. |
Modifier and Type | Method and Description |
---|---|
ValueExtractor |
realize(String sCacheName,
int nTarget,
String sProperties)
Call the realize(String, int, String) method on each
ExtractorBuilder
in the chain returning the result of the first ExtractorBuilder to return a non-null
value. |
protected final List<ExtractorBuilder> f_listBuilders
ExtractorBuilder
s to delegate to.public ChainedExtractorBuilder(ExtractorBuilder... aBuilders)
ExtractorBuilder
s to realize instances of ValueExtractor
s.aBuilders
- the chain of ExtractorBuilder to usepublic ValueExtractor realize(String sCacheName, int nTarget, String sProperties)
ExtractorBuilder
in the chain returning the result of the first ExtractorBuilder to return a non-null
value.realize
in interface ExtractorBuilder
sCacheName
- the name of the cache the ValueExtractor will be invoked againstnTarget
- the target for the ValueExtractorsProperties
- the path to the property value to extractValueExtractor
for the given cache name, target and properties
or null if non of the ExtractorBuilder returned a non-null value