17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package com.sun.jdi;
27
28 import java.util.List;
29 import java.util.Map;
30
31 import com.sun.jdi.event.EventQueue;
32 import com.sun.jdi.event.VMDisconnectEvent;
33
34 /**
35 * The type of an object in a target VM. ReferenceType encompasses
36 * classes, interfaces, and array types as defined in
37 * <cite>The Java™ Language Specification</cite>.
38 * All ReferenceType objects belong to one of the following
39 * subinterfaces:
40 * {@link ClassType} for classes,
41 * {@link InterfaceType} for interfaces, and
42 * {@link ArrayType} for arrays.
43 * Note that primitive classes (for example, the
44 * {@link ClassObjectReference#reflectedType() reflected type} of
45 * {@link java.lang.Integer#TYPE Integer.TYPE})
46 * are represented as ClassType.
47 * The VM creates Class objects for all three, so from the VM perspective,
48 * each ReferenceType maps to a distinct Class object.
49 * <p>
50 * ReferenceTypes can
51 * be obtained by querying a particular {@link ObjectReference} for its
52 * type or by getting a list of all reference types from the
53 * {@link VirtualMachine}.
54 * <p>
55 * ReferenceType provides access to static type information such as
56 * methods and fields and provides access to dynamic type
57 * information such as the corresponding Class object and the classloader.
79 * @author Gordon Hirsch
80 * @author James McIlree
81 * @since 1.3
82 */
83 public interface ReferenceType
84 extends Type, Comparable<ReferenceType>, Accessible
85 {
86 /**
87 * Returns the name of this {@code ReferenceType} object.
88 * The returned name is of the same form as the name returned by
89 * {@link Class#getName()}.
90 *
91 * @return a string containing the type name.
92 * @see Class#getName()
93 */
94 String name();
95
96 /**
97 * Gets the generic signature for this type if there is one.
98 * Generic signatures are described in the
99 * <cite>The Java™ Virtual Machine Specification</cite>.
100 *
101 * @return a string containing the generic signature, or <code>null</code>
102 * if there is no generic signature.
103 *
104 * @since 1.5
105 */
106 String genericSignature();
107
108 /**
109 * Gets the classloader object which loaded the class corresponding
110 * to this type.
111 *
112 * @return a {@link ClassLoaderReference} which mirrors the classloader,
113 * or <code>null</code> if the class was loaded through the bootstrap class
114 * loader.
115 */
116 ClassLoaderReference classLoader();
117
118 /**
119 * Gets the module object which contains the class corresponding
|
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package com.sun.jdi;
27
28 import java.util.List;
29 import java.util.Map;
30
31 import com.sun.jdi.event.EventQueue;
32 import com.sun.jdi.event.VMDisconnectEvent;
33
34 /**
35 * The type of an object in a target VM. ReferenceType encompasses
36 * classes, interfaces, and array types as defined in
37 * <cite>The Java Language Specification</cite>.
38 * All ReferenceType objects belong to one of the following
39 * subinterfaces:
40 * {@link ClassType} for classes,
41 * {@link InterfaceType} for interfaces, and
42 * {@link ArrayType} for arrays.
43 * Note that primitive classes (for example, the
44 * {@link ClassObjectReference#reflectedType() reflected type} of
45 * {@link java.lang.Integer#TYPE Integer.TYPE})
46 * are represented as ClassType.
47 * The VM creates Class objects for all three, so from the VM perspective,
48 * each ReferenceType maps to a distinct Class object.
49 * <p>
50 * ReferenceTypes can
51 * be obtained by querying a particular {@link ObjectReference} for its
52 * type or by getting a list of all reference types from the
53 * {@link VirtualMachine}.
54 * <p>
55 * ReferenceType provides access to static type information such as
56 * methods and fields and provides access to dynamic type
57 * information such as the corresponding Class object and the classloader.
79 * @author Gordon Hirsch
80 * @author James McIlree
81 * @since 1.3
82 */
83 public interface ReferenceType
84 extends Type, Comparable<ReferenceType>, Accessible
85 {
86 /**
87 * Returns the name of this {@code ReferenceType} object.
88 * The returned name is of the same form as the name returned by
89 * {@link Class#getName()}.
90 *
91 * @return a string containing the type name.
92 * @see Class#getName()
93 */
94 String name();
95
96 /**
97 * Gets the generic signature for this type if there is one.
98 * Generic signatures are described in the
99 * <cite>The Java Virtual Machine Specification</cite>.
100 *
101 * @return a string containing the generic signature, or <code>null</code>
102 * if there is no generic signature.
103 *
104 * @since 1.5
105 */
106 String genericSignature();
107
108 /**
109 * Gets the classloader object which loaded the class corresponding
110 * to this type.
111 *
112 * @return a {@link ClassLoaderReference} which mirrors the classloader,
113 * or <code>null</code> if the class was loaded through the bootstrap class
114 * loader.
115 */
116 ClassLoaderReference classLoader();
117
118 /**
119 * Gets the module object which contains the class corresponding
|