KickJava   Java API By Example, From Geeks To Geeks.

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


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 import org.eclipse.debug.core.DebugException;
14
15 /**
16  * Represents the type of an object in a virtual machine - including classes,
17  * interfaces and array types.
18  * <p>
19  * Clients are not intended to implement this interface.
20  * </p>
21  * @since 3.0
22  */

23 public interface IJavaReferenceType extends IJavaType {
24     
25     /**
26      * Returns a variable representing the static field in this type
27      * with the given name, or <code>null</code> if there is no
28      * field with the given name, or the name is ambiguous.
29      *
30      * @param name field name
31      * @return the variable representing the static field, or <code>null</code>
32      * @exception DebugException if this method fails. Reasons include:
33      * <ul><li>Failure communicating with the VM. The DebugException's
34      * status code contains the underlying exception responsible for
35      * the failure.</li>
36      * </ul>
37      */

38     public IJavaFieldVariable getField(String JavaDoc name) throws DebugException;
39     
40     /**
41      * Returns the class object associated with this type.
42      *
43      * @return the class object associated with this type
44      * @exception DebugException if this method fails. Reasons include:
45      * <ul><li>Failure communicating with the VM. The DebugException's
46      * status code contains the underlying exception responsible for
47      * the failure.</li>
48      * </ul>
49      */

50     public IJavaClassObject getClassObject() throws DebugException;
51     
52     /**
53      * Returns a collection of strata available for this type.
54      *
55      * @return a collection of strata available for this type
56      * @throws DebugException if unable to retrieve available strata
57      */

58     public String JavaDoc[] getAvailableStrata() throws DebugException;
59     
60     /**
61      * Returns the default stratum for this type.
62      *
63      * @return the default stratum for this type
64      * @throws DebugException if unable to retrieve the default stratum
65      */

66     public String JavaDoc getDefaultStratum() throws DebugException;
67     
68     /**
69      * Returns a collection of the names of the fields declared in this type.
70      *
71      * @return a collection of the names of the field declared in this type
72      * @throws DebugException if unable to retrieve declared field names
73      */

74     public String JavaDoc[] getDeclaredFieldNames() throws DebugException;
75     
76     /**
77      * Returns a collection of the names of all of the fields declared in this
78      * type, all of its super classes, implemented interfaces and super interfaces.
79      *
80      * @return a collection of the names of all of the fields declared in this
81      * type, all of its super classes, implemented interfaces and super interfaces
82      * @throws DebugException if unable to retrieve field names
83      */

84     public String JavaDoc[] getAllFieldNames() throws DebugException;
85     
86     /**
87      * Returns the class loader object that loaded the class corresponding to this
88      * type, or <code>null</code> if this type was loaded by the bootstrap loader.
89      *
90      * @return the class loader object that loaded the class corresponding to this
91      * type or <code>null</code>
92      * @throws DebugException
93      * @since 3.1
94      */

95     public IJavaObject getClassLoaderObject() throws DebugException;
96     
97     /**
98      * Returns the generic signature as defined in the JVM
99      * specification for this type.
100      * Returns <code>null</code> if this type is not a generic type.
101      *
102      * @return signature, or <code>null</code> if generic signature not available
103      * @exception DebugException if this method fails. Reasons include:
104      * <ul><li>Failure communicating with the VM. The DebugException's
105      * status code contains the underlying exception responsible for
106      * the failure.</li><ul>
107      * @since 3.1
108      */

109     public String JavaDoc getGenericSignature() throws DebugException;
110     
111     /**
112      * Returns the unqualified name of the source file corresponding to this type,
113      * or <code>null</code> if source name debug attribute is not present.
114      * The source name returned is based on this target's default stratum.
115      *
116      * @return unqualified source file name or <code>null</code>
117      * @throws DebugException if an exception occurs retrieving the source name
118      * @since 3.2
119      */

120     public String JavaDoc getSourceName() throws DebugException;
121     
122     /**
123      * Returns the unqualified names of the source files corresponding to this type in
124      * the specified stratum, or <code>null</code> if the source name debug attribute is
125      * not present.
126      *
127      * @return unqualified source file names or <code>null</code>
128      * @throws DebugException if an exception occurs retrieving the source name
129      * @since 3.2
130      */

131     public String JavaDoc[] getSourceNames(String JavaDoc stratum) throws DebugException;
132     
133     /**
134      * Returns the qualified names of the source files corresponding to this type in
135      * the specified stratum, or <code>null</code> if the source name debug attribute is
136      * not present.
137      *
138      * @return qualified source file names or <code>null</code>
139      * @throws DebugException if an exception occurs retrieving the source name
140      * @since 3.2
141      */

142     public String JavaDoc[] getSourcePaths(String JavaDoc stratum) throws DebugException;
143     
144     /**
145      * Retrieves and returns instances of this reference type.
146      *
147      * @param max the maximum number of instances to retrieve or 0 to retrieve all instances
148      * @return instances of this reference type
149      * @throws DebugException on failure
150      * @since 3.3
151      */

152     public IJavaObject[] getInstances(long max) throws DebugException;
153     
154 }
155
Popular Tags