ChainedExtractor Class Reference

#include <coherence/util/extractor/ChainedExtractor.hpp>

Inherits AbstractCompositeExtractor.

List of all members.


Detailed Description

Composite ValueExtractor implementation based on an array of extractors.

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.

Author:
djl 2008.03.07
See also:
ChainedExtractor

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.

Parameters:
ohTarget an Object to retrieve the value from
Returns:
the extracted value; NULL is an acceptable value
Exceptions:
ClassCastException if this ValueExtractor is incompatible with the passed object to extract a value from and the implementation requires the passed object to be of a certain type
Exception if this ValueExtractor encounters an exception in the course of extracting the value
IllegalArgumentException if this ValueExtractor cannot handle the passed object for any other reason; an implementor should include a descriptive message


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 array.
 ChainedExtractor (ValueExtractor::View vExtractor1, ValueExtractor::View vExtractor2)
 Construct a ChainedExtractor based on two extractors.

Constructor & Destructor Documentation

ChainedExtractor ( ObjectArray::View  vaExtractor  )  [protected]

Return a ChainedExtractor based on a specified array.

Parameters:
vaExtractor the ValueExtractor array

ChainedExtractor ( ValueExtractor::View  vExtractor1,
ValueExtractor::View  vExtractor2 
) [protected]

Construct a ChainedExtractor based on two extractors.

Parameters:
vExtractor1 the ValueExtractor
vExtractor2 the ValueExtractor


Member Function Documentation

static ObjectArray::View createExtractors ( String::View  vsName  )  [static]

Parse a dot-delimited sequence of method names and instantiate a corresponding array of ReflectionExtractor objects.

Parameters:
vsName a dot-delimited sequence of method names
Returns:
an array of ReflectionExtractor objects


The documentation for this class was generated from the following file: Copyright (c) 2000-2008 Oracle. All rights reserved.