KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > debug > core > IJavaArray


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.debug.core;
12
13
14 import org.eclipse.debug.core.DebugException;
15 import org.eclipse.debug.core.model.IIndexedValue;
16
17 /**
18  * A value referencing an array on a target VM.
19  * <p>
20  * Clients are not intended to implement this interface.
21  * </p>
22  * @see IJavaValue
23  * @since 2.0
24  */

25
26 public interface IJavaArray extends IJavaObject, IIndexedValue {
27     
28     /**
29      * Returns the values contained in this array.
30      *
31      * @return the values contained in this array
32      * @exception DebugException if this method fails. Reasons include:<ul>
33      * <li>Failure communicating with the VM. The DebugException's
34      * status code contains the underlying exception responsible for
35      * the failure.</li>
36      * </ul>
37      */

38     public IJavaValue[] getValues() throws DebugException;
39         
40     /**
41      * Returns the value at the given index in
42      * this array.
43      *
44      * @param index the index of the value to return
45      * @return the value at the given index
46      * @exception DebugException if this method fails. Reasons include:<ul>
47      * <li>Failure communicating with the VM. The DebugException's
48      * status code contains the underlying exception responsible for
49      * the failure.</li>
50      * </ul>
51      * @exception java.lang.IndexOutOfBoundsException if the index is
52      * not within the bounds of this array.
53      */

54     public IJavaValue getValue(int index) throws DebugException;
55     
56     /**
57      * Returns the length of this array.
58      *
59      * @return the length of this array
60      * @exception DebugException if this method fails. Reasons include:<ul>
61      * <li>Failure communicating with the VM. The DebugException's
62      * status code contains the underlying exception responsible for
63      * the failure.</li>
64      * </ul
65      */

66     public int getLength() throws DebugException;
67     
68     /**
69      * Sets the value at the given index to the specified
70      * value.
71      *
72      * @param index the index at which to assign a new value
73      * @param value the new value
74      * @exception DebugException if this method fails. Reasons include:<ul>
75      * <li>Failure communicating with the VM. The DebugException's
76      * status code contains the underlying exception responsible for
77      * the failure.</li>
78      * <li>The given value is not compatible with the type of this
79      * array</li>
80      * </ul>
81      * @exception java.lang.IndexOutOfBoundsException if the index is
82      * not within the bounds of this array.
83      */

84     public void setValue(int index, IJavaValue value) throws DebugException;
85
86 }
87
88
Popular Tags