public class ChainedExtractorBuilder extends Object implements ExtractorBuilder
ExtractorBuilder implementation that delegates building
ValueExtractors 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
ExtractorBuilders to delegate to. |
| Constructor and Description |
|---|
ChainedExtractorBuilder(ExtractorBuilder... aBuilders)
Construct a ChainedExtractorBuilder that uses the specified chain of
ExtractorBuilders to realize instances of ValueExtractors. |
| 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
ExtractorBuilders to delegate to.public ChainedExtractorBuilder(ExtractorBuilder... aBuilders)
ExtractorBuilders to realize instances of ValueExtractors.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 ExtractorBuildersCacheName - 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