public final class DebugContext extends Object
Modifier and Type | Method and Description |
---|---|
DebugValue |
evaluate(String code,
String languageId)
Evaluate the given code in this context.
|
DebugContext |
getParent()
Get a parent context of this context, if any.
|
<T> T |
runInContext(Supplier<T> run)
Run supplied operations in this context.
|
public DebugValue evaluate(String code, String languageId)
code
- the code to evaluatelanguageId
- the language to evaluate the code inpublic <T> T runInContext(Supplier<T> run)
DebugValue
that
was obtained from DebugContext.evaluate(java.lang.String, java.lang.String)
.T
- a type of the return value of the supplierrun
- a supplier representing operations to be run in this contextpublic DebugContext getParent()
null
if there is no parent