guest languages, instruments and
their available options.
By default every context creates its own engine instance implicitly when
instantiated. Multiple contexts can use an
explicit engine when using a context builder. If contexts
share the same engine instance then they share instruments and their configuration.
It can be useful to create an engine instance without a context to only
access meta-data for installed languages, instruments and their available options.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| public class | |
| private static class | Engine.
If Truffle is on the class-path (or a language), we do not want to expose these classes to embedders (users of the polyglot API). |
| private static class | |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Engine | |
| pack-priv final AbstractPolyglotImpl. | |
| private static final Engine | |
| private static final Map | |
| private static volatile Throwable | |
| pack-priv final Object | |
| private static volatile boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv <T> | |
| private <T> |
| Modifier and Type | Method and Description |
|---|---|
| public void | close(boolean
if cancelIfExecuting)true then currently executing contexts will be
cancelled, else an IllegalStateException is thrown.Closes this engine and frees up allocated native resources. |
| public void | close()
Implements java. Closes this engine and frees up allocated native resources. |
| public static boolean | Returns: true if at least one of the components has associated resources that
were unpacked into targetFolderthe folder to unpack resources into targetFolder, String... names of languages or instruments whose resources should be unpacked. If no
languages or instruments are provided, then all installed languages and
instruments are used components)Unpacks the language or instrument internal resources specified by the |
| public static Engine | |
| public static Engine | |
| pack-priv static Iterator | |
| pack-priv static Collection | |
| public static Path | Returns: the path to a folder containing the GraalVM ornull if it cannot be foundFinds the GraalVM home folder. |
| public Set | |
| pack-priv static AbstractPolyglotImpl | |
| public String | getImplementationName()
Gets a human-readable name of the polyglot implementation (for example, "Default Truffle Engine" or "Graal Truffle Engine"). |
| public Map | |
| public Map | getLanguages()
Gets a map of all installed languages with the language id as key and the language object as value. |
| public OptionDescriptors | |
| public String | |
| private static AbstractPolyglotImpl | |
| pack-priv static boolean | |
| pack-priv static boolean | |
| private static AbstractPolyglotImpl | |
| pack-priv static Class | |
| public static Engine. | |
| public static Engine. | Returns: a builder that can create a contextnames of languages permitted in the engine. If no languages are
provided, then all installed languages will be permitted. All contexts created
with this engine will inherit the set of permitted languages. permittedLanguages)Creates a new engine builder that allows to configure an engine instance. |
| pack-priv static void |