Interface TruffleInstrument.ContextLocalFactory<T>
- Enclosing class:
TruffleInstrument
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Context local factory for Truffle instruments. Creates a new value per context.
- Since:
- 20.3
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(TruffleContext context) Returns a new value for a context local of an instrument.
-
Method Details
-
create
Returns a new value for a context local of an instrument. The returned value must not benull
and must return a stable and exact type per registered instrument. A thread local must always return the sameclass
, even for multiple instances of the sameTruffleInstrument
. If this method throws anAbstractTruffleException
the exception interop messages may be executed without a context being entered.- Since:
- 20.3
- See Also:
-