Class ObjectUtils
Miscellaneuos utility methods for object manipulation.
Inherited Members
Namespace: Tangosol.Util
Assembly: Coherence.dll
Syntax
public abstract class ObjectUtils
Fields
NO_VALUE
Constant that allows one to differentiate between a non-existent
value and null.
Declaration
public static readonly object NO_VALUE
Field Value
| Type | Description |
|---|---|
| object |
Methods
CreateInstance(Type, params object[])
Creates object instance using constructor that matches specified parameters.
Declaration
public static object CreateInstance(Type objectType, params object[] parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | objectType | Type of object to create. |
| object[] | parameters | Serializer parameters. |
Returns
| Type | Description |
|---|---|
| object | An instance of the specified |
CreateInstanceSafe(Type, params object[])
Creates object instance using constructor that matches specified parameters.
Declaration
public static object CreateInstanceSafe(Type objectType, params object[] parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | objectType | Type of object to create. |
| object[] | parameters | Serializer parameters. |
Returns
| Type | Description |
|---|---|
| object | An instance of the specified |
Remarks
Returns null rather than throwing an exception, if the specified constructor doesn't exist or fails to be invoked.
IsImmutable(object)
Return true if the specified object is immutable,
false otherwise.
Declaration
public static bool IsImmutable(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | Object to check for immutability. |
Returns
| Type | Description |
|---|---|
| bool |
|