KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > core > model > IValueModification


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.debug.core.model;
12
13
14 import org.eclipse.debug.core.DebugException;
15
16 /**
17  * Provides the ability to modify the value of a variable in
18  * a target.
19  * <p>
20  * Clients may implement this interface.
21  * </p>
22  * @see IVariable
23  */

24 public interface IValueModification {
25
26     /**
27      * Attempts to set the value of this variable to the
28      * value of the given expression.
29      *
30      * @param expression an expression to generate a new value
31      * @exception DebugException on failure. Reasons include:<ul>
32      * <li>TARGET_REQUEST_FAILED - The request failed in the target
33      * <li>NOT_SUPPORTED - The capability is not supported by the target
34      * </ul>
35      */

36     public void setValue(String JavaDoc expression) throws DebugException;
37     
38     /**
39      * Sets the value of this variable to the given value.
40      *
41      * @param value a new value
42      * @exception DebugException on failure. Reasons include:<ul>
43      * <li>TARGET_REQUEST_FAILED - The request failed in the target
44      * <li>NOT_SUPPORTED - The capability is not supported by the target
45      * </ul>
46      * @since 2.0
47      */

48     public void setValue(IValue value) throws DebugException;
49     
50     /**
51      * Returns whether this variable supports value modification.
52      *
53      * @return whether this variable supports value modification
54      */

55     public boolean supportsValueModification();
56     
57     /**
58      * Returns whether the given expression is valid to be used in
59      * setting a new value for this variable.
60      *
61      * @param expression an expression to generate a new value
62      * @return whether the expression is valid
63      * @exception DebugException on failure. Reasons include:<ul>
64      * <li>TARGET_REQUEST_FAILED - The request failed in the target
65      * <li>NOT_SUPPORTED - The capability is not supported by the target
66      * </ul>
67      */

68     public boolean verifyValue(String JavaDoc expression) throws DebugException;
69     
70     /**
71      * Returns whether the given value can be used as
72      * a new value for this variable.
73      *
74      * @param value a new value
75      * @return whether the value is valid
76      * @exception DebugException on failure. Reasons include:<ul>
77      * <li>TARGET_REQUEST_FAILED - The request failed in the target
78      * <li>NOT_SUPPORTED - The capability is not supported by the target
79      * </ul>
80      * @since 2.0
81      */

82     public boolean verifyValue(IValue value) throws DebugException;
83 }
84
85
86
Popular Tags