Class PofReflectionHelper
Collection of helper methods for POF reflection.
Inherited Members
Namespace: Tangosol.IO.Pof.Reflection
Assembly: Coherence.dll
Syntax
public class PofReflectionHelper
Methods
EnsureType(object, int, IPofContext)
Validate that the supplied object is compatible with the specified type.
Declaration
public static object EnsureType(object o, int typeId, IPofContext ctx)
Parameters
Type | Name | Description |
---|---|---|
object | o | The object. |
int | typeId | The Pof type identifier; includes Pof intrinsics, Pof compact values, and user types. |
IPofContext | ctx | The IPofContext. |
Returns
Type | Description |
---|---|
object | The original object. |
Exceptions
Type | Condition |
---|---|
ArgumentException | If the specified type is a user type that is unknown to this IPofContext or there is no type mapping. |
InvalidCastException | If the specified object is not assignable to the specified type. |
GetType(int, IPofContext)
Determine the type associated with the given type identifier.
Declaration
public static Type GetType(int typeId, IPofContext ctx)
Parameters
Type | Name | Description |
---|---|---|
int | typeId | The Pof type identifier; includes Pof intrinsics, Pof compact values, and user types. |
IPofContext | ctx | The IPofContext. |
Returns
Type | Description |
---|---|
Type | The type associated with the specified type identifier or
|
Exceptions
Type | Condition |
---|---|
ArgumentException | If the specified type is a user type that is unknown to this IPofContext. |