Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.ide.runner
Interface DebuggerEvaluator


public interface DebuggerEvaluator

Evaluators are keyed to a particular debuggee stop (stack frame and thread) and the evaluator expires as soon as the debuggee resumes. Don't hold on to expired evaluators. Let them be garbage collected after each 'resume' and 'finish'.


Method Summary
 java.util.List<DebuggeeData> evaluate(java.util.List<java.lang.String> expressions, DebuggeeData context)
          Evaluate expressions into DebuggeeData representations in the context of the currently set thread and stack position and an optional DebuggeeData object.
 DebuggeeData evaluate(java.lang.String expression, DebuggeeData context)
          Evaluate one expression into a DebuggeeData representation in the context of the currently set thread and stack position and an optional DebuggeeData object.
 java.util.List<DebuggerThread> getAllThreads()
          Get all the current threads
 Context getContext()
          Get the context of this evaluator
 DebuggerEvaluator getEvaluator(DebuggerThread thread)
          Get a new evaluator for another thread.
 DebuggerEvaluator getEvaluator(int stackFrame)
          Get a new evaluator for a specific 0-based stack frame for the same thread as the current evaluator
 int getStackFrame()
          Get the 0-based index of the stack frame for this evaluator.
 int getStackFrameCount()
          Find out how many stack frames there are.
 DebuggerThread getThread()
          Get the thread for this evaluator.
 boolean hasExpired()
          Check if this evaluator has expired.
 

Method Detail

hasExpired

boolean hasExpired()
Check if this evaluator has expired.

Returns:
True if this evaluator has expired, false otherwise.

getContext

Context getContext()
Get the context of this evaluator

Returns:
the context or null if this evaluator has expired

getStackFrame

int getStackFrame()
Get the 0-based index of the stack frame for this evaluator. Every evaluator is tied to a stack frame

Returns:
the stackframe index or -1 if this evaluator has expired

getThread

DebuggerThread getThread()
Get the thread for this evaluator. Every evaluator is tied to a thread

Returns:
the thread or null if this evaluator has expired

evaluate

DebuggeeData evaluate(java.lang.String expression,
                      DebuggeeData context)
Evaluate one expression into a DebuggeeData representation in the context of the currently set thread and stack position and an optional DebuggeeData object.

Parameters:
expression - One expression to evaluate
context - An optional Object to use as the context for the evaluation which is useful if a DebuggeeData has children and the caller wants to evaluate a child in the context of the parent. If null, the context is the stack frame and thread of this DebuggerEvaluator.
Returns:
A DebuggeeData Object representing the result of the evaluation, null if the evaluation failed or if the evaluator has expired.

evaluate

java.util.List<DebuggeeData> evaluate(java.util.List<java.lang.String> expressions,
                                      DebuggeeData context)
Evaluate expressions into DebuggeeData representations in the context of the currently set thread and stack position and an optional DebuggeeData object.

Parameters:
expressions - Expressions to evaluate
context - An optional Object to use as the context for the evaluations which is useful if a DebuggeeData has children and the caller wants to evaluate a child in the context of the parent. If null, the context is the stack frame and thread of this DebuggerEvaluator.
Returns:
A List of DebuggeeData representing the result of the evaluations, where the DebuggeeData of a failed evaluation is null. This method returns null if the evaluator has expired.

getStackFrameCount

int getStackFrameCount()
Find out how many stack frames there are.

Returns:
the number of stack frames or -1 if the evaluator has expired.

getEvaluator

DebuggerEvaluator getEvaluator(int stackFrame)
Get a new evaluator for a specific 0-based stack frame for the same thread as the current evaluator

Returns:
a new DebuggerEvaluator or null if this evaluator has expired or if the stack frame is invalid.

getEvaluator

DebuggerEvaluator getEvaluator(DebuggerThread thread)
Get a new evaluator for another thread. The new evaluator will be for the top of the stack of that thread

Parameters:
thread - The thread to use
Returns:
A new DebuggerEvaluator or null if this evaluator has expired or if the thread is invalid

getAllThreads

java.util.List<DebuggerThread> getAllThreads()
Get all the current threads

Returns:
A list of the current threads, which will be null if this evaluator has expired.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

Copyright © 1997, 2011, Oracle. All rights reserved.