Package org.eclipse.jdt.debug.core
Interface IJavaObject
- All Superinterfaces:
org.eclipse.core.runtime.IAdaptable,org.eclipse.debug.core.model.IDebugElement,IJavaValue,org.eclipse.debug.core.model.IValue
- All Known Subinterfaces:
IJavaArray,IJavaClassObject
A value referencing an object on a target VM.
- Since:
- 2.0
- See Also:
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
Method Summary
Modifier and TypeMethodDescriptionvoidPrevents this object from being garbage collected.voidPermits this object to be garbage collected.Returns a variable representing the field in this object with the given name, ornullif there is no field with the given name, or the name is ambiguous.Returns a variable representing the field in this object with the given name declared in the type with the given signature, ornullif there is no field with the given name, or the name is ambiguous.getLabel()Returns the user assigned label for this object.Returns the threads which owns for the monitor associated to this object, ornullif no thread owns the monitor.getReferringObjects(long max) Returns objects that directly reference this object.longReturns the unique id for this object.Returns the threads waiting for the monitor associated to this object, ornullif no thread is waiting for the monitor.sendMessage(String selector, String signature, IJavaValue[] args, IJavaThread thread, boolean superSend) Returns the result of sending the specified message to this object with the given arguments in the specified thread.sendMessage(String selector, String signature, IJavaValue[] args, IJavaThread thread, String typeSignature) Returns the result of sending the specified message on the specified declaring type to this object with the given arguments in the specified thread.voidSets the label for this object.Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapterMethods inherited from interface org.eclipse.debug.core.model.IDebugElement
getDebugTarget, getLaunch, getModelIdentifierMethods inherited from interface org.eclipse.jdt.debug.core.IJavaValue
getGenericSignature, getJavaType, getSignature, isNullMethods inherited from interface org.eclipse.debug.core.model.IValue
getReferenceTypeName, getValueString, getVariables, hasVariables, isAllocated
-
Method Details
-
sendMessage
IJavaValue sendMessage(String selector, String signature, IJavaValue[] args, IJavaThread thread, boolean superSend) throws org.eclipse.debug.core.DebugException Returns the result of sending the specified message to this object with the given arguments in the specified thread. The given thread is resumed to perform the method invocation. The thread will suspend in its original location when the method invocation is complete. This method does not return until the method invocation is complete. Invoking a method in the target VM can result in breakpoints being hit, infinite loops, and deadlock.- Parameters:
selector- the selector of the method to be invokedsignature- the JNI style signature of the method to be invokedargs- the arguments of the method, which can benullor empty if there are nonethread- the thread in which to invoke the methodsuperSend-trueif the method lookup should begin in this object's superclass- Returns:
- the result of invoking the method
- Throws:
org.eclipse.debug.core.DebugException- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This object does not implement the specified method
- An exception occurs while invoking the specified method
- The given thread is already performing a message send,
(status code
IJavaThread.ERR_NESTED_METHOD_INVOCATION) - The given thread is not currently suspended (status
code
IJavaThread.ERR_THREAD_NOT_SUSPENDED) - The given thread was explicitly suspended (status code
IJavaThread.ERR_INCOMPATIBLE_THREAD_STATE)
-
sendMessage
IJavaValue sendMessage(String selector, String signature, IJavaValue[] args, IJavaThread thread, String typeSignature) throws org.eclipse.debug.core.DebugException Returns the result of sending the specified message on the specified declaring type to this object with the given arguments in the specified thread. The given thread is resumed to perform the method invocation. The thread will suspend in its original location when the method invocation is complete. This method does not return until the method invocation is complete. Invoking a method in the target VM can result in breakpoints being hit, infinite loops, and deadlock.- Parameters:
selector- the selector of the method to be invokedsignature- the JNI style signature of the method to be invokedargs- the arguments of the method, which can benullor empty if there are nonethread- the thread in which to invoke the methodtypeSignature- the signature of the type in which the method is defined ornullif the method should be invoked normally using polymorphism- Returns:
- the result of invoking the method
- Throws:
org.eclipse.debug.core.DebugException- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- This object does not implement the specified method
- An exception occurs while invoking the specified method
- The given thread is already performing a message send,
(status code
IJavaThread.ERR_NESTED_METHOD_INVOCATION) - The given thread is not currently suspended (status
code
IJavaThread.ERR_THREAD_NOT_SUSPENDED) - The given thread was explicitly suspended (status code
IJavaThread.ERR_INCOMPATIBLE_THREAD_STATE)
- Since:
- 2.0.1
-
getField
IJavaFieldVariable getField(String name, boolean superField) throws org.eclipse.debug.core.DebugException Returns a variable representing the field in this object with the given name, ornullif there is no field with the given name, or the name is ambiguous.- Parameters:
name- field namesuperField- whether or not to get the field in the superclass of this objects.- Returns:
- the variable representing the field, or
null - Throws:
org.eclipse.debug.core.DebugException- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
-
getField
IJavaFieldVariable getField(String name, String typeSignature) throws org.eclipse.debug.core.DebugException Returns a variable representing the field in this object with the given name declared in the type with the given signature, ornullif there is no field with the given name, or the name is ambiguous.- Parameters:
name- field nametypeSignature- the signature of the type in which the field is defined- Returns:
- the variable representing the field, or
null - Throws:
org.eclipse.debug.core.DebugException- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
-
getWaitingThreads
Returns the threads waiting for the monitor associated to this object, ornullif no thread is waiting for the monitor.- Returns:
- the thread waiting for the monitor, or
null. - Throws:
org.eclipse.debug.core.DebugException- if this method fails. Reasons include:- The VM is not able to retrieve the monitor information
- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- Since:
- 3.1
-
getOwningThread
Returns the threads which owns for the monitor associated to this object, ornullif no thread owns the monitor.- Returns:
- the thread which owns the monitor, or
null. - Throws:
org.eclipse.debug.core.DebugException- if this method fails. Reasons include:- The VM is not able to retrieve the monitor information
- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- Since:
- 3.1
-
getReferringObjects
Returns objects that directly reference this object.- Parameters:
max- the maximum number of references to retrieve or 0 for all references- Returns:
- objects that directly reference this object
- Throws:
org.eclipse.debug.core.DebugException- if the request fails- Since:
- 3.3
-
enableCollection
void enableCollection() throws org.eclipse.debug.core.DebugExceptionPermits this object to be garbage collected. Has no effect if this VM does not support enabling/disabling of garbage collection of specific objects.- Throws:
org.eclipse.debug.core.DebugException- if request fails- Since:
- 3.4
- See Also:
-
disableCollection
void disableCollection() throws org.eclipse.debug.core.DebugExceptionPrevents this object from being garbage collected. Has no effect if this VM does not support enabling/disabling of garbage collection of specific objects.- Throws:
org.eclipse.debug.core.DebugException- if request fails- Since:
- 3.4
- See Also:
-
getUniqueId
long getUniqueId() throws org.eclipse.debug.core.DebugExceptionReturns the unique id for this object.- Returns:
- unique id or -1 if this value is
null - Throws:
org.eclipse.debug.core.DebugException- if the request fails- Since:
- 3.4
-
getLabel
Returns the user assigned label for this object.- Returns:
- the label, or
nullif there isn't any. - Throws:
org.eclipse.debug.core.DebugException- if the request fails- Since:
- 3.19
-
setLabel
Sets the label for this object. If the newLabel isnullor empty string, then it removes the previous assignment.- Throws:
org.eclipse.debug.core.DebugException- if the request fails- Since:
- 3.19
-