Show / Hide Table of Contents

Class ObjectUtils

Miscellaneuos utility methods for object manipulation.

Inheritance
object
ObjectUtils
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
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 objectType.

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 objectType.

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

true if the specified object is immutable, false otherwise.

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