Class ReflectionUpdater
Reflection-based IValueUpdater implementation.
Inherited Members
Namespace: Tangosol.Util.Extractor
Assembly: Coherence.dll
Syntax
public class ReflectionUpdater : IValueUpdater, IPortableObject
Constructors
ReflectionUpdater()
Default constructor.
Declaration
public ReflectionUpdater()
ReflectionUpdater(string)
Construct a ReflectionUpdater for a given method name.
Declaration
public ReflectionUpdater(string memberName)
Parameters
Type | Name | Description |
---|---|---|
string | memberName | The name of the method to invoke via reflection. |
Remarks
This implementation assumes that the corresponding types will have one and only one member with a specified name and, in the case this member is method, it will have exactly one parameter.
Fields
m_memberName
The name of the member to invoke.
Declaration
protected string m_memberName
Field Value
Type | Description |
---|---|
string |
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. |
Methods
Equals(object)
Compare the IValueUpdater 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 IValueUpdater and the passed object are quivalent IValueUpdaters. |
Overrides
GetHashCode()
Determine a hash value for the IValueUpdater object according to the general object.GetHashCode contract.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | An integer hash value for this IValueUpdater object. |
Overrides
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 IValueUpdater object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A human-readable description of this IValueUpdater object. |
Overrides
Update(object, object)
Update the state of the passed target object using the passed value.
Declaration
public virtual void Update(object target, object value)
Parameters
Type | Name | Description |
---|---|---|
object | target | The object to update the state of. |
object | value | The new value to update the state with. |
Exceptions
Type | Condition |
---|---|
InvalidCastException | If this IValueUpdater is incompatible with the passed target object or the value and the implementation requires the passed object or the value to be of a certain type. |
ArgumentException | If this IValueUpdater cannot handle the passed target object or value for any other reason; an implementor should include a descriptive message. |
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. |