ObjectReference (Java SE 19 & JDK 19) (original) (raw)

All Superinterfaces:

[Mirror](Mirror.html "interface in com.sun.jdi"), [Value](Value.html "interface in com.sun.jdi")

All Known Subinterfaces:

[ArrayReference](ArrayReference.html "interface in com.sun.jdi"), [ClassLoaderReference](ClassLoaderReference.html "interface in com.sun.jdi"), [ClassObjectReference](ClassObjectReference.html "interface in com.sun.jdi"), [ModuleReference](ModuleReference.html "interface in com.sun.jdi"), [StringReference](StringReference.html "interface in com.sun.jdi"), [ThreadGroupReference](ThreadGroupReference.html "interface in com.sun.jdi"), [ThreadReference](ThreadReference.html "interface in com.sun.jdi")


public interface ObjectReferenceextends Value

An object that currently exists in the target VM. An ObjectReference mirrors only the object itself and is not specific to anyField or LocalVariable to which it is currently assigned. An ObjectReference can have 0 or more references from field(s) and/or variable(s).

Any method on ObjectReference which directly or indirectly takes ObjectReference as a parameter may throwVMDisconnectedException if the target VM is disconnected and theVMDisconnectEvent has been or is available to be read from theEventQueue.

Any method on ObjectReference which directly or indirectly takes ObjectReference as a parameter may throwVMOutOfMemoryException if the target VM has run out of memory.

Any method on ObjectReference or which directly or indirectly takes ObjectReference as parameter may throwObjectCollectedException if the mirrored object has been garbage collected.

Since:

1.3

Fields
static final int
Perform non-virtual method invocation
static final int
Perform method invocation with only the invoking thread resumed

void
Prevents garbage collection for this object.
void
Permits garbage collection for this object.
int
Returns the number times this object's monitor has been entered by the current owning thread.
boolean
Compares the specified Object with this ObjectReference for equality.
Gets the value of a given instance or static field in this object.
Gets the value of multiple instance and/or static fields in this object.
int
[hashCode](#hashCode%28%29)()
Returns the hash code value for this ObjectReference.
Invokes the specified Method on this object in the target VM.
boolean
Determines if this object has been garbage collected in the target VM.
Returns an ThreadReference for the thread, if any, which currently owns this object's monitor.
[referringObjects](#referringObjects%28long%29)(long maxReferrers)
Returns objects that directly reference this object.
void
Sets the value of a given instance or static field in this object.
long
[uniqueID](#uniqueID%28%29)()
Returns a unique identifier for this ObjectReference.
Returns a List containing a ThreadReference for each thread currently waiting for this object's monitor.

Methods declared in interface com.sun.jdi.Value

[type](Value.html#type%28%29)