public abstract static class TruffleLanguage.ContextReference<C> extends Object
Node.lookupContextReference(Class)
and the current context can be
accessed using the TruffleLanguage.ContextReference.get()
method of the returned reference.
The current context might vary between executions
if
resources or code is shared between multiple contexts.
Modifier | Constructor and Description |
---|---|
protected |
ContextReference()
Constructors for subclasses.
|
Modifier and Type | Method and Description |
---|---|
abstract C |
get()
Returns the current language context of the current execution context.
|
protected ContextReference()
public abstract C get()
context creation
or in the
language class constructor an IllegalStateException
is thrown. This methods is
designed to be called safely from compiled code paths.
The current context might vary between executions
if resources or code is shared between multiple contexts.