jdk/src/jdk.jdi/share/classes/com/sun/jdi/InterfaceType.java
author sla
Tue, 24 Feb 2015 10:56:48 +0100
changeset 29102 fa8bbdfd8750
parent 25859 3317bb8137f4
child 34894 3248b89d1921
permissions -rw-r--r--
8073713: javadoc warnings in serviceability code Reviewed-by: mgronlun, alanb, sspitsyn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
23010
6dadb192ad81 8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents: 20742
diff changeset
     2
 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package com.sun.jdi;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.util.List;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * A mirror of an interface in the target VM. An InterfaceType is
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * a refinement of {@link ReferenceType} that applies to true interfaces
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * in the JLS  sense of the definition (not a class, not an array type).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * An interface type will never be returned by
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * {@link ObjectReference#referenceType}, but it may be in the list
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * of implemented interfaces for a {@link ClassType} that is returned
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * by that method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * @see ObjectReference
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * @author Robert Field
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * @author Gordon Hirsch
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * @author James McIlree
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * @since  1.3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 */
20742
4ae78e8060d6 8008662: Add @jdk.Exported to JDK-specific/exported APIs
alanb
parents: 5506
diff changeset
    46
@jdk.Exported
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
public interface InterfaceType extends ReferenceType {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
     * Gets the interfaces directly extended by this interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
     * The returned list contains only those interfaces this
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
     * interface has declared to be extended.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
     * @return a List of {@link InterfaceType} objects each mirroring
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
     * an interface extended by this interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
     * If none exist, returns a zero length List.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
     * @throws ClassNotPreparedException if this class not yet been
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
     * prepared.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    List<InterfaceType> superinterfaces();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
     * Gets the currently prepared interfaces which directly extend this
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
     * interface. The returned list contains only those interfaces that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
     * declared this interface in their "extends" clause.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
     * @return a List of {@link InterfaceType} objects each mirroring
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
     * an interface extending this interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
     * If none exist, returns a zero length List.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    List<InterfaceType> subinterfaces();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
     * Gets the currently prepared classes which directly implement this
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
     * interface. The returned list contains only those classes that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
     * declared this interface in their "implements" clause.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
     * @return a List of {@link ClassType} objects each mirroring
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
     * a class implementing this interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
     * If none exist, returns a zero length List.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
    List<ClassType> implementors();
24195
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
    82
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
    83
    /**
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
    84
     * Invokes the specified static {@link Method} in the
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
    85
     * target VM. The
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
    86
     * specified method must be defined in this interface.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
    87
     * The method must be a static method
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
    88
     * but not a static initializer.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
    89
     * <p>
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
    90
     * The method invocation will occur in the specified thread.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
    91
     * Method invocation can occur only if the specified thread
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
    92
     * has been suspended by an event which occurred in that thread.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
    93
     * Method invocation is not supported
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
    94
     * when the target VM has been suspended through
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
    95
     * {@link VirtualMachine#suspend} or when the specified thread
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
    96
     * is suspended through {@link ThreadReference#suspend}.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
    97
     * <p>
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
    98
     * The specified method is invoked with the arguments in the specified
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
    99
     * argument list.  The method invocation is synchronous; this method
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   100
     * does not return until the invoked method returns in the target VM.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   101
     * If the invoked method throws an exception, this method will throw
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   102
     * an {@link InvocationException} which contains a mirror to the exception
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   103
     * object thrown.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   104
     * <p>
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   105
     * Object arguments must be assignment compatible with the argument type
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   106
     * (This implies that the argument type must be loaded through the
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   107
     * enclosing class' class loader). Primitive arguments must be
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   108
     * either assignment compatible with the argument type or must be
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   109
     * convertible to the argument type without loss of information.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   110
     * If the method being called accepts a variable number of arguments,
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   111
     * then the last argument type is an array of some component type.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   112
     * The argument in the matching position can be omitted, or can be null,
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   113
     * an array of the same component type, or an argument of the
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   114
     * component type followed by any number of other arguments of the same
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   115
     * type. If the argument is omitted, then a 0 length array of the
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   116
     * component type is passed.  The component type can be a primitive type.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   117
     * Autoboxing is not supported.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   118
     *
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   119
     * See Section 5.2 of
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   120
     * <cite>The Java&trade; Language Specification</cite>
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   121
     * for more information on assignment compatibility.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   122
     * <p>
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   123
     * By default, all threads in the target VM are resumed while
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   124
     * the method is being invoked if they were previously
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   125
     * suspended by an event or by {@link VirtualMachine#suspend} or
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   126
     * {@link ThreadReference#suspend}. This is done to prevent the deadlocks
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   127
     * that will occur if any of the threads own monitors
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   128
     * that will be needed by the invoked method.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   129
     * Note, however, that this implicit resume acts exactly like
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   130
     * {@link ThreadReference#resume}, so if the thread's suspend
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   131
     * count is greater than 1, it will remain in a suspended state
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   132
     * during the invocation and thus a deadlock could still occur.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   133
     * By default, when the invocation completes,
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   134
     * all threads in the target VM are suspended, regardless their state
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   135
     * before the invocation.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   136
     * It is possible that
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   137
     * breakpoints or other events might occur during the invocation.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   138
     * This can cause deadlocks as described above. It can also cause a deadlock
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   139
     * if invokeMethod is called from the client's event handler thread.  In this
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   140
     * case, this thread will be waiting for the invokeMethod to complete and
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   141
     * won't read the EventSet that comes in for the new event.  If this
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   142
     * new EventSet is SUSPEND_ALL, then a deadlock will occur because no
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   143
     * one will resume the EventSet.  To avoid this, all EventRequests should
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   144
     * be disabled before doing the invokeMethod, or the invokeMethod should
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   145
     * not be done from the client's event handler thread.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   146
     * <p>
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   147
     * The resumption of other threads during the invocation can be prevented
29102
fa8bbdfd8750 8073713: javadoc warnings in serviceability code
sla
parents: 25859
diff changeset
   148
     * by specifying the {@link ClassType#INVOKE_SINGLE_THREADED}
24195
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   149
     * bit flag in the <code>options</code> argument; however,
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   150
     * there is no protection against or recovery from the deadlocks
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   151
     * described above, so this option should be used with great caution.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   152
     * Only the specified thread will be resumed (as described for all
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   153
     * threads above). Upon completion of a single threaded invoke, the invoking thread
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   154
     * will be suspended once again. Note that any threads started during
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   155
     * the single threaded invocation will not be suspended when the
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   156
     * invocation completes.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   157
     * <p>
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   158
     * If the target VM is disconnected during the invoke (for example, through
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   159
     * {@link VirtualMachine#dispose}) the method invocation continues.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   160
     *
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   161
     * @param thread the thread in which to invoke.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   162
     * @param method the {@link Method} to invoke.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   163
     * @param arguments the list of {@link Value} arguments bound to the
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   164
     * invoked method. Values from the list are assigned to arguments
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   165
     * in the order they appear in the method signature.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   166
     * @param options the integer bit flag options.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   167
     * @return a {@link Value} mirror of the invoked method's return value.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   168
     * @throws java.lang.IllegalArgumentException if the method is not
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   169
     * a member of this interface, if the size of the argument list
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   170
     * does not match the number of declared arguments for the method, or
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   171
     * if the method is not static or is a static initializer.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   172
     * @throws {@link InvalidTypeException} if any argument in the
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   173
     * argument list is not assignable to the corresponding method argument
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   174
     * type.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   175
     * @throws ClassNotLoadedException if any argument type has not yet been loaded
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   176
     * through the appropriate class loader.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   177
     * @throws IncompatibleThreadStateException if the specified thread has not
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   178
     * been suspended by an event.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   179
     * @throws InvocationException if the method invocation resulted in
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   180
     * an exception in the target VM.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   181
     * @throws InvalidTypeException If the arguments do not meet this requirement --
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   182
     *         Object arguments must be assignment compatible with the argument
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   183
     *         type.  This implies that the argument type must be
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   184
     *         loaded through the enclosing class' class loader.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   185
     *         Primitive arguments must be either assignment compatible with the
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   186
     *         argument type or must be convertible to the argument type without loss
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   187
     *         of information. See JLS section 5.2 for more information on assignment
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   188
     *         compatibility.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   189
     * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}.
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   190
     *
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   191
     * @since 1.8
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   192
     */
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   193
    default Value invokeMethod(ThreadReference thread, Method method,
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   194
                       List<? extends Value> arguments, int options)
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   195
            throws InvalidTypeException,
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   196
            ClassNotLoadedException,
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   197
            IncompatibleThreadStateException,
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   198
            InvocationException {
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   199
        throw new UnsupportedOperationException();
705325a63a58 8042123: Support default and static interface methods in JDI, JDWP and JDB
jbachorik
parents: 24127
diff changeset
   200
    }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
}