Package: IVdmEvaluationResult

IVdmEvaluationResult

Coverage

1: /*
2: * #%~
3: * org.overture.ide.debug
4: * %%
5: * Copyright (C) 2008 - 2014 Overture
6: * %%
7: * This program is free software: you can redistribute it and/or modify
8: * it under the terms of the GNU General Public License as
9: * published by the Free Software Foundation, either version 3 of the
10: * License, or (at your option) any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: * GNU General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public
18: * License along with this program. If not, see
19: * <http://www.gnu.org/licenses/gpl-3.0.html>.
20: * #~%
21: */
22: package org.overture.ide.debug.core.model.eval;
23:
24: import org.eclipse.debug.core.DebugException;
25: import org.overture.ide.debug.core.model.IVdmThread;
26: import org.overture.ide.debug.core.model.IVdmValue;
27:
28: public interface IVdmEvaluationResult
29: {
30:         /**
31:          * Returns the value representing the result of the evaluation, or <code>null</code> if the associated evaluation
32:          * failed. If the associated evaluation failed, there will be problems, or an exception in this result.
33:          *
34:          * @return the resulting value, possibly <code>null</code>
35:          */
36:         IVdmValue getValue();
37:
38:         /**
39:          * Returns whether the evaluation had any problems or if an exception occurred while performing the evaluation.
40:          *
41:          * @return whether there were any problems.
42:          * @see #getErrors()
43:          * @see #getException()
44:          */
45:         boolean hasErrors();
46:
47:         /**
48:          * Returns an array of problem messages. Each message describes a problem that occurred while compiling the snippet.
49:          *
50:          * @return compilation error messages, or an empty array if no errors occurred
51:          */
52:         String[] getErrorMessages();
53:
54:         /**
55:          * Returns the snippet that was evaluated.
56:          *
57:          * @return The string code snippet.
58:          */
59:         String getSnippet();
60:
61:         /**
62:          * Returns any exception that occurred while performing the evaluation or <code>null</code> if an exception did not
63:          * occur. The exception will be a debug exception or a debug exception that wrappers a JDI exception that indicates
64:          * a problem communicating with the target or with actually performing some action in the target.
65:          *
66:          * @return The exception that occurred during the evaluation
67:          * @see org.eclipse.debug.core.DebugException
68:          */
69:         DebugException getException();
70:
71:         /**
72:          * Returns the thread in which the evaluation was performed.
73:          *
74:          * @return the thread in which the evaluation was performed
75:          */
76:         IVdmThread getThread();
77: }