< prev index next >

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

Print this page
rev 17275 : 8181417: Code cleanups in com.sun.jdi


  27 
  28 import java.util.List;
  29 
  30 /**
  31  * A mirror of an interface in the target VM. An InterfaceType is
  32  * a refinement of {@link ReferenceType} that applies to true interfaces
  33  * in the JLS  sense of the definition (not a class, not an array type).
  34  * An interface type will never be returned by
  35  * {@link ObjectReference#referenceType}, but it may be in the list
  36  * of implemented interfaces for a {@link ClassType} that is returned
  37  * by that method.
  38  *
  39  * @see ObjectReference
  40  *
  41  * @author Robert Field
  42  * @author Gordon Hirsch
  43  * @author James McIlree
  44  * @since  1.3
  45  */
  46 public interface InterfaceType extends ReferenceType {

  47     /**
  48      * Gets the interfaces directly extended by this interface.
  49      * The returned list contains only those interfaces this
  50      * interface has declared to be extended.
  51      *
  52      * @return a List of {@link InterfaceType} objects each mirroring
  53      * an interface extended by this interface.
  54      * If none exist, returns a zero length List.
  55      * @throws ClassNotPreparedException if this class not yet been
  56      * prepared.
  57      */
  58     List<InterfaceType> superinterfaces();
  59 
  60     /**
  61      * Gets the currently prepared interfaces which directly extend this
  62      * interface. The returned list contains only those interfaces that
  63      * declared this interface in their "extends" clause.
  64      *
  65      * @return a List of {@link InterfaceType} objects each mirroring
  66      * an interface extending this interface.


 170      * if the method is not static or is a static initializer.
 171      * @throws ClassNotLoadedException if any argument type has not yet been loaded
 172      * through the appropriate class loader.
 173      * @throws IncompatibleThreadStateException if the specified thread has not
 174      * been suspended by an event.
 175      * @throws InvocationException if the method invocation resulted in
 176      * an exception in the target VM.
 177      * @throws InvalidTypeException If the arguments do not meet this requirement --
 178      *         Object arguments must be assignment compatible with the argument
 179      *         type.  This implies that the argument type must be
 180      *         loaded through the enclosing class' class loader.
 181      *         Primitive arguments must be either assignment compatible with the
 182      *         argument type or must be convertible to the argument type without loss
 183      *         of information. See JLS section 5.2 for more information on assignment
 184      *         compatibility.
 185      * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}.
 186      *
 187      * @since 1.8
 188      */
 189     default Value invokeMethod(ThreadReference thread, Method method,
 190                        List<? extends Value> arguments, int options)
 191             throws InvalidTypeException,
 192             ClassNotLoadedException,
 193             IncompatibleThreadStateException,
 194             InvocationException {

 195         throw new UnsupportedOperationException();
 196     }
 197 }


  27 
  28 import java.util.List;
  29 
  30 /**
  31  * A mirror of an interface in the target VM. An InterfaceType is
  32  * a refinement of {@link ReferenceType} that applies to true interfaces
  33  * in the JLS  sense of the definition (not a class, not an array type).
  34  * An interface type will never be returned by
  35  * {@link ObjectReference#referenceType}, but it may be in the list
  36  * of implemented interfaces for a {@link ClassType} that is returned
  37  * by that method.
  38  *
  39  * @see ObjectReference
  40  *
  41  * @author Robert Field
  42  * @author Gordon Hirsch
  43  * @author James McIlree
  44  * @since  1.3
  45  */
  46 public interface InterfaceType extends ReferenceType {
  47 
  48     /**
  49      * Gets the interfaces directly extended by this interface.
  50      * The returned list contains only those interfaces this
  51      * interface has declared to be extended.
  52      *
  53      * @return a List of {@link InterfaceType} objects each mirroring
  54      * an interface extended by this interface.
  55      * If none exist, returns a zero length List.
  56      * @throws ClassNotPreparedException if this class not yet been
  57      * prepared.
  58      */
  59     List<InterfaceType> superinterfaces();
  60 
  61     /**
  62      * Gets the currently prepared interfaces which directly extend this
  63      * interface. The returned list contains only those interfaces that
  64      * declared this interface in their "extends" clause.
  65      *
  66      * @return a List of {@link InterfaceType} objects each mirroring
  67      * an interface extending this interface.


 171      * if the method is not static or is a static initializer.
 172      * @throws ClassNotLoadedException if any argument type has not yet been loaded
 173      * through the appropriate class loader.
 174      * @throws IncompatibleThreadStateException if the specified thread has not
 175      * been suspended by an event.
 176      * @throws InvocationException if the method invocation resulted in
 177      * an exception in the target VM.
 178      * @throws InvalidTypeException If the arguments do not meet this requirement --
 179      *         Object arguments must be assignment compatible with the argument
 180      *         type.  This implies that the argument type must be
 181      *         loaded through the enclosing class' class loader.
 182      *         Primitive arguments must be either assignment compatible with the
 183      *         argument type or must be convertible to the argument type without loss
 184      *         of information. See JLS section 5.2 for more information on assignment
 185      *         compatibility.
 186      * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}.
 187      *
 188      * @since 1.8
 189      */
 190     default Value invokeMethod(ThreadReference thread, Method method,
 191                                List<? extends Value> arguments, int options)
 192             throws InvalidTypeException,
 193                    ClassNotLoadedException,
 194                    IncompatibleThreadStateException,
 195                    InvocationException
 196     {
 197         throw new UnsupportedOperationException();
 198     }
 199 }
< prev index next >