#include <coherence/util/extractor/ChainedExtractor.hpp>
Inherits AbstractCompositeExtractor.
The extractors in the array are applied sequentially left-to-right, so a result of a previous extractor serves as a target object for a next one.
Public Types | |||||||||||||
typedef spec::Handle | Handle | ||||||||||||
ChainedExtractor Handle definition. | |||||||||||||
typedef spec::View | View | ||||||||||||
ChainedExtractor View definition. | |||||||||||||
typedef spec::Holder | Holder | ||||||||||||
ChainedExtractor Holder definition. | |||||||||||||
Public Member Functions | |||||||||||||
virtual Object::Holder | extract (Object::Holder ohTarget) const | ||||||||||||
Extract the value from the passed object. The returned value may be NULL.
| |||||||||||||
virtual Object::Holder | extractFromEntry (Map::Entry::Holder ohEntry) const | ||||||||||||
Extract the value from the passed entry. | |||||||||||||
Static Public Member Functions | |||||||||||||
static ObjectArray::View | createExtractors (String::View vsName) | ||||||||||||
Parse a dot-delimited sequence of method names and instantiate a corresponding array of ReflectionExtractor objects. | |||||||||||||
Protected Member Functions | |||||||||||||
ChainedExtractor () | |||||||||||||
Default constructor (necessary for the PortableObject interface). | |||||||||||||
ChainedExtractor (ObjectArray::View vaExtractor) | |||||||||||||
Return a ChainedExtractor based on a specified ValueExtractor array. | |||||||||||||
ChainedExtractor (ValueExtractor::View vExtractor1, ValueExtractor::View vExtractor2) | |||||||||||||
Construct a ChainedExtractor based on two extractors. |
ChainedExtractor | ( | ObjectArray::View | vaExtractor | ) | [protected] |
Return a ChainedExtractor based on a specified ValueExtractor array.
vaExtractor | the ValueExtractor array |
ChainedExtractor | ( | ValueExtractor::View | vExtractor1, | |
ValueExtractor::View | vExtractor2 | |||
) | [protected] |
Construct a ChainedExtractor based on two extractors.
vExtractor1 | the ValueExtractor | |
vExtractor2 | the ValueExtractor |
virtual Object::Holder extractFromEntry | ( | Map::Entry::Holder | ohEntry | ) | const [virtual] |
Extract the value from the passed entry.
The underlying extractors are applied sequentially, so a result of a previous extractor serves as a target object for a next one. A value of null prevents any further extractions and is returned immediately. For intrinsic types, the returned value is expected to be a standard wrapper type in the same manner that reflection works; for example, int would be returned as a Integer32.
Reimplemented from AbstractExtractor.
static ObjectArray::View createExtractors | ( | String::View | vsName | ) | [static] |
Parse a dot-delimited sequence of method names and instantiate a corresponding array of ReflectionExtractor objects.
vsName | a dot-delimited sequence of method names |