KickJava   Java API By Example, From Geeks To Geeks.

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


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 import org.eclipse.debug.core.DebugException;
14
15 /**
16  * The result of an evaluation performed by an
17  * <code>org.eclipse.debug.core.model.IWatchExpressionDelegate</code>.
18  * A watch expression reports the value of the evaluation
19  * and any errors or exceptions that occurred.
20  * <p>
21  * Clients may implement this interface.
22  * </p>
23  * @see org.eclipse.debug.core.model.IWatchExpressionDelegate
24  * @since 3.0
25  */

26 public interface IWatchExpressionResult {
27     /**
28      * Returns the value representing the result of the
29      * evaluation, or <code>null</code> if the
30      * associated evaluation failed. If
31      * the associated evaluation failed, there will
32      * be problems, or an exception in this result.
33      *
34      * @return the resulting value, possibly
35      * <code>null</code>
36      */

37     public IValue getValue();
38     
39     /**
40      * Returns whether the evaluation had any problems
41      * or if an exception occurred while performing the
42      * evaluation.
43      *
44      * @return whether there were any problems.
45      * @see #getErrorMessages()
46      * @see #getException()
47      */

48     public boolean hasErrors();
49         
50     /**
51      * Returns an array of problem messages. Each message describes a problem that
52      * occurred while compiling the snippet.
53      *
54      * @return evaluation error messages, or an empty array if no errors occurred
55      */

56     public String JavaDoc[] getErrorMessages();
57         
58     /**
59      * Returns the expression that was evaluated.
60      *
61      * @return The string expression.
62      */

63     public String JavaDoc getExpressionText();
64     
65     /**
66      * Returns any exception that occurred while performing the evaluation
67      * or <code>null</code> if an exception did not occur.
68      * The exception will be a debug exception or a debug exception
69      * that wrappers a debug model specific exception that indicates a problem communicating
70      * with the target or with actually performing some action in the target.
71      *
72      * @return The exception that occurred during the evaluation
73      * @see org.eclipse.debug.core.DebugException
74      */

75     public DebugException getException();
76 }
77
Popular Tags