< prev index next >

src/jdk.jdi/share/classes/com/sun/jdi/ClassType.java

Print this page


   1 /*
   2  * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  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


 200      * Only the specified thread will be resumed (as described for all
 201      * threads above). Upon completion of a single threaded invoke, the invoking thread
 202      * will be suspended once again. Note that any threads started during
 203      * the single threaded invocation will not be suspended when the
 204      * invocation completes.
 205      * <p>
 206      * If the target VM is disconnected during the invoke (for example, through
 207      * {@link VirtualMachine#dispose}) the method invocation continues.
 208      *
 209      * @param thread the thread in which to invoke.
 210      * @param method the {@link Method} to invoke.
 211      * @param arguments the list of {@link Value} arguments bound to the
 212      * invoked method. Values from the list are assigned to arguments
 213      * in the order they appear in the method signature.
 214      * @param options the integer bit flag options.
 215      * @return a {@link Value} mirror of the invoked method's return value.
 216      * @throws java.lang.IllegalArgumentException if the method is not
 217      * a member of this class or a superclass, if the size of the argument list
 218      * does not match the number of declared arguments for the method, or
 219      * if the method is an initializer, constructor or static intializer.
 220      * @throws {@link InvalidTypeException} if any argument in the
 221      * argument list is not assignable to the corresponding method argument
 222      * type.
 223      * @throws ClassNotLoadedException if any argument type has not yet been loaded
 224      * through the appropriate class loader.
 225      * @throws IncompatibleThreadStateException if the specified thread has not
 226      * been suspended by an event.
 227      * @throws InvocationException if the method invocation resulted in
 228      * an exception in the target VM.
 229      * @throws InvalidTypeException If the arguments do not meet this requirement --
 230      *         Object arguments must be assignment compatible with the argument
 231      *         type.  This implies that the argument type must be
 232      *         loaded through the enclosing class' class loader.
 233      *         Primitive arguments must be either assignment compatible with the
 234      *         argument type or must be convertible to the argument type without loss
 235      *         of information. See JLS section 5.2 for more information on assignment
 236      *         compatibility.
 237      * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}.
 238      */
 239     Value invokeMethod(ThreadReference thread, Method method,
 240                        List<? extends Value> arguments, int options)
 241                                    throws InvalidTypeException,
 242                                           ClassNotLoadedException,


 305      * threads above). Upon completion of a single threaded invoke, the invoking thread
 306      * will be suspended once again. Note that any threads started during
 307      * the single threaded invocation will not be suspended when the
 308      * invocation completes.
 309      * <p>
 310      * If the target VM is disconnected during the invoke (for example, through
 311      * {@link VirtualMachine#dispose}) the method invocation continues.
 312      *
 313      * @param thread the thread in which to invoke.
 314      * @param method the constructor {@link Method} to invoke.
 315      * @param arguments the list of {@link Value} arguments bound to the
 316      * invoked constructor. Values from the list are assigned to arguments
 317      * in the order they appear in the constructor signature.
 318      * @param options the integer bit flag options.
 319      * @return an {@link ObjectReference} mirror of the newly created
 320      * object.
 321      * @throws java.lang.IllegalArgumentException if the method is not
 322      * a member of this class, if the size of the argument list
 323      * does not match the number of declared arguments for the constructor,
 324      * or if the method is not a constructor.
 325      * @throws {@link InvalidTypeException} if any argument in the
 326      * argument list is not assignable to the corresponding method argument
 327      * type.
 328      * @throws ClassNotLoadedException if any argument type has not yet been loaded
 329      * through the appropriate class loader.
 330      * @throws IncompatibleThreadStateException if the specified thread has not
 331      * been suspended by an event.
 332      * @throws InvocationException if the method invocation resulted in
 333      * an exception in the target VM.
 334      * @throws InvalidTypeException If the arguments do not meet this requirement --
 335      *         Object arguments must be assignment compatible with the argument
 336      *         type.  This implies that the argument type must be
 337      *         loaded through the enclosing class' class loader.
 338      *         Primitive arguments must be either assignment compatible with the
 339      *         argument type or must be convertible to the argument type without loss
 340      *         of information. See JLS section 5.2 for more information on assignment
 341      *         compatibility.
 342      * @throws VMCannotBeModifiedException if the VirtualMachine is read-only
 343      * - see {@link VirtualMachine#canBeModified()}.
 344      */
 345     ObjectReference newInstance(ThreadReference thread, Method method,
 346                                 List<? extends Value> arguments, int options)
 347                                    throws InvalidTypeException,


   1 /*
   2  * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  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


 200      * Only the specified thread will be resumed (as described for all
 201      * threads above). Upon completion of a single threaded invoke, the invoking thread
 202      * will be suspended once again. Note that any threads started during
 203      * the single threaded invocation will not be suspended when the
 204      * invocation completes.
 205      * <p>
 206      * If the target VM is disconnected during the invoke (for example, through
 207      * {@link VirtualMachine#dispose}) the method invocation continues.
 208      *
 209      * @param thread the thread in which to invoke.
 210      * @param method the {@link Method} to invoke.
 211      * @param arguments the list of {@link Value} arguments bound to the
 212      * invoked method. Values from the list are assigned to arguments
 213      * in the order they appear in the method signature.
 214      * @param options the integer bit flag options.
 215      * @return a {@link Value} mirror of the invoked method's return value.
 216      * @throws java.lang.IllegalArgumentException if the method is not
 217      * a member of this class or a superclass, if the size of the argument list
 218      * does not match the number of declared arguments for the method, or
 219      * if the method is an initializer, constructor or static intializer.



 220      * @throws ClassNotLoadedException if any argument type has not yet been loaded
 221      * through the appropriate class loader.
 222      * @throws IncompatibleThreadStateException if the specified thread has not
 223      * been suspended by an event.
 224      * @throws InvocationException if the method invocation resulted in
 225      * an exception in the target VM.
 226      * @throws InvalidTypeException If the arguments do not meet this requirement --
 227      *         Object arguments must be assignment compatible with the argument
 228      *         type.  This implies that the argument type must be
 229      *         loaded through the enclosing class' class loader.
 230      *         Primitive arguments must be either assignment compatible with the
 231      *         argument type or must be convertible to the argument type without loss
 232      *         of information. See JLS section 5.2 for more information on assignment
 233      *         compatibility.
 234      * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}.
 235      */
 236     Value invokeMethod(ThreadReference thread, Method method,
 237                        List<? extends Value> arguments, int options)
 238                                    throws InvalidTypeException,
 239                                           ClassNotLoadedException,


 302      * threads above). Upon completion of a single threaded invoke, the invoking thread
 303      * will be suspended once again. Note that any threads started during
 304      * the single threaded invocation will not be suspended when the
 305      * invocation completes.
 306      * <p>
 307      * If the target VM is disconnected during the invoke (for example, through
 308      * {@link VirtualMachine#dispose}) the method invocation continues.
 309      *
 310      * @param thread the thread in which to invoke.
 311      * @param method the constructor {@link Method} to invoke.
 312      * @param arguments the list of {@link Value} arguments bound to the
 313      * invoked constructor. Values from the list are assigned to arguments
 314      * in the order they appear in the constructor signature.
 315      * @param options the integer bit flag options.
 316      * @return an {@link ObjectReference} mirror of the newly created
 317      * object.
 318      * @throws java.lang.IllegalArgumentException if the method is not
 319      * a member of this class, if the size of the argument list
 320      * does not match the number of declared arguments for the constructor,
 321      * or if the method is not a constructor.



 322      * @throws ClassNotLoadedException if any argument type has not yet been loaded
 323      * through the appropriate class loader.
 324      * @throws IncompatibleThreadStateException if the specified thread has not
 325      * been suspended by an event.
 326      * @throws InvocationException if the method invocation resulted in
 327      * an exception in the target VM.
 328      * @throws InvalidTypeException If the arguments do not meet this requirement --
 329      *         Object arguments must be assignment compatible with the argument
 330      *         type.  This implies that the argument type must be
 331      *         loaded through the enclosing class' class loader.
 332      *         Primitive arguments must be either assignment compatible with the
 333      *         argument type or must be convertible to the argument type without loss
 334      *         of information. See JLS section 5.2 for more information on assignment
 335      *         compatibility.
 336      * @throws VMCannotBeModifiedException if the VirtualMachine is read-only
 337      * - see {@link VirtualMachine#canBeModified()}.
 338      */
 339     ObjectReference newInstance(ThreadReference thread, Method method,
 340                                 List<? extends Value> arguments, int options)
 341                                    throws InvalidTypeException,


< prev index next >