Show / Hide Table of Contents

Class ReflectionExtractor

Reflection-based IValueExtractor implementation.

Inheritance
object
AbstractExtractor
ReflectionExtractor
Implements
IQueryCacheComparer
IComparer
IValueExtractor
IPortableObject
Inherited Members
AbstractExtractor.Target
AbstractExtractor.Compare(object, object)
AbstractExtractor.CompareEntries(IQueryCacheEntry, IQueryCacheEntry)
AbstractExtractor.ExtractFromEntry(ICacheEntry)
AbstractExtractor.ExtractOriginalFromEntry(CacheEntry)
AbstractExtractor.VALUE
AbstractExtractor.KEY
AbstractExtractor.m_target
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Tangosol.Util.Extractor
Assembly: Coherence.dll
Syntax
public class ReflectionExtractor : AbstractExtractor, IQueryCacheComparer, IComparer, IValueExtractor, IPortableObject

Constructors

ReflectionExtractor()

Default constructor.

Declaration
public ReflectionExtractor()

ReflectionExtractor(string)

Construct a ReflectionExtractor based on a member name.

Declaration
public ReflectionExtractor(string member)
Parameters
Type Name Description
string member

The name of the member to invoke via reflection.

ReflectionExtractor(string, object[])

Construct a ReflectionExtractor.

Declaration
public ReflectionExtractor(string member, object[] parameters)
Parameters
Type Name Description
string member

The name of the member to invoke via reflection.

object[] parameters

The array of arguments to be used in the method invocation; may be null.

ReflectionExtractor(string, object[], int)

Construct a ReflectionExtractor based on a method name, optional parameters and the entry extraction target.

Declaration
public ReflectionExtractor(string member, object[] parameters, int target)
Parameters
Type Name Description
string member

The name of the member to invoke via reflection.

object[] parameters

The array of arguments to be used in the method invocation; may be null.

int target

One of the VALUE or KEY values

Fields

m_memberName

The name of the member to invoke.

Declaration
protected string m_memberName
Field Value
Type Description
string

m_parameters

The parameter array.

Declaration
protected object[] m_parameters
Field Value
Type Description
object[]

Properties

MemberName

Determine the name of the member that this extractor is configured to invoke.

Declaration
public virtual string MemberName { get; }
Property Value
Type Description
string

The name of the member to invoke using reflection.

Parameters

Gets the array of arguments used to invoke the method.

Declaration
public virtual object[] Parameters { get; }
Property Value
Type Description
object[]

The array of arguments used to invoke the method.

Methods

Equals(object)

Compare the IValueExtractor with another object to determine equality.

Declaration
public override bool Equals(object o)
Parameters
Type Name Description
object o

The object to compare with.

Returns
Type Description
bool

true iff this IValueExtractor and the passed object are quivalent IValueExtractors.

Overrides
object.Equals(object)
Remarks

Two IValueExtractor objects, ve1 and ve2 are considered equal iff ve1.Extract(o) equals ve2.Extract(o) for all values of o.

Extract(object)

Extract the value from the passed object.

Declaration
public override object Extract(object target)
Parameters
Type Name Description
object target

An object to retrieve the value from.

Returns
Type Description
object

The extracted value as an object; null is an acceptable value.

Overrides
AbstractExtractor.Extract(object)
Remarks

The returned value may be null.

Exceptions
Type Condition
InvalidCastException

If this IValueExtractor is incompatible with the passed object to extract a value from and the implementation requires the passed object to be of a certain type.

ArgumentException

If this IValueExtractor cannot handle the passed object for any other reason; an implementor should include a descriptive message.

GetHashCode()

Determine a hash value for the IValueExtractor object according to the general object.GetHashCode contract.

Declaration
public override int GetHashCode()
Returns
Type Description
int

An integer hash value for this IValueExtractor object.

Overrides
object.GetHashCode()

ReadExternal(IPofReader)

Restore the contents of a user type instance by reading its state using the specified IPofReader object.

Declaration
public virtual void ReadExternal(IPofReader reader)
Parameters
Type Name Description
IPofReader reader

The IPofReader from which to read the object's state.

Exceptions
Type Condition
IOException

If an I/O error occurs.

ToString()

Provide a human-readable description of this IValueExtractor object.

Declaration
public override string ToString()
Returns
Type Description
string

A human-readable description of this IValueExtractor object.

Overrides
object.ToString()

WriteExternal(IPofWriter)

Save the contents of a POF user type instance by writing its state using the specified IPofWriter object.

Declaration
public virtual void WriteExternal(IPofWriter writer)
Parameters
Type Name Description
IPofWriter writer

The IPofWriter to which to write the object's state.

Exceptions
Type Condition
IOException

If an I/O error occurs.

Implements

IQueryCacheComparer
IComparer
IValueExtractor
IPortableObject
In this article
Back to top Copyright © 2000, 2024, Oracle and/or its affiliates.