See: Description
| Interface | Description |
|---|---|
| ForeignAccess.Factory |
Interface of a factory that produces AST snippets that can access a foreign
TruffleObject. |
| ForeignAccess.StandardFactory | |
| TruffleObject |
Interface for any entity of a Truffle guest language implementations that can be shared across
other language implementations.
|
| Class | Description |
|---|---|
| ForeignAccess |
Encapsulates types of access to
TruffleObject. |
| KeyInfo |
This class represents
key info bit flags. |
| Message |
Inter-operability is based on sending messages.
|
| Exception | Description |
|---|---|
| ArityException |
An exception thrown if a foreign function or method invocation provides the wrong number of
arguments.
|
| InteropException |
Common super class for exceptions that can occur when sending
interop messages. |
| UnknownIdentifierException |
An exception thrown if a foreign access tries to access a property of a
TruffleObject
that is not accessible. |
| UnsupportedMessageException |
An exception thrown if a
TruffleObject does not support a Message. |
| UnsupportedTypeException |
An exception thrown if a
TruffleObject does not support the type of one ore more
arguments provided by a foreign access. |
| Annotation Type | Description |
|---|---|
| CanResolve |
Annotation to put on your node to provide a language check for the receiver object.
|
| MessageResolution |
Annotation to put on your node to simplify handling of incoming inter-operability
messages. |
| Resolve |
Annotation to put on your node to simplify handling of incoming inter-operability
messages. |
Languages can exchange primitive Java type wrapper objects (e.g., Byte,
Short, Integer, Long,
Float, Double, Character,
Boolean, and String) as well as any type implementing
TruffleObject. Foreign objects are precisely those
implementing TruffleObject.
To use a TruffleObject from a different language, you need
to ask the language to build appropriate AST for a given
Message with
Message.createNode(). The message can then be executed with
ForeignAccess methods.