KickJava   Java API By Example, From Geeks To Geeks.

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


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 /**
15  * An expression is a snippet of code that can be evaluated
16  * to produce a value. When and how an expression is evaluated
17  * is implementation specific. The context/binding required to
18  * evaluate an expression varies by debug model, and by
19  * user intent. Furthermore, an expression may need to be evaluated
20  * at a specific location in a program (for example, at a
21  * breakpoint/line where certain variables referenced in the
22  * expression are visible/allocated). A user may want to
23  * evaluate an expression once to produce a value that can
24  * be inspected iteratively, or they may wish to evaluate an
25  * expression iteratively producing new values each time
26  * (i.e. as in a watch list).
27  * <p>
28  * Clients are intended to implement this interface.
29  * </p>
30  * @since 2.0
31  */

32 public interface IExpression extends IDebugElement {
33     
34     /**
35      * Returns this expression's snippet of code.
36      *
37      * @return the expression
38      */

39     public abstract String JavaDoc getExpressionText();
40
41     /**
42      * Returns the current value of this expression or
43      * <code>null</code> if this expression does not
44      * currently have a value.
45      *
46      * @return value or <code>null</code>
47      */

48     public abstract IValue getValue();
49     
50     /**
51      * Returns the debug target this expression is associated
52      * with, or <code>null</code> if this expression is not
53      * associated with a debug target.
54      *
55      * @return debug target or <code>null</code>
56      * @see IDebugElement#getDebugTarget()
57      */

58     public abstract IDebugTarget getDebugTarget();
59     
60     /**
61      * Notifies this expression that it has been removed
62      * from the expression manager. Any required clean up
63      * is be performed such that this expression can be
64      * garbage collected.
65      */

66     public abstract void dispose();
67 }
68
Popular Tags