Class DebugContext
java.lang.Object
com.oracle.truffle.api.debug.DebugContext
Representation of a polyglot context in a guest language execution.
- Since:
- 0.30
-
Method Summary
Modifier and TypeMethodDescriptionEvaluate the given code in this context.Get a parent context of this context, if any.<T> TrunInContext(Supplier<T> run) Run supplied operations in this context.
-
Method Details
-
evaluate
Evaluate the given code in this context.- Parameters:
code- the code to evaluatelanguageId- the language to evaluate the code in- Returns:
- result of the evaluation
- Since:
- 0.30
-
runInContext
Run supplied operations in this context. Use it to call methods onDebugValuethat was obtained fromevaluate(java.lang.String, java.lang.String).- Type Parameters:
T- a type of the return value of the supplier- Parameters:
run- a supplier representing operations to be run in this context- Returns:
- the supplier's return value
- Since:
- 0.30
-
getParent
Get a parent context of this context, if any. This provides the hierarchy of inner contexts.- Returns:
- a parent context, or
nullif there is no parent - Since:
- 0.30
-