Eclipse JDT
2.0

org.eclipse.jdt.debug.eval
Interface IClassFileEvaluationEngine

All Superinterfaces:
IEvaluationEngine

public interface IClassFileEvaluationEngine
extends IEvaluationEngine

An evaluation engine that performs evaluations by deploying and executing class files locally.

Clients are not intended to implement this interface.

Since:
2.0

Method Summary
 void evaluate(String snippet, IJavaThread thread, IEvaluationListener listener, boolean hitBreakpoints)
          Asynchronously evaluates the given snippet in the specified target thread, reporting the result back to the given listener.
 String[] getImports()
          Returns the import declarations for this evaluation context.
 void setImports(String[] imports)
          Sets the import declarations for this evaluation context.
 
Methods inherited from interface org.eclipse.jdt.debug.eval.IEvaluationEngine
dispose, evaluate, evaluate, getDebugTarget, getJavaProject
 

Method Detail

getImports

public String[] getImports()
Returns the import declarations for this evaluation context. An empty list indicates there are no imports. The syntax for the import corresponds to a fully qualified type name, or to an on-demand package name as defined by ImportDeclaration (JLS2 7.5). For example, "java.util.Hashtable" or "java.util.*".

Returns:
the list of import names

setImports

public void setImports(String[] imports)
Sets the import declarations for this evaluation context. An empty list indicates there are no imports. The syntax for the import corresponds to a fully qualified type name, or to an on-demand package name as defined by ImportDeclaration (JLS2 7.5). For example, "java.util.Hashtable" or "java.util.*".

Parameters:
imports - the list of import names

evaluate

public void evaluate(String snippet,
                     IJavaThread thread,
                     IEvaluationListener listener,
                     boolean hitBreakpoints)
              throws DebugException
Asynchronously evaluates the given snippet in the specified target thread, reporting the result back to the given listener. The snippet is evaluated in the context of the Java project this evaluation engine was created on. If the snippet is determined to be a valid expression, the expression is evaluated in the specified thread, which resumes its execution from the location at which it is currently suspended. When the evaluation completes, the thread will be suspened at this original location. Compilation and runtime errors are reported in the evaluation result.

Parameters:
snippet - code snippet to evaluate
thread - the thread in which to run the evaluation, which must be suspended
listener - the listener that will receive notification when/if the evalaution completes
hitBreakpoints - whether or not breakpoints should be honored in the evaluation thread during the evaluation. If false, breakpoints hit in the evaluation thread will be ignored.
Throws:
DebugException - if this method fails. Reasons include:
  • Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
  • The specified thread is not currently suspended
  • The specified thread is not contained in the debug target associated with this evaluation engine
  • The specified thread is suspended in the middle of an evaluation that has not completed. It is not possible to perform nested evaluations

Eclipse JDT
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.