KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > debug > core > IJavaClassType


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.debug.core;
12
13  
14 import org.eclipse.debug.core.DebugException;
15  
16 /**
17  * The class of an object on a Java debug target.
18  * <p>
19  * Clients are not intended to implement this interface.
20  * </p>
21  * @see IJavaValue
22  * @since 2.0
23  */

24 public interface IJavaClassType extends IJavaReferenceType {
25     
26     /**
27      * Returns a new instance of this class by invoking the
28      * constructor with the given signature and arguments in
29      * the specified thread. The given thread is resumed to perform this
30      * method invocation and suspends in its original location when
31      * this method invocation is complete. This method does not return
32      * until the method invocation is complete. Resuming the specified thread
33      * can result in breakpoints being hit, infinite loops, and deadlock.
34      *
35      * @param signature the JNI style signature of the method to be invoked
36      * @param args the arguments of the constructor, which can be
37      * <code>null</code> or empty if there are none
38      * @param thread the thread in which to invoke the constructor
39      * @return the result of invoking the constructor
40      * @exception DebugException if this method fails. Reasons include:<ul>
41      * <li>Failure communicating with the VM. The DebugException's
42      * status code contains the underlying exception responsible for
43      * the failure.</li>
44      * <li>This type does not implement the specified constructor</li>
45      * <li>An exception occurs while invoking the specified constructor</li>
46      * <li>The given thread is already performing a message send,
47      * (status code <code>IJavaThread.ERR_NESTED_METHOD_INVOCATION</code>)</li>
48      * <li>The given thread is not currently suspended
49      * (status code <code>IJavaThread.ERR_THREAD_NOT_SUSPENDED</code>)</li>
50      * <li>The given thread was explicitly suspended
51      * (status code <code>IJavaThread.ERR_INCOMPATIBLE_THREAD_STATE</code>)</li>
52      * </ul>
53      */

54     public IJavaObject newInstance(String JavaDoc signature, IJavaValue[] args, IJavaThread thread) throws DebugException;
55     
56     /**
57      * Returns the result of sending the specified message to this class
58      * with the given arguments in the specified thread (invokes a static
59      * method on this type). The given thread is resumed to perform this
60      * method invocation and suspends in its original location when this
61      * method invocation is complete. This method does not return until the
62      * method invocation is complete. Resuming the specified thread can
63      * result in breakpoints being hit, infinite loops, and deadlock.
64      *
65      * @param selector the selector of the method to be invoked
66      * @param signature the JNI style signature of the method to be invoked
67      * @param args the arguments of the method, which can be
68      * <code>null</code> or empty if there are none
69      * @param thread the thread in which to invoke the method
70      * @return the result of invoking the method
71      * @exception DebugException if this method fails. Reasons include:<ul>
72      * <li>Failure communicating with the VM. The DebugException's
73      * status code contains the underlying exception responsible for
74      * the failure.</li>
75      * <li>This object does not implement the specified method</li>
76      * <li>An exception occurs while invoking the specified method</li>
77      * <li>The given thread is already performing a message send,
78      * (status code <code>IJavaThread.ERR_NESTED_METHOD_INVOCATION</code>)</li>
79      * <li>The given thread is not currently suspended
80      * (status code <code>IJavaThread.ERR_THREAD_NOT_SUSPENDED</code>)</li>
81      * <li>The given thread was explicitly suspended
82      * (status code <code>IJavaThread.ERR_INCOMPATIBLE_THREAD_STATE</code>)</li>
83      * </ul>
84      */

85     public IJavaValue sendMessage(String JavaDoc selector, String JavaDoc signature, IJavaValue[] args, IJavaThread thread) throws DebugException;
86         
87     /**
88      * Returns the superclass of this class type, or <code>null</code>
89      * if no such class exists.
90      *
91      * @return the superclass of this class type, or <code>null</code>
92      * @exception DebugException if this method fails. Reasons include:
93      * <ul><li>Failure communicating with the VM. The DebugException's
94      * status code contains the underlying exception responsible for
95      * the failure.</li>
96      * </ul>
97      */

98     public IJavaClassType getSuperclass() throws DebugException;
99     
100     /**
101      * Returns the interface objects associated with the interfaces this class directly implements.
102      * Only those interfaces declared in the <code>implements</code> clause for this class are included.
103      *
104      * @return the interface objects associated with the interfaces this class directly implements
105      * @exception DebugException if this method fails. Reasons include:
106      * <ul><li>Failure communicating with the VM. The DebugException's
107      * status code contains the underlying exception responsible for
108      * the failure.</li>
109      * </ul>
110      * @since 3.0
111      */

112     public IJavaInterfaceType[] getInterfaces() throws DebugException;
113
114     /**
115      * Returns the interface objects associated with <em>all</em> interfaces this class implements,
116      * directly or indirectly.
117      *
118      * @return the interface objects associated with the interfaces this class directly implements,
119      * directly or indirectly
120      * @exception DebugException if this method fails. Reasons include:
121      * <ul><li>Failure communicating with the VM. The DebugException's
122      * status code contains the underlying exception responsible for
123      * the failure.</li>
124      * </ul>
125      * @since 3.0
126      */

127     public IJavaInterfaceType[] getAllInterfaces() throws DebugException;
128     
129     /**
130      * Returns whether this type is declared as a type safe enumeration.
131      *
132      * @return <code>true</code> if this type is a type safe enumeration,
133      * <code>false</code> otherwise.
134      * @exception DebugException if this method fails. Reasons include:
135      * <ul><li>Failure communicating with the VM. The DebugException's
136      * status code contains the underlying exception responsible for
137      * the failure.</li>
138      * </ul>
139      * @since 3.1
140      */

141     public boolean isEnum() throws DebugException;
142 }
143
144
Popular Tags