src/share/classes/com/sun/jdi/ArrayReference.java

Print this page




  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package com.sun.jdi;
  27 
  28 import java.util.List;
  29 
  30 /**
  31  * Provides access to an array object and its components in the target VM.
  32  * Each array component is mirrored by a {@link Value} object.
  33  * The array components, in aggregate, are placed in {@link java.util.List}
  34  * objects instead of arrays for consistency with the rest of the API and
  35  * for interoperability with other APIs.
  36  *
  37  * @author Robert Field
  38  * @author Gordon Hirsch
  39  * @author James McIlree
  40  * @since  1.3
  41  */

  42 public interface ArrayReference extends ObjectReference {
  43 
  44     /**
  45      * Returns the number of components in this array.
  46      *
  47      * @return the integer count of components in this array.
  48      */
  49     int length();
  50 
  51     /**
  52      * Returns an array component value.
  53      *
  54      * @param index the index of the component to retrieve
  55      * @return the {@link Value} at the given index.
  56      * @throws java.lang.IndexOutOfBoundsException if
  57      * <CODE><I>index</I></CODE> is outside the range of this array,
  58      * that is, if either of the following are true:
  59      * <PRE>
  60      *    <I>index</I> &lt; 0
  61      *    <I>index</I> &gt;= {@link #length() length()} </PRE>




  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package com.sun.jdi;
  27 
  28 import java.util.List;
  29 
  30 /**
  31  * Provides access to an array object and its components in the target VM.
  32  * Each array component is mirrored by a {@link Value} object.
  33  * The array components, in aggregate, are placed in {@link java.util.List}
  34  * objects instead of arrays for consistency with the rest of the API and
  35  * for interoperability with other APIs.
  36  *
  37  * @author Robert Field
  38  * @author Gordon Hirsch
  39  * @author James McIlree
  40  * @since  1.3
  41  */
  42 @jdk.Supported
  43 public interface ArrayReference extends ObjectReference {
  44 
  45     /**
  46      * Returns the number of components in this array.
  47      *
  48      * @return the integer count of components in this array.
  49      */
  50     int length();
  51 
  52     /**
  53      * Returns an array component value.
  54      *
  55      * @param index the index of the component to retrieve
  56      * @return the {@link Value} at the given index.
  57      * @throws java.lang.IndexOutOfBoundsException if
  58      * <CODE><I>index</I></CODE> is outside the range of this array,
  59      * that is, if either of the following are true:
  60      * <PRE>
  61      *    <I>index</I> &lt; 0
  62      *    <I>index</I> &gt;= {@link #length() length()} </PRE>