Object Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Class Object is the root of the class hierarchy.
[Android.Runtime.Register("java/lang/Object", DoNotGenerateAcw=true)]
[System.Serializable]
public class Object : Java.Interop.JavaObject, Android.Runtime.IJavaObject, IDisposable
[<Android.Runtime.Register("java/lang/Object", DoNotGenerateAcw=true)>]
[<System.Serializable>]
type Object = class
inherit JavaObject
interface IJavaObject
interface IDisposable
- Inheritance
- Derived
- Attributes
- Implements
Remarks
Class Object is the root of the class hierarchy. Every class has Object as a superclass. All objects, including arrays, implement the methods of this class.
Added in 1.0.
Java documentation for java.lang.Object.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Constructors
| Name | Description |
|---|---|
| Object() |
Constructs a new object. |
| Object(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
Properties
| Name | Description |
|---|---|
| Class |
Returns the runtime class of this |
| Handle |
The handle to the underlying Android instance. |
| JniIdentityHashCode |
Gets the identity hash code assigned to this Java peer by the interop runtime. |
| JniManagedPeerState | (Inherited from JavaObject) |
| JniPeerMembers |
Gets the JNI metadata used to invoke members of this Java peer. |
| PeerReference |
Gets the JNI object reference for this Java peer. |
| ThresholdClass |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
| ThresholdType |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
Methods
| Name | Description |
|---|---|
| Clone() |
Creates and returns a copy of this object. |
| Construct(JniObjectReference, JniObjectReferenceOptions) | (Inherited from JavaObject) |
| Dispose() |
Releases the resources held by this Java peer. |
| Dispose(Boolean) |
Releases the resources held by this Java peer. |
| DisposeUnlessReferenced() | (Inherited from JavaObject) |
| Equals(Object) |
Indicates whether some other object is "equal to" this one. |
| Equals(Object) | (Inherited from JavaObject) |
| Finalize() |
Releases resources before this Java peer is reclaimed. |
| FromArray<T>(T[]) |
Creates a Java array wrapper from the specified managed array. |
| GetHashCode() |
Returns a hash code value for the object. |
| GetObject<T>(IntPtr, IntPtr, JniHandleOwnership) |
Creates a managed Java peer of the requested type for the specified JNI object reference. |
| GetObject<T>(IntPtr, JniHandleOwnership) |
Wraps a JNI object reference into a fully typed IJavaObject implementation. |
| JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. |
| Notify() |
Wakes up a single thread that is waiting on this object's monitor. |
| NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. |
| SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. |
| SetPeerReference(JniObjectReference, JniObjectReferenceOptions) | (Inherited from JavaObject) |
| ToArray<T>() |
Creates a managed array from this Java array wrapper. |
| ToString() |
Returns a string representation of the object. |
| UnregisterFromRuntime() |
Unregisters this Java peer from the interop runtime. |
| Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. |
| Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. |
| Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. |
Operators
| Name | Description |
|---|---|
| Explicit(Object to Boolean) |
Converts the specified |
| Explicit(Object to Boolean[]) |
Converts the specified |
| Explicit(Object to Byte) |
Obsolete.
Converts the specified |
| Explicit(Object to Byte[]) |
Converts the specified |
| Explicit(Object to Char) |
Converts the specified |
| Explicit(Object to Char[]) |
Converts the specified |
| Explicit(Object to Double) |
Converts the specified |
| Explicit(Object to Double[]) |
Converts the specified |
| Explicit(Object to Int32) |
Converts the specified |
| Explicit(Object to Int32[]) |
Converts the specified |
| Explicit(Object to Int64) |
Converts the specified |
| Explicit(Object to Int64[]) |
Converts the specified |
| Explicit(Object to Object[]) |
Converts the specified |
| Explicit(Object to SByte) |
Converts the specified |
| Explicit(Object to Single) |
Converts the specified |
| Explicit(Object to Single[]) |
Converts the specified |
| Explicit(Object to String) |
Converts the specified |
| Explicit(Object to String[]) |
Converts the specified |
| Explicit(Object to UInt32) |
Obsolete.
Converts the specified |
| Explicit(Object to UInt64) |
Obsolete.
Converts the specified |
| Implicit(Boolean to Object) |
Converts the specified managed |
| Implicit(Boolean[] to Object) |
Converts the specified managed |
| Implicit(Byte to Object) |
Obsolete.
Converts the specified managed |
| Implicit(Byte[] to Object) |
Converts the specified managed |
| Implicit(Char to Object) |
Converts the specified managed |
| Implicit(Char[] to Object) |
Converts the specified managed |
| Implicit(Double to Object) |
Converts the specified managed |
| Implicit(Double[] to Object) |
Converts the specified managed |
| Implicit(Int32 to Object) |
Converts the specified managed |
| Implicit(Int32[] to Object) |
Converts the specified managed |
| Implicit(Int64 to Object) |
Converts the specified managed |
| Implicit(Int64[] to Object) |
Converts the specified managed |
| Implicit(Object[] to Object) |
Converts the specified managed |
| Implicit(SByte to Object) |
Converts the specified managed |
| Implicit(Single to Object) |
Converts the specified managed |
| Implicit(Single[] to Object) |
Converts the specified managed |
| Implicit(String to Object) |
Converts the specified managed |
| Implicit(String[] to Object) |
Converts the specified managed |
| Implicit(UInt32 to Object) |
Obsolete.
Converts the specified managed |
| Implicit(UInt64 to Object) |
Obsolete.
Converts the specified managed |
Explicit Interface Implementations
| Name | Description |
|---|---|
| IJavaPeerable.Disposed() | (Inherited from JavaObject) |
| IJavaPeerable.Finalized() | (Inherited from JavaObject) |
| IJavaPeerable.JniObjectReferenceControlBlock | (Inherited from JavaObject) |
| IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from JavaObject) |
| IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from JavaObject) |
| IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from JavaObject) |
Extension Methods
| Name | Description |
|---|---|
| GetJniTypeName(IJavaPeerable) |
Gets the JNI name of the type of the instance |
| JavaAs<TResult>(IJavaPeerable) |
Try to coerce |
| JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
| JavaCast<TResult>(IJavaObject) | |
| TryJavaCast<TResult>(IJavaPeerable, TResult) |
Try to coerce |