Package org.graalvm.polyglot
Class Instrument
java.lang.Object
org.graalvm.polyglot.Instrument
A handle for an instrument installed in an
engine
. The instrument is
usable from other threads. The handle provides access to the metadata of the instrument and
allows to lookup
instrument specific services.
All methods here, as well as instrumentation services in general, can be used safely from any thread.
- Since:
- 19.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetId()
Gets the ID clients can use to acquire this instrument.getName()
Gets a human-readable name for this instrument.Gets the options available for this instrument.Gets the version of this instrument.Gets the website of this instrument.<T> T
Looks up an additional internal service that is provided by this instrument using a Java type.
-
Method Details
-
getId
Gets the ID clients can use to acquire this instrument.- Returns:
- the unique ID for this instrument.
- Since:
- 19.0
-
getName
Gets a human-readable name for this instrument.- Returns:
- the user-friendly name for this instrument.
- Since:
- 19.0
-
getOptions
Gets the options available for this instrument.- Returns:
- the options as
OptionDescriptors
. - Since:
- 19.0
-
getVersion
Gets the version of this instrument.- Returns:
- the version of this instrument.
- Since:
- 19.0
-
lookup
Looks up an additional internal service that is provided by this instrument using a Java type. Note that the services returned by this method are implementation specific and subject to change without notice.- Type Parameters:
T
- the type of the internal service.- Parameters:
type
- class of the service that is being requested.- Returns:
- instance of requested type,
null
if no such service is available. - Since:
- 19.0
-
getWebsite
Gets the website of this instrument.- Returns:
- the website of this instrument.
- Since:
- 22.1.0
-