@Retention(value=RUNTIME) @Target(value=TYPE) public static @interface TruffleInstrument.Registration
instrument
implementations for
automatic discovery.Modifier and Type | Optional Element and Description |
---|---|
String |
id
A custom machine identifier for this instrument.
|
boolean |
internal
Specifies whether the instrument is accessible using the polyglot API.
|
Class<? extends InternalResource>[] |
internalResources
Declarative list of
InternalResource classes that is associated with this
instrument. |
String |
name
The name of the instrument in an arbitrary format for humans.
|
SandboxPolicy |
sandbox
Specifies the most strict sandbox policy in which the instrument can be used.
|
Class<?>[] |
services
Declarative list of classes this instrument is known to provide.
|
String |
version
The version for instrument in an arbitrary format.
|
String |
website
A link to a website with more information about the instrument.
|
public abstract String id
public abstract String name
public abstract String version
Engine.getVersion()
by default.public abstract boolean internal
public abstract Class<?>[] services
onCreate
method and instantiate and register
all
here in defined services.
Instruments automatically get created when their registered
service is requested
.
public abstract String website
The link can contain the following substitutions:
${graalvm-version}
${graalvm-version:format}
. See Version.format(java.lang.String)
.
${graalvm-website-version}
public abstract SandboxPolicy sandbox
ISOLATED
policy, it can be used in an
engine configured with sandbox policy TRUSTED
, CONSTRAINED
or
ISOLATED
. But it cannot be used in an engine configured with the
UNTRUSTED
sandbox policy.SandboxPolicy
public abstract Class<? extends InternalResource>[] internalResources
InternalResource
classes that is associated with this
instrument. Use the internalResources
attribute solely for registering required
internal resources. Optional internal resources should provide the associated instrument
identifier using the InternalResource.Id.componentId()
method. To unpack all resources of an
instrument embedders may use Engine.copyResources(Path, String...)
.InternalResource
,
InternalResource.Id