From: <fd...@us...> - 2007-08-26 11:11:51
|
Revision: 3433 http://jnode.svn.sourceforge.net/jnode/?rev=3433&view=rev Author: fduminy Date: 2007-08-26 00:53:04 -0700 (Sun, 26 Aug 2007) Log Message: ----------- openjdk integration Modified Paths: -------------- trunk/all/conf/full-plugin-list.xml trunk/core/.classpath Added Paths: ----------- trunk/core/descriptors/com.sun.tools.jdi.xml trunk/core/src/openjdk/com/com/sun/jdi/ trunk/core/src/openjdk/com/com/sun/jdi/AbsentInformationException.java trunk/core/src/openjdk/com/com/sun/jdi/Accessible.java trunk/core/src/openjdk/com/com/sun/jdi/ArrayReference.java trunk/core/src/openjdk/com/com/sun/jdi/ArrayType.java trunk/core/src/openjdk/com/com/sun/jdi/BooleanType.java trunk/core/src/openjdk/com/com/sun/jdi/BooleanValue.java trunk/core/src/openjdk/com/com/sun/jdi/Bootstrap.java trunk/core/src/openjdk/com/com/sun/jdi/ByteType.java trunk/core/src/openjdk/com/com/sun/jdi/ByteValue.java trunk/core/src/openjdk/com/com/sun/jdi/CharType.java trunk/core/src/openjdk/com/com/sun/jdi/CharValue.java trunk/core/src/openjdk/com/com/sun/jdi/ClassLoaderReference.java trunk/core/src/openjdk/com/com/sun/jdi/ClassNotLoadedException.java trunk/core/src/openjdk/com/com/sun/jdi/ClassNotPreparedException.java trunk/core/src/openjdk/com/com/sun/jdi/ClassObjectReference.java trunk/core/src/openjdk/com/com/sun/jdi/ClassType.java trunk/core/src/openjdk/com/com/sun/jdi/DoubleType.java trunk/core/src/openjdk/com/com/sun/jdi/DoubleValue.java trunk/core/src/openjdk/com/com/sun/jdi/Field.java trunk/core/src/openjdk/com/com/sun/jdi/FloatType.java trunk/core/src/openjdk/com/com/sun/jdi/FloatValue.java trunk/core/src/openjdk/com/com/sun/jdi/IncompatibleThreadStateException.java trunk/core/src/openjdk/com/com/sun/jdi/InconsistentDebugInfoException.java trunk/core/src/openjdk/com/com/sun/jdi/IntegerType.java trunk/core/src/openjdk/com/com/sun/jdi/IntegerValue.java trunk/core/src/openjdk/com/com/sun/jdi/InterfaceType.java trunk/core/src/openjdk/com/com/sun/jdi/InternalException.java trunk/core/src/openjdk/com/com/sun/jdi/InvalidCodeIndexException.java trunk/core/src/openjdk/com/com/sun/jdi/InvalidLineNumberException.java trunk/core/src/openjdk/com/com/sun/jdi/InvalidStackFrameException.java trunk/core/src/openjdk/com/com/sun/jdi/InvalidTypeException.java trunk/core/src/openjdk/com/com/sun/jdi/InvocationException.java trunk/core/src/openjdk/com/com/sun/jdi/JDIPermission.java trunk/core/src/openjdk/com/com/sun/jdi/LocalVariable.java trunk/core/src/openjdk/com/com/sun/jdi/Locatable.java trunk/core/src/openjdk/com/com/sun/jdi/Location.java trunk/core/src/openjdk/com/com/sun/jdi/LongType.java trunk/core/src/openjdk/com/com/sun/jdi/LongValue.java trunk/core/src/openjdk/com/com/sun/jdi/Method.java trunk/core/src/openjdk/com/com/sun/jdi/Mirror.java trunk/core/src/openjdk/com/com/sun/jdi/MonitorInfo.java trunk/core/src/openjdk/com/com/sun/jdi/NativeMethodException.java trunk/core/src/openjdk/com/com/sun/jdi/ObjectCollectedException.java trunk/core/src/openjdk/com/com/sun/jdi/ObjectReference.java trunk/core/src/openjdk/com/com/sun/jdi/PathSearchingVirtualMachine.java trunk/core/src/openjdk/com/com/sun/jdi/PrimitiveType.java trunk/core/src/openjdk/com/com/sun/jdi/PrimitiveValue.java trunk/core/src/openjdk/com/com/sun/jdi/ReferenceType.java trunk/core/src/openjdk/com/com/sun/jdi/ShortType.java trunk/core/src/openjdk/com/com/sun/jdi/ShortValue.java trunk/core/src/openjdk/com/com/sun/jdi/StackFrame.java trunk/core/src/openjdk/com/com/sun/jdi/StringReference.java trunk/core/src/openjdk/com/com/sun/jdi/ThreadGroupReference.java trunk/core/src/openjdk/com/com/sun/jdi/ThreadReference.java trunk/core/src/openjdk/com/com/sun/jdi/Type.java trunk/core/src/openjdk/com/com/sun/jdi/TypeComponent.java trunk/core/src/openjdk/com/com/sun/jdi/VMCannotBeModifiedException.java trunk/core/src/openjdk/com/com/sun/jdi/VMDisconnectedException.java trunk/core/src/openjdk/com/com/sun/jdi/VMMismatchException.java trunk/core/src/openjdk/com/com/sun/jdi/VMOutOfMemoryException.java trunk/core/src/openjdk/com/com/sun/jdi/Value.java trunk/core/src/openjdk/com/com/sun/jdi/VirtualMachine.java trunk/core/src/openjdk/com/com/sun/jdi/VirtualMachineManager.java trunk/core/src/openjdk/com/com/sun/jdi/VoidType.java trunk/core/src/openjdk/com/com/sun/jdi/VoidValue.java trunk/core/src/openjdk/com/com/sun/jdi/connect/ trunk/core/src/openjdk/com/com/sun/jdi/connect/AttachingConnector.java trunk/core/src/openjdk/com/com/sun/jdi/connect/Connector.java trunk/core/src/openjdk/com/com/sun/jdi/connect/IllegalConnectorArgumentsException.java trunk/core/src/openjdk/com/com/sun/jdi/connect/LaunchingConnector.java trunk/core/src/openjdk/com/com/sun/jdi/connect/ListeningConnector.java trunk/core/src/openjdk/com/com/sun/jdi/connect/Transport.java trunk/core/src/openjdk/com/com/sun/jdi/connect/TransportTimeoutException.java trunk/core/src/openjdk/com/com/sun/jdi/connect/VMStartException.java trunk/core/src/openjdk/com/com/sun/jdi/connect/package.html trunk/core/src/openjdk/com/com/sun/jdi/connect/spi/ trunk/core/src/openjdk/com/com/sun/jdi/connect/spi/ClosedConnectionException.java trunk/core/src/openjdk/com/com/sun/jdi/connect/spi/Connection.java trunk/core/src/openjdk/com/com/sun/jdi/connect/spi/TransportService.java trunk/core/src/openjdk/com/com/sun/jdi/connect/spi/package.html trunk/core/src/openjdk/com/com/sun/jdi/doc-files/ trunk/core/src/openjdk/com/com/sun/jdi/doc-files/signature.html trunk/core/src/openjdk/com/com/sun/jdi/event/ trunk/core/src/openjdk/com/com/sun/jdi/event/AccessWatchpointEvent.java trunk/core/src/openjdk/com/com/sun/jdi/event/BreakpointEvent.java trunk/core/src/openjdk/com/com/sun/jdi/event/ClassPrepareEvent.java trunk/core/src/openjdk/com/com/sun/jdi/event/ClassUnloadEvent.java trunk/core/src/openjdk/com/com/sun/jdi/event/Event.java trunk/core/src/openjdk/com/com/sun/jdi/event/EventIterator.java trunk/core/src/openjdk/com/com/sun/jdi/event/EventQueue.java trunk/core/src/openjdk/com/com/sun/jdi/event/EventSet.java trunk/core/src/openjdk/com/com/sun/jdi/event/ExceptionEvent.java trunk/core/src/openjdk/com/com/sun/jdi/event/LocatableEvent.java trunk/core/src/openjdk/com/com/sun/jdi/event/MethodEntryEvent.java trunk/core/src/openjdk/com/com/sun/jdi/event/MethodExitEvent.java trunk/core/src/openjdk/com/com/sun/jdi/event/ModificationWatchpointEvent.java trunk/core/src/openjdk/com/com/sun/jdi/event/MonitorContendedEnterEvent.java trunk/core/src/openjdk/com/com/sun/jdi/event/MonitorContendedEnteredEvent.java trunk/core/src/openjdk/com/com/sun/jdi/event/MonitorWaitEvent.java trunk/core/src/openjdk/com/com/sun/jdi/event/MonitorWaitedEvent.java trunk/core/src/openjdk/com/com/sun/jdi/event/StepEvent.java trunk/core/src/openjdk/com/com/sun/jdi/event/ThreadDeathEvent.java trunk/core/src/openjdk/com/com/sun/jdi/event/ThreadStartEvent.java trunk/core/src/openjdk/com/com/sun/jdi/event/VMDeathEvent.java trunk/core/src/openjdk/com/com/sun/jdi/event/VMDisconnectEvent.java trunk/core/src/openjdk/com/com/sun/jdi/event/VMStartEvent.java trunk/core/src/openjdk/com/com/sun/jdi/event/WatchpointEvent.java trunk/core/src/openjdk/com/com/sun/jdi/event/package.html trunk/core/src/openjdk/com/com/sun/jdi/package.html trunk/core/src/openjdk/com/com/sun/jdi/request/ trunk/core/src/openjdk/com/com/sun/jdi/request/AccessWatchpointRequest.java trunk/core/src/openjdk/com/com/sun/jdi/request/BreakpointRequest.java trunk/core/src/openjdk/com/com/sun/jdi/request/ClassPrepareRequest.java trunk/core/src/openjdk/com/com/sun/jdi/request/ClassUnloadRequest.java trunk/core/src/openjdk/com/com/sun/jdi/request/DuplicateRequestException.java trunk/core/src/openjdk/com/com/sun/jdi/request/EventRequest.java trunk/core/src/openjdk/com/com/sun/jdi/request/EventRequestManager.java trunk/core/src/openjdk/com/com/sun/jdi/request/ExceptionRequest.java trunk/core/src/openjdk/com/com/sun/jdi/request/InvalidRequestStateException.java trunk/core/src/openjdk/com/com/sun/jdi/request/MethodEntryRequest.java trunk/core/src/openjdk/com/com/sun/jdi/request/MethodExitRequest.java trunk/core/src/openjdk/com/com/sun/jdi/request/ModificationWatchpointRequest.java trunk/core/src/openjdk/com/com/sun/jdi/request/MonitorContendedEnterRequest.java trunk/core/src/openjdk/com/com/sun/jdi/request/MonitorContendedEnteredRequest.java trunk/core/src/openjdk/com/com/sun/jdi/request/MonitorWaitRequest.java trunk/core/src/openjdk/com/com/sun/jdi/request/MonitorWaitedRequest.java trunk/core/src/openjdk/com/com/sun/jdi/request/StepRequest.java trunk/core/src/openjdk/com/com/sun/jdi/request/ThreadDeathRequest.java trunk/core/src/openjdk/com/com/sun/jdi/request/ThreadStartRequest.java trunk/core/src/openjdk/com/com/sun/jdi/request/VMDeathRequest.java trunk/core/src/openjdk/com/com/sun/jdi/request/WatchpointRequest.java trunk/core/src/openjdk/com/com/sun/jdi/request/package.html trunk/core/src/openjdk/com/com/sun/tools/attach/ trunk/core/src/openjdk/com/com/sun/tools/attach/AgentInitializationException.java trunk/core/src/openjdk/com/com/sun/tools/attach/AgentLoadException.java trunk/core/src/openjdk/com/com/sun/tools/attach/AttachNotSupportedException.java trunk/core/src/openjdk/com/com/sun/tools/attach/AttachPermission.java trunk/core/src/openjdk/com/com/sun/tools/attach/VirtualMachine.java trunk/core/src/openjdk/com/com/sun/tools/attach/VirtualMachineDescriptor.java trunk/core/src/openjdk/com/com/sun/tools/attach/package.html trunk/core/src/openjdk/com/com/sun/tools/attach/spi/ trunk/core/src/openjdk/com/com/sun/tools/attach/spi/AttachProvider.java trunk/core/src/openjdk/com/com/sun/tools/attach/spi/package.html trunk/core/src/openjdk/com/com/sun/tools/jdi/JDWP.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/ trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/AbstractCommandNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/AbstractGroupNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/AbstractNamedNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/AbstractSimpleNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/AbstractSimpleTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/AbstractTypeListNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/AbstractTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/AltNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/ArrayObjectTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/ArrayRegionTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/ArrayTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/BooleanTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/ByteTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/ClassLoaderObjectTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/ClassObjectTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/ClassTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/CommandNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/CommandSetNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/CommentNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/ConstantNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/ConstantSetNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/Context.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/ErrorNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/ErrorSetNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/EventNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/FieldTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/FrameTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/GroupNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/IntTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/InterfaceTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/LocationTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/LongTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/Main.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/MethodTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/NameNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/NameValueNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/Node.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/ObjectTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/OutNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/Parse.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/ReferenceIDTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/ReferenceTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/RepeatNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/ReplyNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/RootNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/SelectNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/StringObjectTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/StringTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/TaggedObjectTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/ThreadGroupObjectTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/ThreadObjectTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/TypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/UntaggedValueTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/ValueTypeNode.java trunk/core/src/openjdk/com/com/sun/tools/jdwpgen/jdwp.spec Modified: trunk/all/conf/full-plugin-list.xml =================================================================== --- trunk/all/conf/full-plugin-list.xml 2007-08-25 20:54:26 UTC (rev 3432) +++ trunk/all/conf/full-plugin-list.xml 2007-08-26 07:53:04 UTC (rev 3433) @@ -10,6 +10,7 @@ <plugin id="sun.tools"/> <plugin id="javax.ext.tools"/> <plugin id="com.sun.tools.javac"/> + <plugin id="com.sun.tools.jdi"/> <plugin id="org.jnode.install"/> Modified: trunk/core/.classpath =================================================================== --- trunk/core/.classpath 2007-08-25 20:54:26 UTC (rev 3432) +++ trunk/core/.classpath 2007-08-26 07:53:04 UTC (rev 3433) @@ -7,7 +7,7 @@ <classpathentry kind="src" path="src/classpath/gnu"/> <classpathentry kind="src" path="src/openjdk/java"/> <classpathentry kind="src" path="src/openjdk/javax"/> - <classpathentry kind="src" path="src/openjdk/sun"/> + <classpathentry excluding="**/*-template.java" kind="src" path="src/openjdk/sun"/> <classpathentry kind="src" path="src/classpath/tools"/> <classpathentry kind="src" path="src/classpath/java"/> <classpathentry kind="src" path="src/classpath/javax"/> Added: trunk/core/descriptors/com.sun.tools.jdi.xml =================================================================== --- trunk/core/descriptors/com.sun.tools.jdi.xml (rev 0) +++ trunk/core/descriptors/com.sun.tools.jdi.xml 2007-08-26 07:53:04 UTC (rev 3433) @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plugin SYSTEM "jnode.dtd"> + +<plugin id="com.sun.tools.jdi" + name="The Java Debugger Interface from Sun" + version="@VERSION@" + plugin-version="@VERSION@" + provider-name="Sun Microsystems" + provider-url="http://sun.com" + license-name="classpath"> + + <runtime> + <library name="jnode-core.jar"> + <export name="com.sun.jdi.*"/> + <export name="com.sun.jdi.connect.*"/> + <export name="com.sun.jdi.connect.spi.*"/> + <export name="com.sun.jdi.event.*"/> + <export name="com.sun.jdi.request.*"/> + + <export name="com.sun.tools.attach.*"/> + <export name="com.sun.tools.attach.spi.*"/> + <export name="com.sun.tools.jdi.*"/> + </library> + </runtime> +</plugin> Added: trunk/core/src/openjdk/com/com/sun/jdi/AbsentInformationException.java =================================================================== --- trunk/core/src/openjdk/com/com/sun/jdi/AbsentInformationException.java (rev 0) +++ trunk/core/src/openjdk/com/com/sun/jdi/AbsentInformationException.java 2007-08-26 07:53:04 UTC (rev 3433) @@ -0,0 +1,45 @@ +/* + * Copyright 1998-1999 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +package com.sun.jdi; + +/** + * Thrown to indicate line number or variable information is not available. + * + * @author Gordon Hirsch + * @since 1.3 + */ +public class AbsentInformationException extends Exception +{ + public AbsentInformationException() + { + super(); + } + + public AbsentInformationException(String s) + { + super(s); + } +} Added: trunk/core/src/openjdk/com/com/sun/jdi/Accessible.java =================================================================== --- trunk/core/src/openjdk/com/com/sun/jdi/Accessible.java (rev 0) +++ trunk/core/src/openjdk/com/com/sun/jdi/Accessible.java 2007-08-26 07:53:04 UTC (rev 3433) @@ -0,0 +1,110 @@ +/* + * Copyright 1998-2001 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +package com.sun.jdi; + +/** + * Provides information on the accessibility of a type or type component. + * Mirrors for program elements which allow an + * an access specifier (private, protected, public) provide information + * on that part of the declaration through this interface. + * + * @author Robert Field + * @author Gordon Hirsch + * @author James McIlree + * @since 1.3 + */ +public interface Accessible { + + /** + * Returns the Java<sup><font size=-2>TM</font></sup> + * programming language modifiers, encoded in an integer. + * <p> + * The modifier encodings are defined in the + * <a href="http://java.sun.com/docs/books/vmspec/">Java Virtual Machine + * Specification</a>, in the <code>access_flag</code> tables for + * <a href="http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#75734">classes</a>, + * <a href="http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#88358">fields</a>, and + * <a href="http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#75568">methods</a>. + */ + public int modifiers(); + + /** + * Determines if this object mirrors a private item. + * For {@link ArrayType}, the return value depends on the + * array component type. For primitive arrays the return value + * is always false. For object arrays, the return value is the + * same as would be returned for the component type. + * For primitive classes, such as {@link java.lang.Integer#TYPE}, + * the return value is always false. + * + * @return <code>true</code> for items with private access; + * <code>false</code> otherwise. + */ + boolean isPrivate(); + + /** + * Determines if this object mirrors a package private item. + * A package private item is declared with no access specifier. + * For {@link ArrayType}, the return value depends on the + * array component type. For primitive arrays the return value + * is always false. For object arrays, the return value is the + * same as would be returned for the component type. + * For primitive classes, such as {@link java.lang.Integer#TYPE}, + * the return value is always false. + * + * @return <code>true</code> for items with package private access; + * <code>false</code> otherwise. + */ + boolean isPackagePrivate(); + + /** + * Determines if this object mirrors a protected item. + * For {@link ArrayType}, the return value depends on the + * array component type. For primitive arrays the return value + * is always false. For object arrays, the return value is the + * same as would be returned for the component type. + * For primitive classes, such as {@link java.lang.Integer#TYPE}, + * the return value is always false. + * + * @return <code>true</code> for items with private access; + * <code>false</code> otherwise. + */ + boolean isProtected(); + + /** + * Determines if this object mirrors a public item. + * For {@link ArrayType}, the return value depends on the + * array component type. For primitive arrays the return value + * is always true. For object arrays, the return value is the + * same as would be returned for the component type. + * For primitive classes, such as {@link java.lang.Integer#TYPE}, + * the return value is always true. + * + * @return <code>true</code> for items with public access; + * <code>false</code> otherwise. + */ + boolean isPublic(); +} Added: trunk/core/src/openjdk/com/com/sun/jdi/ArrayReference.java =================================================================== --- trunk/core/src/openjdk/com/com/sun/jdi/ArrayReference.java (rev 0) +++ trunk/core/src/openjdk/com/com/sun/jdi/ArrayReference.java 2007-08-26 07:53:04 UTC (rev 3433) @@ -0,0 +1,210 @@ +/* + * Copyright 1998-2004 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +package com.sun.jdi; + +import java.util.List; + +/** + * Provides access to an array object and its components in the target VM. + * Each array component is mirrored by a {@link Value} object. + * The array components, in aggregate, are placed in {@link java.util.List} + * objects instead of arrays for consistency with the rest of the API and + * for interoperability with other APIs. + * + * @author Robert Field + * @author Gordon Hirsch + * @author James McIlree + * @since 1.3 + */ +public interface ArrayReference extends ObjectReference { + + /** + * Returns the number of components in this array. + * + * @return the integer count of components in this array. + */ + int length(); + + /** + * Returns an array component value. + * + * @param index the index of the component to retrieve + * @return the {@link Value} at the given index. + * @throws java.lang.IndexOutOfBoundsException if + * <CODE><I>index</I></CODE> is outside the range of this array, + * that is, if either of the following are true: + * <PRE> + * <I>index</I> < 0 + * <I>index</I> >= {@link #length() length()} </PRE> + */ + Value getValue(int index); + + /** + * Returns all of the components in this array. + * + * @return a list of {@link Value} objects, one for each array + * component ordered by array index. For zero length arrays, + * an empty list is returned. + */ + List<Value> getValues(); + + /** + * Returns a range of array components. + * + * @param index the index of the first component to retrieve + * @param length the number of components to retrieve, or -1 to + * retrieve all components to the end of this array. + * @return a list of {@link Value} objects, one for each requested + * array component ordered by array index. When there are + * no elements in the specified range (e.g. + * <CODE><I>length</I></CODE> is zero) an empty list is returned + * + * @throws java.lang.IndexOutOfBoundsException if the range + * specified with <CODE><I>index</I></CODE> and + * <CODE><I>length</I></CODE> is not within the range of the array, + * that is, if either of the following are true: + * <PRE> + * <I>index</I> < 0 + * <I>index</I> > {@link #length() length()} </PRE> + * or if <CODE><I>length</I> != -1</CODE> and + * either of the following are true: + * <PRE> + * <I>length</I> < 0 + * <I>index</I> + <I>length</I> > {@link #length() length()}</PRE> + */ + List<Value> getValues(int index, int length); + + /** + * Replaces an array component with another value. + * <p> + * Object values must be assignment compatible with the component type + * (This implies that the component type must be loaded through the + * declaring class's class loader). Primitive values must be + * either assignment compatible with the component type or must be + * convertible to the component type without loss of information. + * See JLS section 5.2 for more information on assignment + * compatibility. + * + * @param value the new value + * @param index the index of the component to set + * @throws java.lang.IndexOutOfBoundsException if + * <CODE><I>index</I></CODE> is outside the range of this array, + * that is, if either of the following are true: + * <PRE> + * <I>index</I> < 0 + * <I>index</I> >= {@link #length() length()} </PRE> + * @throws InvalidTypeException if the type of <CODE><I>value</I></CODE> + * is not compatible with the declared type of array components. + * @throws ClassNotLoadedException if the array component type + * has not yet been loaded + * through the appropriate class loader. + * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}. + * + * @see ArrayType#componentType() + */ + void setValue(int index, Value value) + throws InvalidTypeException, + ClassNotLoadedException; + + /** + * Replaces all array components with other values. If the given + * list is larger in size than the array, the values at the + * end of the list are ignored. + * <p> + * Object values must be assignment compatible with the element type + * (This implies that the component type must be loaded through the + * enclosing class's class loader). Primitive values must be + * either assignment compatible with the component type or must be + * convertible to the component type without loss of information. + * See JLS section 5.2 for more information on assignment + * compatibility. + * + * @param values a list of {@link Value} objects to be placed + * in this array. If <CODE><I>values</I>.size()</CODE> is + * less that the length of the array, the first + * <CODE><I>values</I>.size()</CODE> elements are set. + * @throws InvalidTypeException if any of the + * new <CODE><I>values</I></CODE> + * is not compatible with the declared type of array components. + * @throws ClassNotLoadedException if the array component + * type has not yet been loaded + * through the appropriate class loader. + * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}. + * + * @see ArrayType#componentType() + */ + void setValues(List<? extends Value> values) + throws InvalidTypeException, + ClassNotLoadedException; + + /** + * Replaces a range of array components with other values. + * <p> + * Object values must be assignment compatible with the component type + * (This implies that the component type must be loaded through the + * enclosing class's class loader). Primitive values must be + * either assignment compatible with the component type or must be + * convertible to the component type without loss of information. + * See JLS section 5.2 for more information on assignment + * compatibility. + * + * @param index the index of the first component to set. + * @param values a list of {@link Value} objects to be placed + * in this array. + * @param srcIndex the index of the first source value to use. + * @param length the number of components to set, or -1 to set + * all components to the end of this array or the end of + * <CODE><I>values</I></CODE> (whichever comes first). + * @throws InvalidTypeException if any element of + * <CODE><I>values</I></CODE> + * is not compatible with the declared type of array components. + * @throws java.lang.IndexOutOfBoundsException if the + * array range specified with + * <CODE><I>index</I></CODE> and <CODE><I>length</I></CODE> + * is not within the range of the array, + * or if the source range specified with + * <CODE><I>srcIndex</I></CODE> and <CODE><I>length</I></CODE> + * is not within <CODE><I>values</I></CODE>, + * that is, if any of the following are true: + * <PRE> + * <I>index</I> < 0 + * <I>index</I> > {@link #length() length()} + * <I>srcIndex</I> < 0 + * <I>srcIndex</I> > <I>values</I>.size() </PRE> + * or if <CODE><I>length</I> != -1</CODE> and any of the + * following are true: + * <PRE> + * <I>length</I> < 0 + * <I>index</I> + <I>length</I> > {@link #length() length()} + * <I>srcIndex</I> + <I>length</I> > <I>values</I>.size() </PRE> + * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}. + * @see ArrayType#componentType() + */ + void setValues(int index, List<? extends Value> values, int srcIndex, int length) + throws InvalidTypeException, + ClassNotLoadedException; +} + Added: trunk/core/src/openjdk/com/com/sun/jdi/ArrayType.java =================================================================== --- trunk/core/src/openjdk/com/com/sun/jdi/ArrayType.java (rev 0) +++ trunk/core/src/openjdk/com/com/sun/jdi/ArrayType.java 2007-08-26 07:53:04 UTC (rev 3433) @@ -0,0 +1,99 @@ +/* + * Copyright 1998-2003 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +package com.sun.jdi; + +import java.util.List; + +/** + * Provides access to the class of an array and the type of + * its components in the target VM. + * + * @see ArrayReference + * + * @author Robert Field + * @author Gordon Hirsch + * @author James McIlree + * @since 1.3 + */ +public interface ArrayType extends ReferenceType { + + /** + * Creates a new instance of this array class in the target VM. + * The array is created with the given length and each component + * is initialized to is standard default value. + * + * @param length the number of components in the new array + * @return the newly created {@link ArrayReference} mirroring + * the new object in the target VM. + * + * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}. + */ + ArrayReference newInstance(int length); + + /** + * Gets the JNI signature of the components of this + * array class. The signature + * describes the declared type of the components. If the components + * are objects, their actual type in a particular run-time context + * may be a subclass of the declared class. + * + * @return a string containing the JNI signature of array components. + */ + String componentSignature(); + + /** + * Returns a text representation of the component + * type of this array. + * + * @return a text representation of the component type. + */ + String componentTypeName(); + + /** + * Returns the component type of this array, + * as specified in the array declaration. + * <P> + * Note: The component type of a array will always be + * created or loaded before the array - see the + * <a href="http://java.sun.com/docs/books/vmspec/">Java Virtual + * Machine Specification</a>, section + * <a href="http://java.sun.com/docs/books/vmspec/2nd-edition/html/ConstantPool.doc.html#79473">5.3.3 + * Creating Array Classes</a>. + * However, although the component type will be loaded it may + * not yet be prepared, in which case the type will be returned + * but attempts to perform some operations on the returned type + * (e.g. {@link ReferenceType#fields() fields()}) will throw + * a {@link ClassNotPreparedException}. + * Use {@link ReferenceType#isPrepared()} to determine if + * a reference type is prepared. + * + * @see Type + * @see Field#type() Field.type() - for usage examples + * @return the {@link Type} of this array's components. + */ + Type componentType() throws ClassNotLoadedException; +} + Added: trunk/core/src/openjdk/com/com/sun/jdi/BooleanType.java =================================================================== --- trunk/core/src/openjdk/com/com/sun/jdi/BooleanType.java (rev 0) +++ trunk/core/src/openjdk/com/com/sun/jdi/BooleanType.java 2007-08-26 07:53:04 UTC (rev 3433) @@ -0,0 +1,40 @@ +/* + * Copyright 1998-1999 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +package com.sun.jdi; + +/** + * The type of all primitive <code>boolean</code> values + * accessed in the target VM. Calls to {@link Value#type} will return an + * implementor of this interface. + * + * @see BooleanValue + * + * @author James McIlree + * @since 1.3 + */ +public interface BooleanType extends PrimitiveType { +} + Added: trunk/core/src/openjdk/com/com/sun/jdi/BooleanValue.java =================================================================== --- trunk/core/src/openjdk/com/com/sun/jdi/BooleanValue.java (rev 0) +++ trunk/core/src/openjdk/com/com/sun/jdi/BooleanValue.java 2007-08-26 07:53:04 UTC (rev 3433) @@ -0,0 +1,62 @@ +/* + * Copyright 1998-1999 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +package com.sun.jdi; + +/** + * Provides access to a primitive <code>boolean</code> value in + * the target VM. + * + * @author Robert Field + * @author Gordon Hirsch + * @author James McIlree + * @since 1.3 + */ +public interface BooleanValue extends PrimitiveValue +{ + /** + * Returns this BooleanValue as a boolean. + * + * @return the <code>boolean</code> mirrored by this object. + */ + boolean value(); + + /** + * Compares the specified Object with this BooleanValue for equality. + * + * @return true if the Object is a BooleanValue and if applying "==" + * to the two mirrored primitives would evaluate to true; false + * otherwise. + */ + boolean equals(Object obj); + + /** + * Returns the hash code value for this BooleanValue. + * + * @return the integer hash code + */ + int hashCode(); +} + Added: trunk/core/src/openjdk/com/com/sun/jdi/Bootstrap.java =================================================================== --- trunk/core/src/openjdk/com/com/sun/jdi/Bootstrap.java (rev 0) +++ trunk/core/src/openjdk/com/com/sun/jdi/Bootstrap.java 2007-08-26 07:53:04 UTC (rev 3433) @@ -0,0 +1,56 @@ +/* + * Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +package com.sun.jdi; + +/** + * Initial class that provides access to the default implementation + * of JDI interfaces. A debugger application uses this class to access the + * single instance of the {@link VirtualMachineManager} interface. + * + * @author Gordon Hirsch + * @since 1.3 + */ + +public class Bootstrap extends Object { + + /** + * Returns the virtual machine manager. + * + * <p> May throw an unspecified error if initialization of the + * {@link com.sun.jdi.VirtualMachineManager} fails or if + * the virtual machine manager is unable to locate or create + * any {@link com.sun.jdi.connect.Connector Connectors}. </p> + * <p> + * @throws java.lang.SecurityException if a security manager has been + * installed and it denies {@link JDIPermission} + * <tt>("virtualMachineManager")</tt> or other unspecified + * permissions required by the implementation. + * </p> + */ + static public synchronized VirtualMachineManager virtualMachineManager() { + return com.sun.tools.jdi.VirtualMachineManagerImpl.virtualMachineManager(); + } +} Added: trunk/core/src/openjdk/com/com/sun/jdi/ByteType.java =================================================================== --- trunk/core/src/openjdk/com/com/sun/jdi/ByteType.java (rev 0) +++ trunk/core/src/openjdk/com/com/sun/jdi/ByteType.java 2007-08-26 07:53:04 UTC (rev 3433) @@ -0,0 +1,41 @@ +/* + * Copyright 1998-1999 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +package com.sun.jdi; + +/** + * The type of all primitive byte values accessed in + * the target VM. Calls to {@link Value#type} will return an + * implementor of this interface. + * + * @see ByteValue + * + * @author James McIlree + * @since 1.3 + */ +public interface ByteType extends PrimitiveType +{ +} + Added: trunk/core/src/openjdk/com/com/sun/jdi/ByteValue.java =================================================================== --- trunk/core/src/openjdk/com/com/sun/jdi/ByteValue.java (rev 0) +++ trunk/core/src/openjdk/com/com/sun/jdi/ByteValue.java 2007-08-26 07:53:04 UTC (rev 3433) @@ -0,0 +1,61 @@ +/* + * Copyright 1998-2004 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +package com.sun.jdi; + +/** + * Provides access to a primitive <code>byte</code> value in the target VM. + * + * @author Robert Field + * @author Gordon Hirsch + * @author James McIlree + * @since 1.3 + */ +public interface ByteValue extends PrimitiveValue, Comparable<ByteValue> +{ + /** + * Returns this ByteValue as a <code>byte</code>. + * + * @return the <code>byte</code> mirrored by this object. + */ + byte value(); + + /** + * Compares the specified Object with this ByteValue for equality. + * + * @return true if the Object is a ByteValue and if applying "==" + * to the two mirrored primitives would evaluate to true; false + * otherwise. + */ + boolean equals(Object obj); + + /** + * Returns the hash code value for this BooleanValue. + * + * @return the integer hash code + */ + int hashCode(); +} + Added: trunk/core/src/openjdk/com/com/sun/jdi/CharType.java =================================================================== --- trunk/core/src/openjdk/com/com/sun/jdi/CharType.java (rev 0) +++ trunk/core/src/openjdk/com/com/sun/jdi/CharType.java 2007-08-26 07:53:04 UTC (rev 3433) @@ -0,0 +1,41 @@ +/* + * Copyright 1998-1999 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +package com.sun.jdi; + +/** + * The type of all primitive char values accessed in + * the target VM. Calls to {@link Value#type} will return an + * implementor of this interface. + * + * @see CharValue + * + * @author James McIlree + * @since 1.3 + */ +public interface CharType extends PrimitiveType +{ +} + Added: trunk/core/src/openjdk/com/com/sun/jdi/CharValue.java =================================================================== --- trunk/core/src/openjdk/com/com/sun/jdi/CharValue.java (rev 0) +++ trunk/core/src/openjdk/com/com/sun/jdi/CharValue.java 2007-08-26 07:53:04 UTC (rev 3433) @@ -0,0 +1,62 @@ +/* + * Copyright 1998-2004 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +package com.sun.jdi; + +/** + * Provides access to a primitive <code>char</code> value in + * the target VM. + * + * @author Robert Field + * @author Gordon Hirsch + * @author James McIlree + * @since 1.3 + */ +public interface CharValue extends PrimitiveValue, Comparable<CharValue> +{ + /** + * Returns this CharValue as a <code>char</code>. + * + * @return the <code>char</code> mirrored by this object. + */ + char value(); + + /** + * Compares the specified Object with this CharValue for equality. + * + * @return true if the Object is a CharValue and if applying "==" + * to the two mirrored primitives would evaluate to true; false + * otherwise. + */ + boolean equals(Object obj); + + /** + * Returns the hash code value for this CharValue. + * + * @return the integer hash code + */ + int hashCode(); +} + Added: trunk/core/src/openjdk/com/com/sun/jdi/ClassLoaderReference.java =================================================================== --- trunk/core/src/openjdk/com/com/sun/jdi/ClassLoaderReference.java (rev 0) +++ trunk/core/src/openjdk/com/com/sun/jdi/ClassLoaderReference.java 2007-08-26 07:53:04 UTC (rev 3433) @@ -0,0 +1,96 @@ +/* + * Copyright 1998-2004 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +package com.sun.jdi; + +import java.util.List; + +/** + * A class loader object from the target VM. + * A ClassLoaderReference is an {@link ObjectReference} with additional + * access to classloader-specific information from the target VM. Instances + * ClassLoaderReference are obtained through calls to + * {@link ReferenceType#classLoader} + * + * @see ObjectReference + * + * @author Gordon Hirsch + * @since 1.3 + */ +public interface ClassLoaderReference extends ObjectReference { + + /** + * Returns a list of all loaded classes that were defined by this + * class loader. No ordering of this list guaranteed. + * <P> + * The returned list will include reference types + * loaded at least to the point of preparation and + * types (like array) for which preparation is + * not defined. + * + * @return a List of {@link ReferenceType} objects mirroring types + * loaded by this class loader. The list has length 0 if no types + * have been defined by this classloader. + */ + List<ReferenceType> definedClasses(); + + /** + * Returns a list of all classes for which this class loader has + * been recorded as the initiating loader in the target VM. + * The list contains ReferenceTypes defined directly by this loader + * (as returned by {@link #definedClasses}) and any types for which + * loading was delegated by this class loader to another class loader. + * <p> + * The visible class list has useful properties with respect to + * the type namespace. A particular type name will occur at most + * once in the list. Each field or variable declared with that + * type name in a class defined by + * this class loader must be resolved to that single type. + * <p> + * No ordering of the returned list is guaranteed. + * <p> + * See the revised + * <a href="http://java.sun.com/docs/books/vmspec/">Java + * Virtual Machine Specification</a> section + * <a href="http://java.sun.com/docs/books/vmspec/2nd-edition/html/ConstantPool.doc.html#72007">5.3 + * Creation and Loading</a> + * for more information on the initiating classloader. + * <p> + * Note that unlike {@link #definedClasses()} + * and {@link VirtualMachine#allClasses()}, + * some of the returned reference types may not be prepared. + * Attempts to perform some operations on unprepared reference types + * (e.g. {@link ReferenceType#fields() fields()}) will throw + * a {@link ClassNotPreparedException}. + * Use {@link ReferenceType#isPrepared()} to determine if + * a reference type is prepared. + * + * @return a List of {@link ReferenceType} objects mirroring classes + * initiated by this class loader. The list has length 0 if no classes + * are visible to this classloader. + */ + List<ReferenceType> visibleClasses(); +} + Added: trunk/core/src/openjdk/com/com/sun/jdi/ClassNotLoadedException.java =================================================================== --- trunk/core/src/openjdk/com/com/sun/jdi/ClassNotLoadedException.java (rev 0) +++ trunk/core/src/openjdk/com/com/sun/jdi/ClassNotLoadedException.java 2007-08-26 07:53:04 UTC (rev 3433) @@ -0,0 +1,87 @@ +/* + * Copyright 1998-2001 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +package com.sun.jdi; + +/** + * Thrown to indicate that the requested class has + * not yet been loaded through the appropriate class loader. + * <p> + * Due to the lazy class linking performed by many VMs, it is + * possible for a field or variable to be visible in a program + * before the associated class is loaded. Until the class is loaded + * all that is available is a signature string. If an attempt is made to + * set the value of such a field or variable from JDI, the appropriate + * type checking cannot be done because the destination class has not been + * loaded. The same is true for the element class of array elements. + * <p> + * It is not advisable to solve this problem by attempting a class load on + * the fly in this case. There are two problems in having the debugger load + * a class instead of waiting for it to load over the normal course + * of events. + * <ul> + * <li>There can be no guarantee that running the appropriate class + * loader won't cause a deadlock in loading the + * class. Class loaders can consist of arbitrary + * Java<sup><font size=-2>TM</font></sup> programming language code and the + * class loading methods are usually synchronized. Most of the work + * done by a debugger happens when threads are suspended. If another + * application thread is suspended within the same class loader, + * a deadlock is very possible. + * <li>Changi... [truncated message content] |