Eclipse JDT
2.0

org.eclipse.jdt.debug.core
Interface IJavaClassType

All Superinterfaces:
IJavaType

public interface IJavaClassType
extends IJavaType

The class of an object on a Java debug target.

Clients are not intended to implement this interface.

Since:
2.0
See Also:
IJavaValue

Method Summary
 IJavaClassObject getClassObject()
          Returns the class object associated with this class type.
 IJavaFieldVariable getField(String name)
          Returns a variable representing the static field in this class with the given name, or null if there is no field with the given name, or the name is ambiguous.
 IJavaClassType getSuperclass()
          Returns the superclass of this class type, or null if no such class exists.
 IJavaObject newInstance(String signature, IJavaValue[] args, IJavaThread thread)
          Returns a new instance of this class by invoking the constructor with the given signature and arguments in the specified thread.
 IJavaValue sendMessage(String selector, String signature, IJavaValue[] args, IJavaThread thread)
          Returns the result of sending the specified message to this class with the given arguments in the specified thread (invokes a static method on this type).
 
Methods inherited from interface org.eclipse.jdt.debug.core.IJavaType
getName, getSignature
 

Method Detail

newInstance

public IJavaObject newInstance(String signature,
                               IJavaValue[] args,
                               IJavaThread thread)
                        throws DebugException
Returns a new instance of this class by invoking the constructor with the given signature and arguments in the specified thread. The given thread is resumed to perform this method invocation and suspends in its original location when this method invocation is complete. This method does not return until the method invocation is complete. Resuming the specified thread can result in breakpoints being hit, infinite loops, and deadlock.

Parameters:
signature - the JNI style signature of the method to be invoked
args - the arguments of the constructor, which can be null or emtpy if there are none
thread - the thread in which to invoke the constructor
Returns:
the result of invoking the constructor
Throws:
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 type does not implement the specified constructor
  • An exception occurs while invoking the specified constructor
  • 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

public IJavaValue sendMessage(String selector,
                              String signature,
                              IJavaValue[] args,
                              IJavaThread thread)
                       throws DebugException
Returns the result of sending the specified message to this class with the given arguments in the specified thread (invokes a static method on this type). The given thread is resumed to perform this method invocation and suspends in its original location when this method invocation is complete. This method does not return until the method invocation is complete. Resuming the specified thread can result in breakpoints being hit, infinite loops, and deadlock.

Parameters:
selector - the selector of the method to be invoked
signature - the JNI style signature of the method to be invoked
args - the arguments of the method, which can be null or emtpy if there are none
thread - the thread in which to invoke the method
Returns:
the result of invoking the method
Throws:
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)

getField

public IJavaFieldVariable getField(String name)
                            throws DebugException
Returns a variable representing the static field in this class with the given name, or null if there is no field with the given name, or the name is ambiguous.

Parameters:
name - field name
Returns:
the variable representing a static field, or null
Throws:
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.

getSuperclass

public IJavaClassType getSuperclass()
                             throws DebugException
Returns the superclass of this class type, or null if no such class exists.

Returns:
the superclass of this class type, or null
Throws:
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.

getClassObject

public IJavaClassObject getClassObject()
                                throws DebugException
Returns the class object associated with this class type.

Returns:
the class object associated with this class type
Throws:
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.

Eclipse JDT
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.