Annotation Interface TruffleInstrument.Registration
- Enclosing class:
TruffleInstrument
Annotation that registers an
instrument
implementations for
automatic discovery.- Since:
- 0.12
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionA custom machine identifier for this instrument.boolean
Specifies whether the instrument is accessible using the polyglot API.Class<? extends InternalResource>[]
Declarative list ofInternalResource
classes that is associated with this instrument.The name of the instrument in an arbitrary format for humans.Specifies the most strict sandbox policy in which the instrument can be used.Class<?>[]
Declarative list of classes this instrument is known to provide.The version for instrument in an arbitrary format.A link to a website with more information about the instrument.
-
Element Details
-
id
String idA custom machine identifier for this instrument. If not defined then the fully qualified class name is used.- Since:
- 0.12
- Default:
""
-
name
String nameThe name of the instrument in an arbitrary format for humans.- Since:
- 0.12
- Default:
""
-
version
String versionThe version for instrument in an arbitrary format. It inherits fromEngine.getVersion()
by default.- Since:
- 0.12
- Default:
"inherit"
-
internal
boolean internalSpecifies whether the instrument is accessible using the polyglot API. Internal instruments are only accessible from other instruments or guest languages.- Since:
- 0.27
- Default:
false
-
services
Class<?>[] servicesDeclarative list of classes this instrument is known to provide. The instrument is supposed to override itsonCreate
method and instantiate andregister
all here in defined services.Instruments automatically get created when their registered
service is requested
.- Returns:
- list of service types that this instrument can provide
- Since:
- 0.25
- Default:
{}
-
website
String websiteA link to a website with more information about the instrument. Will be shown in the help text of GraalVM launchers.The link can contain the following substitutions:
${graalvm-version}
- the current GraalVM version. Optionally, a format string can be provided for the
version using
${graalvm-version:format}
. SeeVersion.format(java.lang.String)
. ${graalvm-website-version}
- the current GraalVM version in a format suitable for links to the GraalVM reference manual. The exact format may change without notice.
- Since:
- 22.1.0
- Default:
""
-
sandbox
SandboxPolicy sandboxSpecifies the most strict sandbox policy in which the instrument can be used. The instrument can be used in an engine with the specified sandbox policy or a weaker one. For example, if an instrument specifiesISOLATED
policy, it can be used in an engine configured with sandbox policyTRUSTED
,CONSTRAINED
orISOLATED
. But it cannot be used in an engine configured with theUNTRUSTED
sandbox policy.- Since:
- 23.0
- See Also:
- Default:
TRUSTED
-
internalResources
Class<? extends InternalResource>[] internalResourcesDeclarative list ofInternalResource
classes that is associated with this instrument. Use theinternalResources
attribute solely for registering required internal resources. Optional internal resources should provide the associated instrument identifier using theInternalResource.Id.componentId()
method. To unpack all resources of an instrument embedders may useEngine.copyResources(Path, String...)
.- Since:
- 23.1
- See Also:
- Default:
{}
-