Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/EvaluationResult.java')
-rw-r--r--org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/EvaluationResult.java100
1 files changed, 51 insertions, 49 deletions
diff --git a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/EvaluationResult.java b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/EvaluationResult.java
index 0687b4a3c..69ccfa739 100644
--- a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/EvaluationResult.java
+++ b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/EvaluationResult.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.jdt.internal.debug.eval;
-
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -21,60 +20,59 @@ import org.eclipse.jdt.debug.core.IJavaThread;
import org.eclipse.jdt.debug.core.IJavaValue;
import org.eclipse.jdt.debug.eval.IEvaluationEngine;
import org.eclipse.jdt.debug.eval.IEvaluationResult;
-
+
/**
* The result of an evaluation.
*
* @see org.eclipse.jdt.debug.eval.IEvaluationResult
*/
public class EvaluationResult implements IEvaluationResult {
-
+
/**
* The result of an evaluation, possibly <code>null</code>
*/
private IJavaValue fValue;
-
+
/**
- * Thread in which the associated evaluation was
- * executed.
+ * Thread in which the associated evaluation was executed.
*/
private IJavaThread fThread;
-
+
/**
* Evaluation engine that created this result
*/
private IEvaluationEngine fEngine;
-
+
/**
* Source that was evaluated.
*/
private String fSnippet;
-
+
/**
- * Exception that occurred during evaluation,
- * or <code>null</code> if none.
+ * Exception that occurred during evaluation, or <code>null</code> if none.
*/
private DebugException fException;
-
+
/**
* List of <code>String</code>s describing compilation problems.
*/
- private List fErrors;
-
+ private List<String> fErrors;
+
/**
* Whether the evaluation was terminated.
*/
private boolean fTerminated = false;
/**
- * Constructs a new evaluation result for the given
- * engine, thread, and code snippet.
+ * Constructs a new evaluation result for the given engine, thread, and code
+ * snippet.
*/
- public EvaluationResult(IEvaluationEngine engine, String snippet, IJavaThread thread) {
+ public EvaluationResult(IEvaluationEngine engine, String snippet,
+ IJavaThread thread) {
setEvaluationEngine(engine);
setThread(thread);
setSnippet(snippet);
- fErrors= new ArrayList();
+ fErrors = new ArrayList<String>();
}
/**
@@ -83,17 +81,16 @@ public class EvaluationResult implements IEvaluationResult {
public IJavaValue getValue() {
return fValue;
}
-
+
/**
- * Sets the result of an evaluation, possibly
- * <code>null</code>.
+ * Sets the result of an evaluation, possibly <code>null</code>.
*
- * @param value result of an evaluation, possibly
- * <code>null</code>
+ * @param value
+ * result of an evaluation, possibly <code>null</code>
*/
public void setValue(IJavaValue value) {
fValue = value;
- }
+ }
/**
* @see IEvaluationResult#hasProblems()
@@ -106,33 +103,35 @@ public class EvaluationResult implements IEvaluationResult {
* @see IEvaluationResult#getProblems()
* @deprecated
*/
+ @Deprecated
public Message[] getErrors() {
- Message[] messages= new Message[fErrors.size()];
- int i= 0;
- for (Iterator iter= fErrors.iterator(); iter.hasNext();) {
- messages[i++]= new Message((String) iter.next(), -1);
+ Message[] messages = new Message[fErrors.size()];
+ int i = 0;
+ for (Iterator<String> iter = fErrors.iterator(); iter.hasNext();) {
+ messages[i++] = new Message(iter.next(), -1);
}
return messages;
}
-
+
/**
* @see org.eclipse.jdt.debug.eval.IEvaluationResult#getErrorMessages()
*/
public String[] getErrorMessages() {
- return (String[])fErrors.toArray(new String[fErrors.size()]);
+ return fErrors.toArray(new String[fErrors.size()]);
}
-
+
/**
* @see IEvaluationResult#getSnippet()
*/
public String getSnippet() {
return fSnippet;
}
-
+
/**
* Sets the code snippet that was evaluated.
*
- * @param snippet the source code that was evaluated
+ * @param snippet
+ * the source code that was evaluated
*/
private void setSnippet(String snippet) {
fSnippet = snippet;
@@ -144,12 +143,13 @@ public class EvaluationResult implements IEvaluationResult {
public DebugException getException() {
return fException;
}
-
+
/**
- * Sets an exception that occurred while attempting
- * the associated evaluation.
+ * Sets an exception that occurred while attempting the associated
+ * evaluation.
*
- * @param e exception
+ * @param e
+ * exception
*/
public void setException(DebugException e) {
fException = e;
@@ -161,16 +161,15 @@ public class EvaluationResult implements IEvaluationResult {
public IJavaThread getThread() {
return fThread;
}
-
+
/**
- * Sets the thread this result was generated
- * from.
+ * Sets the thread this result was generated from.
*
- * @param thread thread in which the associated
- * evaluation was executed
+ * @param thread
+ * thread in which the associated evaluation was executed
*/
private void setThread(IJavaThread thread) {
- fThread= thread;
+ fThread = thread;
}
/**
@@ -179,16 +178,17 @@ public class EvaluationResult implements IEvaluationResult {
public IEvaluationEngine getEvaluationEngine() {
return fEngine;
}
-
+
/**
* Sets the evaluation that created this result.
*
- * @param engine the evaluation that created this result
+ * @param engine
+ * the evaluation that created this result
*/
private void setEvaluationEngine(IEvaluationEngine engine) {
fEngine = engine;
}
-
+
/**
* Adds the given message to the list of error messages.
*/
@@ -196,7 +196,9 @@ public class EvaluationResult implements IEvaluationResult {
fErrors.add(message);
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.jdt.debug.eval.IEvaluationResult#isTerminated()
*/
public boolean isTerminated() {
@@ -206,10 +208,10 @@ public class EvaluationResult implements IEvaluationResult {
/**
* Sets whether terminated.
*
- * @param terminated whether terminated
+ * @param terminated
+ * whether terminated
*/
public void setTerminated(boolean terminated) {
fTerminated = terminated;
}
}
-

Back to the top