public final class PolyglotAccess extends Object
If the two predefined access policies PolyglotAccess.NONE
and PolyglotAccess.ALL
are not sufficient then a
custom access configuration may be created using PolyglotAccess.newBuilder()
. This allows to grant
individual access rights between the language.
The following access rights may be granted:
between
two or just
for one
language. If a language has access to at least
one other language then the polyglot eval builtin will be available, otherwise access to that
builtin might be restricted. The concrete name of the polyglot eval builtin is language specific.
In JavaScript it is called Polyglot.eval
.
polyglot
bindings
. The names of the guest language builtins to access polyglot bindings are language
specific. In JavaScript they are called Polyglot.import
and
Polyglot.export
.
PolyglotAccess.ALL
is used. In this mode polyglot evaluation builtins are available even if there is
just one installed
language available.Modifier and Type | Class and Description |
---|---|
class |
PolyglotAccess.Builder
A builder for a polyglot access configuration.
|
Modifier and Type | Field and Description |
---|---|
static PolyglotAccess |
ALL
Provides guest languages full access to other languages using polyglot evaluation and binding
builtins.
|
static PolyglotAccess |
NONE
Provides guest languages no access to other languages using polyglot builtins evaluation and
binding builtins.
|
Modifier and Type | Method and Description |
---|---|
static PolyglotAccess.Builder |
newBuilder()
Creates a new custom polyglot access configuration builder.
|
public static final PolyglotAccess NONE
public static final PolyglotAccess ALL
public static PolyglotAccess.Builder newBuilder()