# polyglot 25.6.0-elide.4 > API reference for polyglot. Each page below is Markdown; the HTML page of the same name has the same content. llms-full.txt has every page in one file, and api.json is the apidocs/1 model. ## When to use this Use this API reference when you write, read or review code that uses polyglot 25.6.0-elide.4. ## Overview - [⬢ polyglot](index.md): packages and types - [Alphabetical index](index-all.md): find `Type.member` or search by behavior. Check the declaring type and overload, then follow the matching link. - [Declaration contracts](contracts.ndjson): full structured records for a known `Type.member`, including documented parameters, returns and throws. - [llms-full.txt](llms-full.txt): every page in one file - [api.json](api.json): the apidocs/1 model ## Pages - [▣ Package org.graalvm.home](org/graalvm/home/index.md): The GraalVM SDK home API allows query home paths for the GraalVM, its languages and its tools. - [◆ HomeFinder (abstract class in org.graalvm.home)](org/graalvm/home/HomeFinder.md): A utility class to find various paths of the running GraalVM, as well as the version. getHomeFolder(): Returns: the GraalVM home folder if inside GraalVM or null otherwise. getVersion(): Returns: the GraalVM version or "snapshot" if unknown. getLanguageHomes(): Returns: a Map of language ids to their home path. getToolHomes(): Returns: a Map of tool ids to their home path. getInstance(): Returns: the HomeFinder instance by using a ServiceLoader. Throws: IllegalStateException - if no implementation could be found. - [◆ Version (class in org.graalvm.home)](org/graalvm/home/Version.md): A version utility to canonicalize and compare GraalVM versions. isRelease(): Returns true if this is a supported release build of GraalVM else false. isSnapshot(): Returns true if this is an unsupported snapshot build of GraalVM else false. compareTo(int...): Compares this version to another GraalVM version. format(String): Format the GraalVM version with a custom format string. getComponent(int): Retrieves the numeric value of the version component at the specified index. Throws: IllegalArgumentException - if componentIndex is negative parse(String): Parses a GraalVM version from its String raw format. Throws: IllegalArgumentException create(int...): Cons - [▣ Package org.graalvm.options](org/graalvm/options/index.md): The GraalVM SDK options package contains reusable collection classes for options. - [◆ ConstantOptionKey (class in org.graalvm.options)](org/graalvm/options/ConstantOptionKey.md): Represents an OptionKey whose value is fixed before the polyglot runtime is initialized and cannot be changed afterwards. ConstantOptionKey(T): Constructs a new constant option key with the given default value. ConstantOptionKey(T, OptionType): Constructs a new constant option key with an explicit option type and default value. getConstantValue(): Returns the constant value of this option key. Throws: IllegalStateException - if the value has not been set yet, which should not happen in normal usage as the generated option descriptors static ini setConstantValue(T): Sets the constant value of this option key. Throws: IllegalStateException - if the value has already been set, or if called at native image run time. - [≡ OptionCategory (enum class in org.graalvm.options)](org/graalvm/options/OptionCategory.md): Categorizes options according to user relevance. USER: An option common for users to apply. EXPERT: An option only relevant in corner cases and for fine-tuning. INTERNAL: An option only relevant when debugging a language implementation or an instrument. values(): Returns the enum constants in declaration order. valueOf(String): Returns the enum constant with the given name. - [◆ OptionDescriptor (class in org.graalvm.options)](org/graalvm/options/OptionDescriptor.md): Represents metadata for a single option. getName(): Returns the name of the option that this descriptor represents. getKey(): Returns the key for this option. isDeprecated(): Returns true if this option was marked deprecated. getDeprecationMessage(): Returns the deprecation reason and the recommended fix. isOptionMap(): Returns true if this option is an option map. getCategory(): Returns the user category of this option. getStability(): Returns the stability of this option. getHelp(): Returns a human-readable description on how to use the option. - [◆ OptionDescriptor.Builder (class in org.graalvm.options)](org/graalvm/options/OptionDescriptor.Builder.md): Represents an option descriptor builder. category(OptionCategory): Defines the user category for this option. stability(OptionStability): Defines the stability of this option. deprecated(boolean): Defines if this option is deprecated. help(String): Specifies a human-readable description on how to use the option. usageSyntax(String): Specifies a human-readable syntax describing the accepted values for this option. deprecationMessage(String): Specifies a human-readable deprecation reason and the recommended fix. constant(boolean): Marks this option as constant. build(): Builds and returns a new option descriptor. Throws: IllegalArgumen - [◇ OptionDescriptors (interface in org.graalvm.options)](org/graalvm/options/OptionDescriptors.md): An interface to a set of OptionDescriptors. EMPTY: An empty set of option descriptors. get(String): Gets the OptionDescriptor matching a given option name or null if this option descriptor set does not contain a matching option name. createUnion(OptionDescriptors...): Creates a union options descriptor out of multiple given descriptors. create(List): Creates an OptionDescriptors instance from a list. - [◆ OptionKey (sealed class in org.graalvm.options)](org/graalvm/options/OptionKey.md): Represents the option key for an option specification. OptionKey(T): Constructs a new option key given a default value. OptionKey(T, OptionType): Constructs a new option key given a default value and option key. mapOf(Class): Constructs a new option key to group/accumulate options with common prefixes. getType(): Returns the option type of this key. getDefaultValue(): Returns the default value for this option. getValue(OptionValues): Returns the value of this key given the values. hasBeenSet(OptionValues): Returns true if a value for this key has been set for the given option values or false if no value has been set. - [◆ OptionMap (class in org.graalvm.options)](org/graalvm/options/OptionMap.md): Represents a mapping between String keys and values. empty(): Returns an empty option map (immutable). Returns: an empty option map get(String): Returns the value to which the specified key is mapped, or null if this option map contains no mapping for the key. Returns: the value to which the specified key is mapped, or null if this map contains no ma entrySet(): Returns an unmodifiable Set view of the mappings contained in this map. Returns: a set view of the mappings contained in this map - [≡ OptionStability (enum class in org.graalvm.options)](org/graalvm/options/OptionStability.md): Categorizes options according to their stability. STABLE: A stable option is expected to remain available for many releases. EXPERIMENTAL: An experimental option has no guarantees of stability and might be removed at any point. values(): Returns the enum constants in declaration order. valueOf(String): Returns the enum constant with the given name. - [◆ OptionType (class in org.graalvm.options)](org/graalvm/options/OptionType.md): Represents a type of an option that allows to convert string values to Java values. OptionType(String, Function, Consumer): Constructs a new option type with name and function that allows to convert a string to the option type and validator of the option values. OptionType(String, Function): Constructs a new option type with name and function that allows to convert a string to the option type. OptionType(String, T, …): Deprecated. Use OptionType(String, Function, Consumer) OptionType(String, T, Function): Deprecated. Use OptionType(String, Function) getDefaultValue(): Deprecated. getName(): Returns the name of this type. convert(String): Converts a string value, validates it, - [◇ OptionValues (interface in org.graalvm.options)](org/graalvm/options/OptionValues.md): Represents a set of option values based on an OptionDescriptor. getDescriptors(): Returns all available options. set(OptionKey, T): Deprecated. OptionValues should be read-only. If the value of an option needs to be altered after options are set, then the new value should be stored in the language's context or instrument fields and get(OptionKey): Returns the value of a given option. hasBeenSet(OptionKey): Determines if a value for optionKey has been set explicitly by the Context or Engine, and therefore get(OptionKey) does not call OptionKey.getDefaultValue(). hasSetOptions(): Determines if a value for any of the option keys in option descriptors has been - [▣ Package org.graalvm.polyglot](org/graalvm/polyglot/index.md): The GraalVM SDK polyglot API allows to embed Graal languages in Java applications. - [◆ Context (class in org.graalvm.polyglot)](org/graalvm/polyglot/Context.md): A polyglot context for Graal guest languages that allows to evaluate code. getEngine(): Provides access to meta-data about the underlying Graal engine. Returns: Graal Engine being used by this context eval(Source): Evaluates a source object by using the language specified in the source. Returns: the evaluation result. The returned instance is never null, but the result might represent a null value. Throws: PolyglotExc eval(String, CharSequence): Evaluates a guest language code literal, using a provided language id. Returns: the evaluation result. The returned instance is never null, but the result might represent a null value. Throws: parse(Source): Parses but does n - [◆ Context.Builder (class in org.graalvm.polyglot)](org/graalvm/polyglot/Context.Builder.md): Builder class to construct Context instances. apply(Consumer): Applies the provided Consumer to this Builder instance. engine(Engine): Explicitly sets the underlying engine to use. out(OutputStream): Sets the standard output stream to be used for the context. err(OutputStream): Sets the error output stream to be used for the context. in(InputStream): Sets the input stream to be used for the context. allowHostAccess(boolean): Deprecated. use allowHostAccess(HostAccess) or allowHostClassLookup(Predicate) instead. Allows guest languages to access the host language by loading new classes. allowHostAccess(HostAccess): Configures which public c - [◆ Engine (class in org.graalvm.polyglot)](org/graalvm/polyglot/Engine.md): An execution engine for Graal guest languages that allows to inspect the the installed guest languages, instruments and their available options. getLanguages(): Gets a map of all installed languages with the language id as key and the language object as value. getInstruments(): Gets all installed instruments of this engine. getOptions(): Returns all options available for the engine. getVersion(): Gets the version string of the engine in an unspecified format. close(boolean): Closes this engine and frees up allocated native resources. close(): Closes this engine and frees up allocated native resources. Throws: IllegalStateException - if there currently executing open context instances. storeCache(Path): Stores the auxiliary engine cache - [◆ Engine.Builder (class in org.graalvm.polyglot)](org/graalvm/polyglot/Engine.Builder.md): out(OutputStream): Sets the standard output stream to be used for this engine. err(OutputStream): Sets the standard error stream to be used for this engine. in(InputStream): Sets the standard input stream to be used for this engine. allowExperimentalOptions(boolean): Allow experimental options to be used for instruments and engine options. useSystemProperties(boolean): Specifies whether the engine should use system properties if no explicit option is set. option(String, String): Sets an option for an engine, language or instrument. sandbox(SandboxPolicy): Sets a code sandbox policy to an engin - [◇ Engine.CancellationCallback (interface in org.graalvm.polyglot)](org/graalvm/polyglot/Engine.CancellationCallback.md): A callback that is invoked repeatedly while persisting the auxiliary engine cache. shouldCancel(): Returns: whether auxiliary engine cache persistence should be cancelled. - [◆ Engine.Preinitialized (class in org.graalvm.polyglot)](org/graalvm/polyglot/Engine.Preinitialized.md): Prepared engine state that can be consumed by one engine build. getCachedSources(): Returns an immutable snapshot of the sources cached in this prepared state. Returns: an immutable set of cached sources Throws: IllegalStateException - if this state has been consumed or closed close(): Releases this prepared state if it has not been consumed. - [◆ EnvironmentAccess (class in org.graalvm.polyglot)](org/graalvm/polyglot/EnvironmentAccess.md): Represents an access policy to the process environment for the guest languages of a context. NONE: Provides guest languages no access to process environment. INHERIT: Provides guest languages read access to process environment. - [◆ HostAccess (class in org.graalvm.polyglot)](org/graalvm/polyglot/HostAccess.md): Represents the host access policy of a polyglot context. EXPLICIT: Predefined host access policy that allows access to public host methods or fields that were annotated with @Export and were declared in public class. SCOPED: Predefined host access policy that is the same as EXPLICIT and enables method scoping of callback parameter values on top. ALL: Predefined host access policy that allows full unrestricted access to public methods or fields of public host classes. NONE: Predefined host access policy that disallows any access to public host methods or fields. CONSTRAINED: Predefined host access policy used by Context with a SandboxPolicy.CONSTRAIN - [◆ HostAccess.Builder (class in org.graalvm.polyglot)](org/graalvm/polyglot/HostAccess.Builder.md): Builder to create a custom host access policy. allowAccessAnnotatedBy(Class): Allows access to public constructors, methods or fields of public classes that were annotated by the given annotation class. allowPublicAccess(boolean): Allows unrestricted access to all public constructors, methods or fields of public classes. allowPublicAccess(Predicate): Allows access to public constructors, methods or fields of public classes for which the given predicate returns true. Returns: this builder Throws: NullPointerException - if predicate is nul allowAccess(Executable): Allows access to a given constructor or method. allowAccess(Field): Allows acc - [@ HostAccess.DisableMethodScoping (annotation interface in org.graalvm.polyglot)](org/graalvm/polyglot/HostAccess.DisableMethodScoping.md): If HostAccess.SCOPED is used, placing this annotation on an exported host function excludes it from parameter scoping, i.e. - [@ HostAccess.Export (annotation interface in org.graalvm.polyglot)](org/graalvm/polyglot/HostAccess.Export.md): Annotation used by the predefined EXPLICIT access policy to mark public constructors, methods and fields in public classes that should be accessible by the guest application. - [@ HostAccess.Implementable (annotation interface in org.graalvm.polyglot)](org/graalvm/polyglot/HostAccess.Implementable.md): Allows guest language to implement a Java type. - [≡ HostAccess.MutableTargetMapping (enum class in org.graalvm.polyglot)](org/graalvm/polyglot/HostAccess.MutableTargetMapping.md): List of default host object mappings of mutable target types available in Value.as(Class). ARRAY_TO_JAVA_LIST: Enables default mapping of guest object arrays to host object java.util.List. ITERATOR_TO_JAVA_ITERATOR: Enables default mapping of guest object iterators to host object java.util.Iterator. ITERABLE_TO_JAVA_ITERABLE: Enables default mapping of guest object iterables to host object java.lang.Iterable. HASH_TO_JAVA_MAP: Enables default mapping of guest object hashes to host object java.util.Map. MEMBERS_TO_JAVA_MAP: Enables default mapping of guest objects with members to java.util.Map. MEMBERS_TO_JAVA_INTERFACE: Enables default mapping of guest objects with members to a Java - [@ HostAccess.Optimized (annotation interface in org.graalvm.polyglot)](org/graalvm/polyglot/HostAccess.Optimized.md): Requests an implementation optimized for invocation speed when converting a guest value to this interface with Value.as(Class). - [≡ HostAccess.TargetMappingPrecedence (enum class in org.graalvm.polyglot)](org/graalvm/polyglot/HostAccess.TargetMappingPrecedence.md): Represents the precedence of a target type mapping. HIGHEST: Defines higher precedence and conversion order as all default mappings and target type mappings with lower precedence. HIGH: Defines high or default precedence and conversion order for a target type mapping. LOW: Defines low precedence and conversion order for a target type mapping. LOWEST: Defines lowest precedence and conversion order for a target type mapping. values(): Returns the enum constants in declaration order. valueOf(String): Returns the enum constant with the given name. - [◆ Instrument (class in org.graalvm.polyglot)](org/graalvm/polyglot/Instrument.md): A handle for an instrument installed in an engine. getId(): Gets the ID clients can use to acquire this instrument. Returns: the unique ID for this instrument. getName(): Gets a human-readable name for this instrument. Returns: the user-friendly name for this instrument. getOptions(): Gets the options available for this instrument. Returns: the options as OptionDescriptors. getSourceOptions(): Returns the source options descriptors available for sources of this instrument. getVersion(): Gets the version of this instrument. Returns: the version of this instrument. lookup(Class): Looks up an additional internal service that is provided by this i - [◆ Language (class in org.graalvm.polyglot)](org/graalvm/polyglot/Language.md): A handle for a Graal language installed in an engine. getId(): Gets the primary identification string of this language. Returns: a language ID string. getName(): Gets a human-readable name for the language (for example, "JavaScript"). Returns: the user-friendly name for this language. getImplementationName(): Gets a human-readable name of the language implementation (for example, "Graal.JS"). getVersion(): Gets the version information of the language in an arbitrary language-specific format. isInteractive(): Returns true if a the language is suitable for interactive evaluation of sources. getOptions(): Returns the set of options provided by this - [◆ PolyglotAccess (class in org.graalvm.polyglot)](org/graalvm/polyglot/PolyglotAccess.md): Represents an access policy for polyglot builtins in the guest languages. NONE: Provides guest languages no access to other languages using polyglot builtins evaluation and binding builtins. ALL: Provides guest languages full access to other languages using polyglot evaluation and binding builtins. newBuilder(): Creates a new custom polyglot access configuration builder. - [◆ PolyglotAccess.Builder (class in org.graalvm.polyglot)](org/graalvm/polyglot/PolyglotAccess.Builder.md): A builder for a polyglot access configuration. allowEvalBetween(String...): Allows bidirectional evaluation of code between the given languages. denyEvalBetween(String...): Denies bidirectional evaluation of code between the given languages. allowEval(String, String): Allows evaluation of code by one language of another. denyEval(String, String): Denies evaluation of code by one language of another. allowBindingsAccess(String): Allows access to polyglot bindings for a language. denyBindingsAccess(String): Denies access to polyglot bindings for a language. build(): Creates an instance of the custom polyglot access configuration. - [⚡︎ PolyglotException (exception in org.graalvm.polyglot)](org/graalvm/polyglot/PolyglotException.md): A polyglot exception represents errors that contain Graal guest languages on the stack trace. toString(): Returns a short description of this exception. Returns: a string representation of this exception. printStackTrace(): Prints host and guest language stack frames to the standard error output. printStackTrace(PrintStream): Prints host and guest language stack frames to specified print stream. printStackTrace(PrintWriter): Prints host and guest language stack frames to specified print writer. fillInStackTrace(): Unsupported, PolyglotException instances are not writable therefore filling the stack trace has no effect for them. getStackTrace(): Gets stack trace elements for Java and gu - [◆ PolyglotException.StackFrame (class in org.graalvm.polyglot)](org/graalvm/polyglot/PolyglotException.StackFrame.md): Represents a polyglot stack frame originating from a guest language or the host language Java. isHostFrame(): Returns true if the stack frame originates from the host language. isGuestFrame(): Returns true if the stack frame originates from the guest language. toHostFrame(): Returns a Java stack trace element representation of the polyglot stack trace element. getSourceLocation(): Returns the source location of the stack frame or null if no source location is available. getBytecodeIndex(): Returns the bytecode index of this frame if available, or a negative number if no bytecode index is available. getRootName(): Returns the root name of this stack frame. getLanguage(): Returns the lang - [◆ PreinitializedSources (class in org.graalvm.polyglot)](org/graalvm/polyglot/PreinitializedSources.md): Registers sources that context pre-initialization parses when a native image is built. register(Source...): Registers sources to be parsed by context pre-initialization: all of them, or none if this method throws. Throws: IllegalStateException - if the contexts were already pre-initialized, or if called in - [◆ ResourceLimitEvent (class in org.graalvm.polyglot)](org/graalvm/polyglot/ResourceLimitEvent.md): Event triggered by a resource limit for a context. getContext(): The context for which the limit was exceeded. - [◆ ResourceLimits (class in org.graalvm.polyglot)](org/graalvm/polyglot/ResourceLimits.md): Represents resource limits configuration that is used to configure contexts. newBuilder(): Creates a new builder to construct ResourceLimits instances. - [◆ ResourceLimits.Builder (class in org.graalvm.polyglot)](org/graalvm/polyglot/ResourceLimits.Builder.md): A builder used to construct resource limits. statementLimit(long, Predicate): Specifies the maximum number of statements a context may execute until the onLimit event is notified and the context will be closed. onLimit(Consumer): Notified when a resource limit is reached. build(): Builds the limit configuration object. - [≡ SandboxPolicy (enum class in org.graalvm.polyglot)](org/graalvm/polyglot/SandboxPolicy.md): The sandbox policy presets and validates configurations of a context or engine to be suitable as a code sandbox. TRUSTED: Policy intended for fully trusted applications. CONSTRAINED: Policy intended for trusted, but potentially buggy applications. ISOLATED: Policy intended for trusted applications, but which might have security vulnerabilities and optionally that can be mitigated using this policy. UNTRUSTED: Policy intended for untrusted applications. isStricterThan(SandboxPolicy): Tests whether this SandboxPolicy is stricter than other. isStricterOrEqual(SandboxPolicy): Tests whether this SandboxPolicy is stricter or equal to other. values(): Returns the enum constants in declaration order. valueOf(Str - [◆ Source (class in org.graalvm.polyglot)](org/graalvm/polyglot/Source.md): Representation of a source code unit and its contents that can be evaluated in an execution context. getLanguage(): Returns the language this source created with. getName(): Returns the name of this resource holding a guest language program. Returns: the name of the guest language program getPath(): The fully qualified name of the source. getURL(): The URL if the source is retrieved via URL. Returns: URL or null getURI(): Get the URI of the source. Returns: a URI, never null isInteractive(): Check whether this source has been marked as interactive. Returns: whether this source is marked as interactive isInternal(): Gets whether this source has been marked as internal, meaning that it has been - [◆ Source.Builder (class in org.graalvm.polyglot)](org/graalvm/polyglot/Source.Builder.md): Represents a builder to build Source objects. name(String): Specifies a name to the to-be-built Source. Returns: instance of this builder content(String): Specifies content of to-be-built Source. Returns: instance of this builder content(CharSequence): Specifies character based content of to-be-built Source. Returns: instance of this builder - which's build() method no longer throws an IOException content(ByteSequence): Specifies byte based content of to-be-built Source. Returns: instance of this builder - which's build() method no longer throws an IOException mimeType(String): Explicitly assigns a MIME type to the to-be-built Source. Ret - [◆ SourceSection (class in org.graalvm.polyglot)](org/graalvm/polyglot/SourceSection.md): Description of contiguous section of text within a Source of program code.; supports multiple modes of access to the text and its location. isAvailable(): Returns whether this is a special instance that signifies that source information is available. hasLines(): Returns true if this section has a line number information, false otherwise. hasColumns(): Returns true if this section has a column number information, false otherwise. hasCharIndex(): Returns true if this section has a character index information, false otherwise. getSource(): Representation of the source program that contains this section. Returns: the source object. getStartLine(): Returns 1-based line number of the first character in this section (inclusive). Returns: - [◆ TypeLiteral (abstract class in org.graalvm.polyglot)](org/graalvm/polyglot/TypeLiteral.md): Represents a generic type T. TypeLiteral(): Constructs a new type literal. getType(): Returns the type literal including generic type information. getRawType(): Returns the raw class type of the literal. - [◆ Value (class in org.graalvm.polyglot)](org/graalvm/polyglot/Value.md): Represents a polyglot value that can be accessed using a set of language agnostic operations. getMetaObject(): Returns the metaobject that is associated with this value or null if no metaobject is available. Throws: IllegalStateException - if the context is already closed. Throws: PolyglotException - if a guest l isMetaObject(): Returns true if the value represents a metaobject. Throws: IllegalStateException - if the context is already closed. Throws: PolyglotException - if a guest language error occurred during execution. getMetaQualifiedName(): Returns the qualified name of a metaobject as String. Throws: UnsupportedOperationException - if and only if isMetaObject() returns false for - [◆ Value.StringEncoding (class in org.graalvm.polyglot)](org/graalvm/polyglot/Value.StringEncoding.md): Enum like class representing the supported string encodings. UTF_16: The native UTF 16 encoding for the current platform. UTF_32: The native UTF 32 encoding for the current platform. - [▣ Package org.graalvm.polyglot.io](org/graalvm/polyglot/io/index.md): Input/Output support for the GraalVM SDK polyglot API. - [◇ ByteSequence (interface in org.graalvm.polyglot.io)](org/graalvm/polyglot/io/ByteSequence.md): A ByteSequence is a readable sequence of byte values. length(): Returns the length of this byte sequence. Returns: the number of bytes in this sequence byteAt(int): Returns the byte value at the specified index. Returns: the specified byte value Throws: IndexOutOfBoundsException - if the index argument is negative or not less than length() subSequence(int, int): Returns a ByteSequence that is a subsequence of this sequence. Returns: the specified subsequence Throws: IndexOutOfBoundsException - if start or end are negative, if end is greater than length(), toByteArray(): Returns a byte\[\] containing the bytes in this sequence in the same order as - [◇ FileChannel (interface in org.graalvm.polyglot.io)](org/graalvm/polyglot/io/FileChannel.md): A seekable byte channel that supports file locking and, on JDK 22 and later, mapping regions of its file into memory. position(long): Throws: IOException truncate(long): Throws: IOException lock(): Acquires an exclusive lock on this channel's file, blocking until the lock is acquired, this channel is closed, or the invoking thread is interrupted. Returns: a newly acquired exclusive lock Throws: ClosedChanne lock(long, long, boolean): Acquires a lock on a region of this channel's file, blocking until the lock is acquired, this channel is closed, or the invoking thread is interrupted. Returns: the newly acquired lock Throws: tryLock(): Attempts to acquire an exclusive lock on this channel's file without blocki - [◇ FileLock (interface in org.graalvm.polyglot.io)](org/graalvm/polyglot/io/FileLock.md): Represents a lock on a region of a file acquired through a FileChannel. acquiredBy(): Returns the channel through which this lock was acquired. Returns: the channel through which this lock was acquired position(): Returns the position of the first byte in the locked region. Returns: the position of the first byte in the locked region size(): Returns the size of the locked region in bytes. Returns: the size of the locked region in bytes isShared(): Returns whether this lock is shared. Returns: true if this lock is shared, or false if it is exclusive isValid(): Returns whether this lock is valid. Returns: true if this lock is valid close(): Releases this lock. Throw - [◇ FileSystem (interface in org.graalvm.polyglot.io)](org/graalvm/polyglot/io/FileSystem.md): Service-provider for Truffle files. parsePath(URI): Parses a path from an URI. Returns: the Path representing given URI Throws: UnsupportedOperationException - when URI scheme is not supported Throws: IllegalArgumentException - if preconditions on the uri parsePath(String): Parses a path from a String. Returns: the Path Throws: UnsupportedOperationException - when the FileSystem supports only URI Throws: IllegalArgumentException - if the path string cannot be converted to checkAccess(Path, Set, LinkOption...): Checks existence and accessibility of a file. Throws: NoSuchFileException - if the file denoted by the path does not ex - [◆ FileSystem.Selector (abstract class in org.graalvm.polyglot.io)](org/graalvm/polyglot/io/FileSystem.Selector.md): A selector for determining which FileSystem should handle operations on a given Path. Selector(FileSystem): Creates a Selector for the specified FileSystem. getFileSystem(): Returns the FileSystem associated with this selector. test(Path): Tests whether the FileSystem associated with this selector can handle operations on the specified Path. Returns: true if the associated FileSystem can handle the path; false otherwise of(FileSystem, Predicate): Creates a Selector for the specified FileSystem using the provided Predicate. Returns: a new Selector that delegates path testing to the predicate - [◆ IOAccess (class in org.graalvm.polyglot.io)](org/graalvm/polyglot/io/IOAccess.md): Represents an IO access configuration of a polyglot context. NONE: Provides guest language no access to IO. ALL: Provides guest language full access to host IO. newBuilder(): Creates a new builder that allows to create a custom IO access configuration. newBuilder(IOAccess): Creates a new builder that allows to create a custom IO access configuration based of a preset configuration. - [◆ IOAccess.Builder (class in org.graalvm.polyglot.io)](org/graalvm/polyglot/io/IOAccess.Builder.md): Builder to create a custom IO access configuration. allowHostFileAccess(boolean): If true, it allows the guest language unrestricted access to files on the host system. allowHostSocketAccess(boolean): If true, it allows the guest language unrestricted access to host system sockets. fileSystem(FileSystem): Sets a new FileSystem. Returns: the Builder build(): Creates an instance of the custom IO access configuration. Throws: IllegalArgumentException - if host file access is enabled and a custom file system is set. - [◇ MessageEndpoint (interface in org.graalvm.polyglot.io)](org/graalvm/polyglot/io/MessageEndpoint.md): An endpoint representing one side of message transport. sendText(String): Send a text message. Throws: IOException sendBinary(ByteBuffer): Send a binary message. Throws: IOException sendPing(ByteBuffer): Send a ping request. Throws: IOException sendPong(ByteBuffer): Send a pong reply as a response to ping. Throws: IOException sendClose(): Close the connection. Throws: IOException - [◇ MessageTransport (interface in org.graalvm.polyglot.io)](org/graalvm/polyglot/io/MessageTransport.md): Allows to take over transport of message communication initiated by an instrument. open(URI, MessageEndpoint): Called when a connection to an URI is to be established. Returns: an implementation of MessageEndpoint call back, or null. Throws: MessageTransport.VetoException - to veto connection to the UR - [⚡︎ MessageTransport.VetoException (exception in org.graalvm.polyglot.io)](org/graalvm/polyglot/io/MessageTransport.VetoException.md): Thrown when a transport connection is vetoed. VetoException(String): Create a new VetoException. - [◇ ProcessHandler (interface in org.graalvm.polyglot.io)](org/graalvm/polyglot/io/ProcessHandler.md): Service-provider for guest languages process builder. start(ProcessHandler.ProcessCommand): A request to start a new subprocess with given attributes. Throws: SecurityException - if the process creation was forbidden by this handler Throws: IOException - if the process fail - [◆ ProcessHandler.ProcessCommand (class in org.graalvm.polyglot.io)](org/graalvm/polyglot/io/ProcessHandler.ProcessCommand.md): Subprocess attributes passed to start method. getCommand(): Returns the subprocess executable and arguments as an immutable list. getDirectory(): Returns the subprocess working directory. getEnvironment(): Returns the subprocess environment as an immutable map. isRedirectErrorStream(): Return whether the standard error output should be merged into standard output. getInputRedirect(): Returns the standard input source. getOutputRedirect(): Returns the standard output destination. getErrorRedirect(): Returns the standard error output destination. create(List, String, …): Creates a ProcessCommand. - [◆ ProcessHandler.Redirect (class in org.graalvm.polyglot.io)](org/graalvm/polyglot/io/ProcessHandler.Redirect.md): Represents a source of subprocess input or a destination of subprocess output. PIPE: Indicates that subprocess I/O will be connected to the current Java process using a pipe. INHERIT: Indicates that subprocess I/O source or destination will be the same as those of the current process. getOutputStream(): Returns the output stream to redirect to. createRedirectToStream(OutputStream): Creates a ProcessCommand. - [▣ Package org.graalvm.polyglot.management](org/graalvm/polyglot/management/index.md): The management package provides tools that monitor and instrument the behavior of guest language programs. - [◆ ExecutionEvent (class in org.graalvm.polyglot.management)](org/graalvm/polyglot/management/ExecutionEvent.md): An execution event object passed to an execution listener consumer. getLocation(): Returns the source location of the event that was triggered or null if no location source location is available. getRootName(): Returns the root name or null if no name is available. getInputValues(): Returns the input values provided to execute this source location. getReturnValue(): Returns the return value of this source location after it was executed. getException(): Returns the exception of this source location after it was executed. isExpression(): Returns true if the source location is marked as expression, else false. isStatement(): Returns true if the source location is - [◆ ExecutionListener (class in org.graalvm.polyglot.management)](org/graalvm/polyglot/management/ExecutionListener.md): Execution listeners allow to instrument the execution of guest languages. close(): Closes and detaches this execution listener from the engine. newBuilder(): Creates a builder that can be used to attach execution listeners. - [◆ ExecutionListener.Builder (class in org.graalvm.polyglot.management)](org/graalvm/polyglot/management/ExecutionListener.Builder.md): A builder used to construct execution events. onEnter(Consumer): Set a listener that is notified when an execution of an element is entered. onReturn(Consumer): Set a listener that is notified when an execution of an element was entered and completed. sourceFilter(Predicate): Set an addition filter that filters execution events by source. rootNameFilter(Predicate): Set an addition filter execution events by root name. roots(boolean): Include program locations that are marked as root of a function, method or closure. statements(boolean): Include program locations that are marked as statements. expressions(boolean): Include program location - [▣ Package org.graalvm.polyglot.proxy](org/graalvm/polyglot/proxy/index.md): The GraalVM SDK proxy interfaces allow to mimic guest language objects, arrays, executables, primitives and native objects in Graal languages. - [◇ Proxy (interface in org.graalvm.polyglot.proxy)](org/graalvm/polyglot/proxy/Proxy.md): Proxy interfaces allow to mimic guest language objects, arrays, executables, primitives and native objects in Graal languages. - [◇ ProxyArray (interface in org.graalvm.polyglot.proxy)](org/graalvm/polyglot/proxy/ProxyArray.md): Interface to be implemented to mimic guest language arrays. get(long): Returns the element at the given index. Throws: ArrayIndexOutOfBoundsException - if the index is out of bounds Throws: UnsupportedOperationException - if the operation is not supported set(long, Value): Sets the element at the given index. Throws: ArrayIndexOutOfBoundsException - if the index is out of bounds Throws: UnsupportedOperationException - if the operation is not supported remove(long): Removes the element at the given index. Returns: true when the element was removed, false when the element didn't exist. Throws: ArrayIndexOutOfBoundsException - if the index is out of bound - [◇ ProxyDate (interface in org.graalvm.polyglot.proxy)](org/graalvm/polyglot/proxy/ProxyDate.md): Interface to be implemented to mimic guest language objects that represents dates. asDate(): Returns the date information. from(LocalDate): Creates a proxy date from a local date. - [◇ ProxyDuration (interface in org.graalvm.polyglot.proxy)](org/graalvm/polyglot/proxy/ProxyDuration.md): Interface to be implemented to mimic guest language objects that represents durations. asDuration(): Returns the duration information. from(Duration): Creates a proxy duration from a duration. - [◇ ProxyExecutable (interface in org.graalvm.polyglot.proxy)](org/graalvm/polyglot/proxy/ProxyExecutable.md): Interface to be implemented to mimic guest language objects that are executable. execute(Value...): Executes the object with the given arguments and returns its result. Throws: UnsupportedOperationException - if the proxy cannot be executed with the given arguments. - [◇ ProxyHashMap (interface in org.graalvm.polyglot.proxy)](org/graalvm/polyglot/proxy/ProxyHashMap.md): Interface to be implemented to mimic guest language hash maps. getHashSize(): Returns the number of map entries. hasHashEntry(Value): Returns true if the proxy object contains a mapping for the specified key, or else false. getHashValue(Value): Returns the value for the specified key. Throws: UnsupportedOperationException - if the operation is unsupported putHashEntry(Value, Value): Associates the specified value with the specified key. Throws: UnsupportedOperationException - if the operation is unsupported removeHashEntry(Value): Removes the mapping for a given key. Returns: true when the mapping was removed, false when the mapping didn't exist. Throws: - [◇ ProxyInstant (interface in org.graalvm.polyglot.proxy)](org/graalvm/polyglot/proxy/ProxyInstant.md): Interface to be implemented to mimic guest language objects that represents timestamps. asInstant(): Returns the instant information. asDate(): Returns the date information. asTime(): Returns the time information. asTimeZone(): Returns the timezone information. from(Instant): Creates a new proxy instant from a Java instant value. - [◇ ProxyInstantiable (interface in org.graalvm.polyglot.proxy)](org/graalvm/polyglot/proxy/ProxyInstantiable.md): Interface to be implemented to mimic guest language objects that are instantiable. newInstance(Value...): Creates a new instance of the object with the given arguments. Throws: UnsupportedOperationException - if the proxy cannot be instantiated with the given arguments. - [◇ ProxyIterable (interface in org.graalvm.polyglot.proxy)](org/graalvm/polyglot/proxy/ProxyIterable.md): Interface to be implemented to mimic guest language iterables. getIterator(): Returns an iterator. from(Iterable): Creates a proxy iterable backed by a Java Iterable. - [◇ ProxyIterator (interface in org.graalvm.polyglot.proxy)](org/graalvm/polyglot/proxy/ProxyIterator.md): Interface to be implemented to mimic guest language iterators. hasNext(): Returns true if the iterator has more elements, else false. getNext(): Returns the next element in the iteration. Throws: NoSuchElementException - if the iteration has no more elements, the hasNext() returns false. Throws: UnsupportedOperationException - when the underlying itera from(Iterator): Creates a proxy iterator backed by a Java Iterator. - [◇ ProxyNativeObject (interface in org.graalvm.polyglot.proxy)](org/graalvm/polyglot/proxy/ProxyNativeObject.md): Interface to be implemented to mimic native pointers. asPointer(): Returns the native pointer value that this object represents. - [◇ ProxyObject (interface in org.graalvm.polyglot.proxy)](org/graalvm/polyglot/proxy/ProxyObject.md): Interface to be implemented to mimic guest language objects that contain members. getMember(String): Returns the value of the member. Throws: UnsupportedOperationException - if the operation is unsupported getMemberKeys(): Returns an array of member keys. hasMember(String): Returns true if the proxy object contains a member with the given key, or else false. putMember(String, Value): Sets the value associated with a member. Throws: UnsupportedOperationException - if the operation is unsupported removeMember(String): Removes a member key and its value. Returns: true when the member was removed, false when the member didn't exist. Throws: UnsupportedOperationException - if th - [◇ ProxyTime (interface in org.graalvm.polyglot.proxy)](org/graalvm/polyglot/proxy/ProxyTime.md): Interface to be implemented to mimic guest language objects that represents times. asTime(): Returns the time information. from(LocalTime): Creates a proxy time from a local time. - [◇ ProxyTimeZone (interface in org.graalvm.polyglot.proxy)](org/graalvm/polyglot/proxy/ProxyTimeZone.md): Interface to be implemented to mimic guest language objects that represents timezones. asTimeZone(): Returns the timezone information. from(ZoneId): Creates a proxy timezone from a ZoneId. ## Indexes - [Packages](packages.md): every package with its summary and type counts - [All types](types.md): every type, nested ones too, by name - [Index](index-all.md): every declaration from A to Z - [Deprecated](deprecated.md): everything deprecated, for removal first