{"schema":"apidocs/1","module":{"name":"polyglot","version":"25.6.0-elide.4","languages":["java"]},"externals":[{"prefix":"java.io.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.lang.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.lang.annotation.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.lang.classfile.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.lang.classfile.attribute.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.lang.classfile.constantpool.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.lang.classfile.instruction.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.lang.constant.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.lang.foreign.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.lang.invoke.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.lang.module.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.lang.ref.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.lang.reflect.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.lang.runtime.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.math.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.net.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.net.spi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.nio.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.nio.channels.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.nio.channels.spi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.nio.charset.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.nio.charset.spi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.nio.file.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.nio.file.attribute.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.nio.file.spi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.security.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.security.cert.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.security.interfaces.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.security.spec.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.text.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.text.spi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.time.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.time.chrono.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.time.format.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.time.temporal.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.time.zone.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.util.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.util.concurrent.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.util.concurrent.atomic.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.util.concurrent.locks.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.util.function.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.util.jar.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.util.random.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.util.regex.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.util.spi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.util.stream.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"java.util.zip.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"javax.crypto.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"javax.crypto.interfaces.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"javax.crypto.spec.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"javax.net.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"javax.net.ssl.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"javax.security.auth.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"javax.security.auth.callback.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"javax.security.auth.login.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"javax.security.auth.spi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"javax.security.auth.x500.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"javax.security.cert.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/"},{"prefix":"javax.annotation.processing.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.compiler/"},{"prefix":"javax.lang.model.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.compiler/"},{"prefix":"javax.lang.model.element.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.compiler/"},{"prefix":"javax.lang.model.type.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.compiler/"},{"prefix":"javax.lang.model.util.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.compiler/"},{"prefix":"javax.tools.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.compiler/"},{"prefix":"java.awt.datatransfer.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.datatransfer/"},{"prefix":"java.applet.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"java.awt.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"java.awt.color.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"java.awt.desktop.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"java.awt.dnd.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"java.awt.event.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"java.awt.font.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"java.awt.geom.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"java.awt.im.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"java.awt.im.spi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"java.awt.image.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"java.awt.image.renderable.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"java.awt.print.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"java.beans.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"java.beans.beancontext.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.accessibility.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.imageio.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.imageio.event.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.imageio.metadata.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.imageio.plugins.bmp.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.imageio.plugins.jpeg.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.imageio.plugins.tiff.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.imageio.spi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.imageio.stream.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.print.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.print.attribute.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.print.attribute.standard.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.print.event.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.sound.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.sound.midi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.sound.midi.spi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.sound.sampled.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.sound.sampled.spi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.swing.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.swing.border.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.swing.colorchooser.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.swing.event.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.swing.filechooser.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.swing.plaf.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.swing.plaf.basic.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.swing.plaf.metal.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.swing.plaf.multi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.swing.plaf.nimbus.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.swing.plaf.synth.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.swing.table.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.swing.text.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.swing.text.html.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.swing.text.html.parser.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.swing.text.rtf.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.swing.tree.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"javax.swing.undo.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/"},{"prefix":"java.lang.instrument.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.instrument/"},{"prefix":"java.util.logging.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/"},{"prefix":"java.lang.management.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.management/"},{"prefix":"javax.management.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.management/"},{"prefix":"javax.management.loading.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.management/"},{"prefix":"javax.management.modelmbean.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.management/"},{"prefix":"javax.management.monitor.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.management/"},{"prefix":"javax.management.openmbean.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.management/"},{"prefix":"javax.management.relation.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.management/"},{"prefix":"javax.management.remote.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.management/"},{"prefix":"javax.management.timer.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.management/"},{"prefix":"javax.management.remote.rmi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.management.rmi/"},{"prefix":"javax.naming.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.naming/"},{"prefix":"javax.naming.directory.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.naming/"},{"prefix":"javax.naming.event.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.naming/"},{"prefix":"javax.naming.ldap.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.naming/"},{"prefix":"javax.naming.ldap.spi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.naming/"},{"prefix":"javax.naming.spi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.naming/"},{"prefix":"java.net.http.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.net.http/"},{"prefix":"java.util.prefs.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.prefs/"},{"prefix":"java.rmi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.rmi/"},{"prefix":"java.rmi.dgc.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.rmi/"},{"prefix":"java.rmi.registry.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.rmi/"},{"prefix":"java.rmi.server.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.rmi/"},{"prefix":"javax.rmi.ssl.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.rmi/"},{"prefix":"javax.script.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.scripting/"},{"prefix":"javax.security.auth.kerberos.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.security.jgss/"},{"prefix":"org.ietf.jgss.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.security.jgss/"},{"prefix":"javax.security.sasl.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.security.sasl/"},{"prefix":"javax.smartcardio.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.smartcardio/"},{"prefix":"java.sql.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.sql/"},{"prefix":"javax.sql.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.sql/"},{"prefix":"javax.sql.rowset.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.sql.rowset/"},{"prefix":"javax.sql.rowset.serial.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.sql.rowset/"},{"prefix":"javax.sql.rowset.spi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.sql.rowset/"},{"prefix":"javax.transaction.xa.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.transaction.xa/"},{"prefix":"javax.xml.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"javax.xml.catalog.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"javax.xml.datatype.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"javax.xml.namespace.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"javax.xml.parsers.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"javax.xml.stream.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"javax.xml.stream.events.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"javax.xml.stream.util.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"javax.xml.transform.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"javax.xml.transform.dom.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"javax.xml.transform.sax.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"javax.xml.transform.stax.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"javax.xml.transform.stream.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"javax.xml.validation.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"javax.xml.xpath.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"org.w3c.dom.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"org.w3c.dom.bootstrap.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"org.w3c.dom.events.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"org.w3c.dom.ls.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"org.w3c.dom.ranges.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"org.w3c.dom.traversal.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"org.w3c.dom.views.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"org.xml.sax.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"org.xml.sax.ext.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"org.xml.sax.helpers.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml/"},{"prefix":"javax.xml.crypto.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml.crypto/"},{"prefix":"javax.xml.crypto.dom.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml.crypto/"},{"prefix":"javax.xml.crypto.dsig.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml.crypto/"},{"prefix":"javax.xml.crypto.dsig.dom.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml.crypto/"},{"prefix":"javax.xml.crypto.dsig.keyinfo.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml.crypto/"},{"prefix":"javax.xml.crypto.dsig.spec.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.xml.crypto/"},{"prefix":"com.sun.java.accessibility.util.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.accessibility/"},{"prefix":"com.sun.tools.attach.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.attach/"},{"prefix":"com.sun.tools.attach.spi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.attach/"},{"prefix":"com.sun.source.doctree.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.compiler/"},{"prefix":"com.sun.source.tree.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.compiler/"},{"prefix":"com.sun.source.util.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.compiler/"},{"prefix":"com.sun.tools.javac.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.compiler/"},{"prefix":"jdk.dynalink.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.dynalink/"},{"prefix":"jdk.dynalink.beans.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.dynalink/"},{"prefix":"jdk.dynalink.linker.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.dynalink/"},{"prefix":"jdk.dynalink.linker.support.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.dynalink/"},{"prefix":"jdk.dynalink.support.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.dynalink/"},{"prefix":"com.sun.net.httpserver.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.httpserver/"},{"prefix":"com.sun.net.httpserver.spi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.httpserver/"},{"prefix":"jdk.incubator.vector.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.incubator.vector/"},{"prefix":"jdk.security.jarsigner.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.jartool/"},{"prefix":"jdk.javadoc.doclet.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.javadoc/"},{"prefix":"com.sun.tools.jconsole.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.jconsole/"},{"prefix":"com.sun.jdi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.jdi/"},{"prefix":"com.sun.jdi.connect.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.jdi/"},{"prefix":"com.sun.jdi.connect.spi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.jdi/"},{"prefix":"com.sun.jdi.event.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.jdi/"},{"prefix":"com.sun.jdi.request.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.jdi/"},{"prefix":"jdk.jfr.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.jfr/"},{"prefix":"jdk.jfr.consumer.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.jfr/"},{"prefix":"jdk.jshell.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.jshell/"},{"prefix":"jdk.jshell.execution.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.jshell/"},{"prefix":"jdk.jshell.spi.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.jshell/"},{"prefix":"jdk.jshell.tool.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.jshell/"},{"prefix":"netscape.javascript.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.jsobject/"},{"prefix":"com.sun.management.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.management/"},{"prefix":"jdk.management.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.management/"},{"prefix":"jdk.management.jfr.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.management.jfr/"},{"prefix":"jdk.net.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.net/"},{"prefix":"jdk.nio.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.net/"},{"prefix":"jdk.nio.mapmode.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.nio.mapmode/"},{"prefix":"com.sun.nio.sctp.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.sctp/"},{"prefix":"com.sun.security.auth.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.security.auth/"},{"prefix":"com.sun.security.auth.callback.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.security.auth/"},{"prefix":"com.sun.security.auth.login.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.security.auth/"},{"prefix":"com.sun.security.auth.module.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.security.auth/"},{"prefix":"com.sun.security.jgss.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.security.jgss/"},{"prefix":"org.w3c.dom.css.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.xml.dom/"},{"prefix":"org.w3c.dom.html.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.xml.dom/"},{"prefix":"org.w3c.dom.stylesheets.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.xml.dom/"},{"prefix":"org.w3c.dom.xpath.","url":"https://docs.oracle.com/en/java/javase/25/docs/api/jdk.xml.dom/"},{"prefix":"org.graalvm.collections.","url":"https://graalvm.elide.help/25.6.0-elide.4/api/collections/"},{"prefix":"com.oracle.svm.core.annotate.","url":"https://graalvm.elide.help/25.6.0-elide.4/api/nativeimage/"},{"prefix":"org.graalvm.nativeimage.","url":"https://graalvm.elide.help/25.6.0-elide.4/api/nativeimage/"},{"prefix":"org.graalvm.nativeimage.c.","url":"https://graalvm.elide.help/25.6.0-elide.4/api/nativeimage/"},{"prefix":"org.graalvm.nativeimage.c.constant.","url":"https://graalvm.elide.help/25.6.0-elide.4/api/nativeimage/"},{"prefix":"org.graalvm.nativeimage.c.function.","url":"https://graalvm.elide.help/25.6.0-elide.4/api/nativeimage/"},{"prefix":"org.graalvm.nativeimage.c.struct.","url":"https://graalvm.elide.help/25.6.0-elide.4/api/nativeimage/"},{"prefix":"org.graalvm.nativeimage.c.type.","url":"https://graalvm.elide.help/25.6.0-elide.4/api/nativeimage/"},{"prefix":"org.graalvm.nativeimage.dynamicaccess.","url":"https://graalvm.elide.help/25.6.0-elide.4/api/nativeimage/"},{"prefix":"org.graalvm.nativeimage.hosted.","url":"https://graalvm.elide.help/25.6.0-elide.4/api/nativeimage/"}],"packages":[{"id":"org.graalvm.home","name":"org.graalvm.home","doc":{"summary":[{"kind":"text","text":"The GraalVM SDK home API allows query home paths for the GraalVM, its languages and its tools."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"The GraalVM SDK home API allows query home paths for the GraalVM, its languages and its tools."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.home.HomeFinder"},"code":true,"children":[{"kind":"text","text":"for querying home paths."}]}]]},"since":"19.3","types":[{"id":"org.graalvm.home.HomeFinder","name":"HomeFinder","kind":"class","language":"java","modifiers":["public","abstract"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"abstract"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"HomeFinder"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.home.HomeFinder#<init>()","anchor":"<init>()","kind":"constructor","name":"HomeFinder","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"name","text":"HomeFinder"},{"kind":"punct","text":"()"}],"since":"19.3","source":{"path":"org/graalvm/home/HomeFinder.java","line":64}},{"id":"org.graalvm.home.HomeFinder#getHomeFolder()","anchor":"getHomeFolder()","kind":"method","name":"getHomeFolder","modifiers":["public","abstract"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"abstract"},{"kind":"punct","text":" "},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getHomeFolder"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the GraalVM home folder if inside GraalVM or "},{"kind":"code","text":"null"},{"kind":"text","text":" otherwise."}]}]},"since":"19.3","source":{"path":"org/graalvm/home/HomeFinder.java","line":71}},{"id":"org.graalvm.home.HomeFinder#getVersion()","anchor":"getVersion()","kind":"method","name":"getVersion","modifiers":["public","abstract"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"abstract"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getVersion"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the GraalVM version or "},{"kind":"code","text":"\"snapshot\""},{"kind":"text","text":" if unknown."}]}]},"since":"19.3","source":{"path":"org/graalvm/home/HomeFinder.java","line":77}},{"id":"org.graalvm.home.HomeFinder#getLanguageHomes()","anchor":"getLanguageHomes()","kind":"method","name":"getLanguageHomes","modifiers":["public","abstract"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"abstract"},{"kind":"punct","text":" "},{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":"> "},{"kind":"name","text":"getLanguageHomes"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a Map of language ids to their home path."}]}]},"since":"19.3","source":{"path":"org/graalvm/home/HomeFinder.java","line":83}},{"id":"org.graalvm.home.HomeFinder#getToolHomes()","anchor":"getToolHomes()","kind":"method","name":"getToolHomes","modifiers":["public","abstract"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"abstract"},{"kind":"punct","text":" "},{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":"> "},{"kind":"name","text":"getToolHomes"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a Map of tool ids to their home path."}]}]},"since":"19.3","source":{"path":"org/graalvm/home/HomeFinder.java","line":89}},{"id":"org.graalvm.home.HomeFinder#getInstance()","anchor":"getInstance()","kind":"method","name":"getInstance","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"HomeFinder","ref":"org.graalvm.home.HomeFinder"},{"kind":"punct","text":" "},{"kind":"name","text":"getInstance"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"HomeFinder","ref":"org.graalvm.home.HomeFinder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the HomeFinder instance by using a ServiceLoader."}]}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if no implementation could be found."}]}]}],"since":"19.3","source":{"path":"org/graalvm/home/HomeFinder.java","line":96}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#toString()","text":"toString","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"A utility class to find various paths of the running GraalVM, as well as the version."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"A utility class to find various paths of the running GraalVM, as well as the version. Use "},{"kind":"link","target":{"id":"org.graalvm.home.HomeFinder#getInstance()"},"code":true,"children":[{"kind":"text","text":"HomeFinder.getInstance()"}]},{"kind":"text","text":" to get the singleton instance."}]}]},"since":"19.3","source":{"path":"org/graalvm/home/HomeFinder.java","line":60}},{"id":"org.graalvm.home.Version","name":"Version","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"Version"},{"kind":"punct","text":" "},{"kind":"keyword","text":"implements"},{"kind":"punct","text":" "},{"kind":"type","text":"Comparable","ref":"java.lang.Comparable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Comparable.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Version","ref":"org.graalvm.home.Version"},{"kind":"punct","text":">"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"interfaces":[[{"kind":"type","text":"Comparable","ref":"java.lang.Comparable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Comparable.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Version","ref":"org.graalvm.home.Version"},{"kind":"punct","text":">"}]],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.home.Version#isRelease()","anchor":"isRelease()","kind":"method","name":"isRelease","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isRelease"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this is a supported release build of GraalVM else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this is a supported release build of GraalVM else "},{"kind":"code","text":"false"},{"kind":"text","text":". Use this for implementation assertions that verify that only releases are deployed to production."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.home.Version#isSnapshot()"},"code":true,"children":[{"kind":"text","text":"isSnapshot()"}]}]]},"since":"19.3","source":{"path":"org/graalvm/home/Version.java","line":154}},{"id":"org.graalvm.home.Version#isSnapshot()","anchor":"isSnapshot()","kind":"method","name":"isSnapshot","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isSnapshot"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this is an unsupported snapshot build of GraalVM else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this is an unsupported snapshot build of GraalVM else "},{"kind":"code","text":"false"},{"kind":"text","text":". Use this for implementation assertions that verify that only releases are deployed to production."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.home.Version#isSnapshot()"},"code":true,"children":[{"kind":"text","text":"isSnapshot()"}]}]]},"since":"19.3","source":{"path":"org/graalvm/home/Version.java","line":166}},{"id":"org.graalvm.home.Version#compareTo(org.graalvm.home.Version)","anchor":"compareTo(org.graalvm.home.Version)","kind":"method","name":"compareTo","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"compareTo"},{"kind":"punct","text":"("},{"kind":"type","text":"Version","ref":"org.graalvm.home.Version"},{"kind":"punct","text":" "},{"kind":"param","text":"o"},{"kind":"punct","text":")"}],"params":[{"name":"o","type":[{"kind":"type","text":"Version","ref":"org.graalvm.home.Version"}]}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"overrides":{"id":"java.lang.Comparable#compareTo(T)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Comparable.html#compareTo(T)"},"since":"19.3","source":{"path":"org/graalvm/home/Version.java","line":175}},{"id":"org.graalvm.home.Version#compareTo(int...)","anchor":"compareTo(int...)","kind":"method","name":"compareTo","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"compareTo"},{"kind":"punct","text":"("},{"kind":"keyword","text":"int"},{"kind":"punct","text":"... "},{"kind":"param","text":"compareVersions"},{"kind":"punct","text":")"}],"params":[{"name":"compareVersions","type":[{"kind":"keyword","text":"int"},{"kind":"punct","text":"..."}],"varargs":true}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"doc":{"summary":[{"kind":"text","text":"Compares this version to another GraalVM version."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Compares this version to another GraalVM version. This is equivalent to using: "},{"kind":"code","text":"\ncompareTo(Version.create(compareVersions))\n"},{"kind":"text","text":"."}]}]},"since":"19.3","source":{"path":"org/graalvm/home/Version.java","line":197}},{"id":"org.graalvm.home.Version#equals(java.lang.Object)","anchor":"equals(java.lang.Object)","kind":"method","name":"equals","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"equals"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"obj"},{"kind":"punct","text":")"}],"params":[{"name":"obj","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"overrides":{"id":"java.lang.Object#equals(java.lang.Object)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},"since":"19.3","source":{"path":"org/graalvm/home/Version.java","line":206}},{"id":"org.graalvm.home.Version#hashCode()","anchor":"hashCode()","kind":"method","name":"hashCode","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"hashCode"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"overrides":{"id":"java.lang.Object#hashCode()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},"since":"19.3","source":{"path":"org/graalvm/home/Version.java","line":220}},{"id":"org.graalvm.home.Version#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"19.3","source":{"path":"org/graalvm/home/Version.java","line":230}},{"id":"org.graalvm.home.Version#format(java.lang.String)","anchor":"format(java.lang.String)","kind":"method","name":"format","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"format"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"format"},{"kind":"punct","text":")"}],"params":[{"name":"format","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"doc":{"summary":[{"kind":"text","text":"Format the GraalVM version with a custom format string."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Format the GraalVM version with a custom format string."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The format string can contain any of the standard conversions of "},{"kind":"link","target":{"id":"java.util.Formatter","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Formatter.html"},"code":true,"children":[{"kind":"text","text":"java.util.Formatter"}]},{"kind":"text","text":". At least four version components (possibly zero) are available as formatter arguments."}]},{"kind":"paragraph","children":[{"kind":"text","text":"In addition to the standard conversions, these special conversions are available:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"code","text":"\"%[R...]\""},{"kind":"text","text":" includes a given part only if "},{"kind":"link","target":{"id":"org.graalvm.home.Version#isRelease()"},"code":true,"children":[{"kind":"text","text":"isRelease"}]}]}],[{"kind":"paragraph","children":[{"kind":"code","text":"\"%[S...]\""},{"kind":"text","text":" includes a given part only if "},{"kind":"link","target":{"id":"org.graalvm.home.Version#isSnapshot()"},"code":true,"children":[{"kind":"text","text":"isSnapshot"}]}]}],[{"kind":"paragraph","children":[{"kind":"code","text":"\"%[<digit>...]\""},{"kind":"text","text":" includes a given part only if the version contains at least "},{"kind":"code","text":"<digit>"},{"kind":"text","text":" non-zero version components ("},{"kind":"code","text":"<digit>"},{"kind":"text","text":" can be 0 to 9)"}]}]]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Examples:"}]},{"kind":"code","text":"Version.parse(\"22.3.0.1\").format(\"%d.%d\"); // returns \"22.3\"\nVersion.parse(\"22.3.0.1\").format(\"%4$d\"); // returns \"1\"\nVersion.parse(\"22.3.0.1\").format(\"%[R%d.%d]%[Sdev]\"); // returns \"22.3\"\nVersion.parse(\"22.3.0.1\").format(\"%[2XX]\"); // returns \"XX\"\nVersion.parse(\"23.0-dev\").format(\"%3$d\"); // returns \"0\"\nVersion.parse(\"23.0-dev\").format(\"%[R%d.%d]%[Sdev]\"); // returns \"dev\"\nVersion.parse(\"23.0-dev\").format(\"%[2XX]\"); // returns \"\""}]},"since":"23.0","source":{"path":"org/graalvm/home/Version.java","line":324}},{"id":"org.graalvm.home.Version#getComponent(int)","anchor":"getComponent(int)","kind":"method","name":"getComponent","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"getComponent"},{"kind":"punct","text":"("},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"param","text":"componentIndex"},{"kind":"punct","text":")"}],"params":[{"name":"componentIndex","type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the index of the version component to retrieve; must be non-negative"}]}]}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"throws":[{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"componentIndex"},{"kind":"text","text":" is negative"}]}]}],"doc":{"summary":[{"kind":"text","text":"Retrieves the numeric value of the version component at the specified index."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Retrieves the numeric value of the version component at the specified index."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Version components are indexed as follows:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"code","text":"componentIndex = 0"},{"kind":"text","text":" represents the major version"}]}],[{"kind":"paragraph","children":[{"kind":"code","text":"componentIndex = 1"},{"kind":"text","text":" represents the minor version"}]}],[{"kind":"paragraph","children":[{"kind":"code","text":"componentIndex = 2"},{"kind":"text","text":" represents the update version"}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"If the specified "},{"kind":"code","text":"componentIndex"},{"kind":"text","text":" exceeds the number of available components, the method returns "},{"kind":"code","text":"0"},{"kind":"text","text":". For example, a version "},{"kind":"code","text":"23.1"},{"kind":"text","text":" will return "},{"kind":"code","text":"0"},{"kind":"text","text":" for "},{"kind":"code","text":"componentIndex = 2"},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.home.Version#create(int...)"},"code":true,"children":[{"kind":"text","text":"Version.create(int...)"}]}]]},"since":"24.2","source":{"path":"org/graalvm/home/Version.java","line":360}},{"id":"org.graalvm.home.Version#parse(java.lang.String)","anchor":"parse(java.lang.String)","kind":"method","name":"parse","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Version","ref":"org.graalvm.home.Version"},{"kind":"punct","text":" "},{"kind":"name","text":"parse"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"versionString"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"params":[{"name":"versionString","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"type","text":"Version","ref":"org.graalvm.home.Version"}]},"throws":[{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"declared":true}],"doc":{"summary":[{"kind":"text","text":"Parses a GraalVM version from its String raw format."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Parses a GraalVM version from its String raw format. Throws "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" if the passed string is not a valid GraalVM version."}]}]},"since":"19.3","source":{"path":"org/graalvm/home/Version.java","line":373}},{"id":"org.graalvm.home.Version#create(int...)","anchor":"create(int...)","kind":"method","name":"create","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Version","ref":"org.graalvm.home.Version"},{"kind":"punct","text":" "},{"kind":"name","text":"create"},{"kind":"punct","text":"("},{"kind":"keyword","text":"int"},{"kind":"punct","text":"... "},{"kind":"param","text":"versions"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"params":[{"name":"versions","type":[{"kind":"keyword","text":"int"},{"kind":"punct","text":"..."}],"varargs":true}],"returns":{"type":[{"kind":"type","text":"Version","ref":"org.graalvm.home.Version"}]},"throws":[{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"declared":true}],"doc":{"summary":[{"kind":"text","text":"Constructs a new GraalVM version from a list of version numbers."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Constructs a new GraalVM version from a list of version numbers. The versions must not be "},{"kind":"code","text":"null"},{"kind":"text","text":" and none of the version numbers must be negative. At least one version number must be non-zero."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.home.Version#compareTo(int...)"},"code":true,"children":[{"kind":"text","text":"compareTo(int...)"}]}]]},"since":"19.3","source":{"path":"org/graalvm/home/Version.java","line":386}},{"id":"org.graalvm.home.Version#getCurrent()","anchor":"getCurrent()","kind":"method","name":"getCurrent","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Version","ref":"org.graalvm.home.Version"},{"kind":"punct","text":" "},{"kind":"name","text":"getCurrent"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Version","ref":"org.graalvm.home.Version"}]},"doc":{"summary":[{"kind":"text","text":"Returns the current GraalVM version of the installed component."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the current GraalVM version of the installed component. Never "},{"kind":"code","text":"null"},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.home.HomeFinder#getVersion()"},"code":true,"children":[{"kind":"text","text":"HomeFinder.getVersion()"}]}]]},"since":"19.3","source":{"path":"org/graalvm/home/Version.java","line":406}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"A version utility to canonicalize and compare GraalVM versions."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"A version utility to canonicalize and compare GraalVM versions. The GraalVM version string is not standardized and may change without notice. This class is designed to evolve with GraalVM to cover all used version formats in use. It allows to create, validate and compare GraalVM versions. Do not rely on the format of the raw version string or the result of "},{"kind":"link","target":{"id":"org.graalvm.home.Version#toString()"},"code":true,"children":[{"kind":"text","text":"toString()"}]},{"kind":"text","text":", only use it to produce output for humans."}]},{"kind":"paragraph","children":[{"kind":"text","text":"To create version instances of a particular version use the "},{"kind":"link","target":{"id":"org.graalvm.home.Version#create(int...)"},"code":true,"children":[{"kind":"text","text":"create(int...)"}]},{"kind":"text","text":" factory method. Use "},{"kind":"link","target":{"id":"org.graalvm.home.Version#getCurrent()"},"code":true,"children":[{"kind":"text","text":"getCurrent()"}]},{"kind":"text","text":" to lookup the current GraalVM version or "},{"kind":"link","target":{"id":"org.graalvm.home.Version#parse(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"parse(String)"}]},{"kind":"text","text":" to parse it from a raw string."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Usage example:"}]},{"kind":"paragraph","children":[{"kind":"text","text":"This code example compares the current GraalVM version to be at least 19.3 and fails if it is not."}]},{"kind":"code","text":"if (Version.getCurrent().compareTo(19, 3) < 0) {\n    throw new IllegalStateException(\"Invalid GraalVM version. Must be at least 19.3.\");\n}"},{"kind":"paragraph","children":[{"kind":"text","text":"Note: this class has a natural ordering that is inconsistent with equals."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.home.HomeFinder#getVersion()"},"code":true,"children":[{"kind":"text","text":"HomeFinder.getVersion()"}]}]]},"since":"19.3","source":{"path":"org/graalvm/home/Version.java","line":72}}]},{"id":"org.graalvm.options","name":"org.graalvm.options","doc":{"summary":[{"kind":"text","text":"The GraalVM SDK options package contains reusable collection classes for options."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"The GraalVM SDK options package contains reusable collection classes for options."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.options.OptionDescriptor"},"code":true,"children":[{"kind":"text","text":"org.graalvm.options.OptionDescriptor"}]}],[{"kind":"link","target":{"id":"org.graalvm.options.OptionValues"},"code":true,"children":[{"kind":"text","text":"org.graalvm.options.OptionValues"}]}]]},"since":"19.0","types":[{"id":"org.graalvm.options.ConstantOptionKey","name":"ConstantOptionKey","kind":"class","language":"java","modifiers":["public","final"],"typeParams":[{"name":"T"}],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"ConstantOptionKey"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionKey","ref":"org.graalvm.options.OptionKey"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}],"superclass":[{"kind":"type","text":"OptionKey","ref":"org.graalvm.options.OptionKey"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}],"ancestors":[{"id":"org.graalvm.options.OptionKey"},{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.options.ConstantOptionKey#<init>(T)","anchor":"<init>(T)","kind":"constructor","name":"ConstantOptionKey","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"name","text":"ConstantOptionKey"},{"kind":"punct","text":"("},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"param","text":"defaultValue"},{"kind":"punct","text":")"}],"params":[{"name":"defaultValue","type":[{"kind":"typeParam","text":"T"}]}],"doc":{"summary":[{"kind":"text","text":"Constructs a new constant option key with the given default value."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Constructs a new constant option key with the given default value. The default value is used when no value is specified via the system property "},{"kind":"code","text":"-Dpolyglot.<option-name>"},{"kind":"text","text":". Throws "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" if no default "},{"kind":"link","target":{"id":"org.graalvm.options.OptionType"},"code":true,"children":[{"kind":"text","text":"OptionType"}]},{"kind":"text","text":" could be "},{"kind":"link","target":{"id":"org.graalvm.options.OptionType#defaultType(T)"},"code":true,"children":[{"kind":"text","text":"resolved"}]},{"kind":"text","text":" for the given type. The default value must not be "},{"kind":"code","text":"null"},{"kind":"text","text":"."}]}]},"since":"25.1","source":{"path":"org/graalvm/options/ConstantOptionKey.java","line":80}},{"id":"org.graalvm.options.ConstantOptionKey#<init>(T,org.graalvm.options.OptionType)","anchor":"<init>(T,org.graalvm.options.OptionType)","kind":"constructor","name":"ConstantOptionKey","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"name","text":"ConstantOptionKey"},{"kind":"punct","text":"("},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"param","text":"defaultValue"},{"kind":"punct","text":", "},{"kind":"type","text":"OptionType","ref":"org.graalvm.options.OptionType"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"param","text":"type"},{"kind":"punct","text":")"}],"params":[{"name":"defaultValue","type":[{"kind":"typeParam","text":"T"}]},{"name":"type","type":[{"kind":"type","text":"OptionType","ref":"org.graalvm.options.OptionType"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}]}],"doc":{"summary":[{"kind":"text","text":"Constructs a new constant option key with an explicit option type and default value."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Constructs a new constant option key with an explicit option type and default value. The default value is used when no value is specified via the system property "},{"kind":"code","text":"-Dpolyglot.<option-name>"},{"kind":"text","text":"."}]}]},"since":"25.1","source":{"path":"org/graalvm/options/ConstantOptionKey.java","line":91}},{"id":"org.graalvm.options.ConstantOptionKey#getConstantValue()","anchor":"getConstantValue()","kind":"method","name":"getConstantValue","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"name","text":"getConstantValue"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"typeParam","text":"T"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value has not been set yet, which should not happen in normal usage as the generated option descriptors static initializer sets the value at class load time."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the constant value of this option key."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the constant value of this option key. The value is fixed at class initialization time and remains immutable for the lifetime of the runtime, making this method eligible for constant folding by the GraalVM compiler when the receiver is a heap constant."}]}]},"since":"25.1","source":{"path":"org/graalvm/options/ConstantOptionKey.java","line":105}},{"id":"org.graalvm.options.ConstantOptionKey#setConstantValue(T)","anchor":"setConstantValue(T)","kind":"method","name":"setConstantValue","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"setConstantValue"},{"kind":"punct","text":"("},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":")"}],"params":[{"name":"value","type":[{"kind":"typeParam","text":"T"}]}],"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value has already been set, or if called at native image run time."}]}]}],"doc":{"summary":[{"kind":"text","text":"Sets the constant value of this option key."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets the constant value of this option key. This method is intended to be called from the generated option descriptors static initializer and must not be called after the polyglot runtime has started. In a native image, it must not be called at image run time."}]}]},"since":"25.1","source":{"path":"org/graalvm/options/ConstantOptionKey.java","line":122}}],"inherited":[{"from":{"id":"org.graalvm.options.OptionKey","text":"OptionKey"},"kind":"class","members":[{"id":"org.graalvm.options.OptionKey#getDefaultValue()","text":"getDefaultValue"},{"id":"org.graalvm.options.OptionKey#getType()","text":"getType"},{"id":"org.graalvm.options.OptionKey#getValue(org.graalvm.options.OptionValues)","text":"getValue"},{"id":"org.graalvm.options.OptionKey#hasBeenSet(org.graalvm.options.OptionValues)","text":"hasBeenSet"},{"id":"org.graalvm.options.OptionKey#mapOf(java.lang.Class)","text":"mapOf"}]},{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#toString()","text":"toString","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Represents an "},{"kind":"link","target":{"id":"org.graalvm.options.OptionKey"},"code":true,"children":[{"kind":"text","text":"OptionKey"}]},{"kind":"text","text":" whose value is fixed before the polyglot runtime is initialized and cannot be changed afterwards."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Represents an "},{"kind":"link","target":{"id":"org.graalvm.options.OptionKey"},"code":true,"children":[{"kind":"text","text":"OptionKey"}]},{"kind":"text","text":" whose value is fixed before the polyglot runtime is initialized and cannot be changed afterwards. Because the value is immutable after initialization, "},{"kind":"link","target":{"id":"org.graalvm.options.ConstantOptionKey#getConstantValue()"},"code":true,"children":[{"kind":"text","text":"getConstantValue()"}]},{"kind":"text","text":" is eligible for constant folding by the compiler, allowing branches guarded by this option to be eliminated from compiled code."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The option value is initialized from the system property "},{"kind":"code","text":"-Dpolyglot.<option-name>=<value>"},{"kind":"text","text":", which must be set before the polyglot runtime is initialized (i.e. before the containing class is loaded). If the system property is absent, the "},{"kind":"link","target":{"id":"org.graalvm.options.OptionKey#getDefaultValue()"},"code":true,"children":[{"kind":"text","text":"default value"}]},{"kind":"text","text":" is used. On HotSpot, this means the property must be present on the JVM command line. In a GraalVM native image, the property is read during image building, so the value is baked into the image."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Once the value has been set, "},{"kind":"link","target":{"id":"org.graalvm.options.ConstantOptionKey#getConstantValue()"},"code":true,"children":[{"kind":"text","text":"getConstantValue()"}]},{"kind":"text","text":" returns the same value for the lifetime of the runtime. The GraalVM compiler constant-folds calls to this method when the receiver is a known heap constant (e.g. a "},{"kind":"code","text":"static final"},{"kind":"text","text":" field), enabling dead-branch elimination."}]}]},"since":"25.1","source":{"path":"org/graalvm/options/ConstantOptionKey.java","line":65}},{"id":"org.graalvm.options.OptionCategory","name":"OptionCategory","kind":"enum","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"enum"},{"kind":"punct","text":" "},{"kind":"name","text":"OptionCategory"}],"superclass":[{"kind":"type","text":"Enum","ref":"java.lang.Enum","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"OptionCategory","ref":"org.graalvm.options.OptionCategory"},{"kind":"punct","text":">"}],"ancestors":[{"id":"java.lang.Enum","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html"},{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.options.OptionCategory#values()","anchor":"values()","kind":"method","name":"values","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionCategory","ref":"org.graalvm.options.OptionCategory"},{"kind":"punct","text":"[] "},{"kind":"name","text":"values"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"OptionCategory","ref":"org.graalvm.options.OptionCategory"},{"kind":"punct","text":"[]"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the enum constants in declaration order."}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the enum constants in declaration order."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the enum constants in declaration order."}]}]}},{"id":"org.graalvm.options.OptionCategory#valueOf(java.lang.String)","anchor":"valueOf(java.lang.String)","kind":"method","name":"valueOf","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionCategory","ref":"org.graalvm.options.OptionCategory"},{"kind":"punct","text":" "},{"kind":"name","text":"valueOf"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"name"},{"kind":"punct","text":")"}],"params":[{"name":"name","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"The exact name of the enum constant."}]}]}],"returns":{"type":[{"kind":"type","text":"OptionCategory","ref":"org.graalvm.options.OptionCategory"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the enum constant with the given name."}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the enum constant with the given name."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the enum constant with the given name."}]}]}},{"id":"org.graalvm.options.OptionCategory#USER","anchor":"USER","kind":"enumConstant","name":"USER","signature":[{"kind":"name","text":"USER"}],"type":[{"kind":"type","text":"OptionCategory","ref":"org.graalvm.options.OptionCategory"}],"doc":{"summary":[{"kind":"text","text":"An option common for users to apply."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"An option common for users to apply."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionCategory.java","line":55}},{"id":"org.graalvm.options.OptionCategory#EXPERT","anchor":"EXPERT","kind":"enumConstant","name":"EXPERT","signature":[{"kind":"name","text":"EXPERT"}],"type":[{"kind":"type","text":"OptionCategory","ref":"org.graalvm.options.OptionCategory"}],"doc":{"summary":[{"kind":"text","text":"An option only relevant in corner cases and for fine-tuning."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"An option only relevant in corner cases and for fine-tuning."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionCategory.java","line":62}},{"id":"org.graalvm.options.OptionCategory#INTERNAL","anchor":"INTERNAL","kind":"enumConstant","name":"INTERNAL","signature":[{"kind":"name","text":"INTERNAL"}],"type":[{"kind":"type","text":"OptionCategory","ref":"org.graalvm.options.OptionCategory"}],"doc":{"summary":[{"kind":"text","text":"An option only relevant when debugging a language implementation or an instrument."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"An option only relevant when debugging a language implementation or an instrument."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionCategory.java","line":69}}],"inherited":[{"from":{"id":"java.lang.Enum","text":"Enum","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html"},"kind":"class","members":[{"id":"java.lang.Enum#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#clone()"},{"id":"java.lang.Enum#compareTo(E)","text":"compareTo","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#compareTo(E)"},{"id":"java.lang.Enum#describeConstable()","text":"describeConstable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#describeConstable()"},{"id":"java.lang.Enum#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#equals(java.lang.Object)"},{"id":"java.lang.Enum#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#finalize()"},{"id":"java.lang.Enum#getDeclaringClass()","text":"getDeclaringClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#getDeclaringClass()"},{"id":"java.lang.Enum#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#hashCode()"},{"id":"java.lang.Enum#name()","text":"name","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#name()"},{"id":"java.lang.Enum#ordinal()","text":"ordinal","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#ordinal()"},{"id":"java.lang.Enum#toString()","text":"toString","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#toString()"},{"id":"java.lang.Enum#valueOf(java.lang.Class,java.lang.String)","text":"valueOf","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#valueOf(java.lang.Class,java.lang.String)"}]},{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Categorizes options according to user relevance."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Categorizes options according to user relevance."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionCategory.java","line":48}},{"id":"org.graalvm.options.OptionDescriptor","name":"OptionDescriptor","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"OptionDescriptor"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.options.OptionDescriptor#getName()","anchor":"getName()","kind":"method","name":"getName","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getName"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns the name of the option that this descriptor represents."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the name of the option that this descriptor represents."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":80}},{"id":"org.graalvm.options.OptionDescriptor#getKey()","anchor":"getKey()","kind":"method","name":"getKey","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionKey","ref":"org.graalvm.options.OptionKey"},{"kind":"punct","text":"<?> "},{"kind":"name","text":"getKey"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"OptionKey","ref":"org.graalvm.options.OptionKey"},{"kind":"punct","text":"<?>"}]},"doc":{"summary":[{"kind":"text","text":"Returns the key for this option."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the key for this option."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":89}},{"id":"org.graalvm.options.OptionDescriptor#isDeprecated()","anchor":"isDeprecated()","kind":"method","name":"isDeprecated","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isDeprecated"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this option was marked deprecated."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this option was marked deprecated. This indicates that the option is going to be removed in a future release or its use is not recommended."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":99}},{"id":"org.graalvm.options.OptionDescriptor#getDeprecationMessage()","anchor":"getDeprecationMessage()","kind":"method","name":"getDeprecationMessage","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getDeprecationMessage"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns the deprecation reason and the recommended fix."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the deprecation reason and the recommended fix. For newlines, use "},{"kind":"code","text":"%n"},{"kind":"text","text":"."}]}]},"since":"20.1.0","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":108}},{"id":"org.graalvm.options.OptionDescriptor#isOptionMap()","anchor":"isOptionMap()","kind":"method","name":"isOptionMap","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isOptionMap"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this option is an option map."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this option is an option map. Options maps allow to collect key=value pairs whose keys are unknown beforehand e.g. user defined properties."}]}]},"since":"19.2","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":118}},{"id":"org.graalvm.options.OptionDescriptor#getCategory()","anchor":"getCategory()","kind":"method","name":"getCategory","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionCategory","ref":"org.graalvm.options.OptionCategory"},{"kind":"punct","text":" "},{"kind":"name","text":"getCategory"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"OptionCategory","ref":"org.graalvm.options.OptionCategory"}]},"doc":{"summary":[{"kind":"text","text":"Returns the user category of this option."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the user category of this option."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":127}},{"id":"org.graalvm.options.OptionDescriptor#getStability()","anchor":"getStability()","kind":"method","name":"getStability","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionStability","ref":"org.graalvm.options.OptionStability"},{"kind":"punct","text":" "},{"kind":"name","text":"getStability"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"OptionStability","ref":"org.graalvm.options.OptionStability"}]},"doc":{"summary":[{"kind":"text","text":"Returns the stability of this option."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the stability of this option."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":136}},{"id":"org.graalvm.options.OptionDescriptor#getHelp()","anchor":"getHelp()","kind":"method","name":"getHelp","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getHelp"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns a human-readable description on how to use the option."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns a human-readable description on how to use the option. For newlines, use "},{"kind":"code","text":"%n"},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":146}},{"id":"org.graalvm.options.OptionDescriptor#getUsageSyntax()","anchor":"getUsageSyntax()","kind":"method","name":"getUsageSyntax","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getUsageSyntax"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"null if no usage syntax should be used, the usage syntax otherwise"}]}]},"doc":{"summary":[{"kind":"text","text":"Specifies a human-readable syntax describing the accepted values for this option."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Specifies a human-readable syntax describing the accepted values for this option."}]}]},"since":"22.1","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":157}},{"id":"org.graalvm.options.OptionDescriptor#isConstant()","anchor":"isConstant()","kind":"method","name":"isConstant","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isConstant"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this option is constant."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this option is constant. Constant options value is static and final before the polyglot runtime is initialized and cannot be changed at runtime. The value is read from the system property "},{"kind":"code","text":"-Dpolyglot.<option-name>=<value>"},{"kind":"text","text":" during class initialization. If absent, the "},{"kind":"link","target":{"id":"org.graalvm.options.OptionKey#getDefaultValue()"},"code":true,"children":[{"kind":"text","text":"default value"}]},{"kind":"text","text":" is used. Once set, calls to "},{"kind":"link","target":{"id":"org.graalvm.options.ConstantOptionKey#getConstantValue()"},"code":true,"children":[{"kind":"text","text":"org.graalvm.options.ConstantOptionKey.getConstantValue()"}]},{"kind":"text","text":" on a "},{"kind":"code","text":"static final"},{"kind":"text","text":" field are eligible for constant folding by the GraalVM compiler, allowing dead branches to be eliminated."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.options.ConstantOptionKey"},"code":true,"children":[{"kind":"text","text":"ConstantOptionKey"}]}]]},"since":"25.1","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":196}},{"id":"org.graalvm.options.OptionDescriptor#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":227}},{"id":"org.graalvm.options.OptionDescriptor#hashCode()","anchor":"hashCode()","kind":"method","name":"hashCode","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"hashCode"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"overrides":{"id":"java.lang.Object#hashCode()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":237}},{"id":"org.graalvm.options.OptionDescriptor#equals(java.lang.Object)","anchor":"equals(java.lang.Object)","kind":"method","name":"equals","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"equals"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"obj"},{"kind":"punct","text":")"}],"params":[{"name":"obj","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"overrides":{"id":"java.lang.Object#equals(java.lang.Object)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":254}},{"id":"org.graalvm.options.OptionDescriptor#newBuilder(org.graalvm.options.OptionKey,java.lang.String)","anchor":"newBuilder(org.graalvm.options.OptionKey,java.lang.String)","kind":"method","name":"newBuilder","modifiers":["public","static"],"typeParams":[{"name":"T"}],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" <"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"type","text":"OptionDescriptor.Builder","ref":"org.graalvm.options.OptionDescriptor$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"newBuilder"},{"kind":"punct","text":"("},{"kind":"type","text":"OptionKey","ref":"org.graalvm.options.OptionKey"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"param","text":"key"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"name"},{"kind":"punct","text":")"}],"params":[{"name":"key","type":[{"kind":"type","text":"OptionKey","ref":"org.graalvm.options.OptionKey"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}]},{"name":"name","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"type","text":"OptionDescriptor.Builder","ref":"org.graalvm.options.OptionDescriptor$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Creates a new option descriptor builder by key."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new option descriptor builder by key. The option group and name is inferred by the key."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":277}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Represents metadata for a single option."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Represents metadata for a single option."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":50}},{"id":"org.graalvm.options.OptionDescriptor$Builder","name":"OptionDescriptor.Builder","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"OptionDescriptor.Builder"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"enclosing":"org.graalvm.options.OptionDescriptor","members":[{"id":"org.graalvm.options.OptionDescriptor$Builder#category(org.graalvm.options.OptionCategory)","anchor":"category(org.graalvm.options.OptionCategory)","kind":"method","name":"category","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionDescriptor.Builder","ref":"org.graalvm.options.OptionDescriptor$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"category"},{"kind":"punct","text":"("},{"kind":"type","text":"OptionCategory","ref":"org.graalvm.options.OptionCategory"},{"kind":"punct","text":" "},{"kind":"param","text":"category"},{"kind":"punct","text":")"}],"params":[{"name":"category","type":[{"kind":"type","text":"OptionCategory","ref":"org.graalvm.options.OptionCategory"}]}],"returns":{"type":[{"kind":"type","text":"OptionDescriptor.Builder","ref":"org.graalvm.options.OptionDescriptor$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Defines the user category for this option."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Defines the user category for this option. The default value is "},{"kind":"link","target":{"id":"org.graalvm.options.OptionCategory#INTERNAL"},"code":true,"children":[{"kind":"text","text":"OptionCategory.INTERNAL"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":313}},{"id":"org.graalvm.options.OptionDescriptor$Builder#stability(org.graalvm.options.OptionStability)","anchor":"stability(org.graalvm.options.OptionStability)","kind":"method","name":"stability","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionDescriptor.Builder","ref":"org.graalvm.options.OptionDescriptor$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"stability"},{"kind":"punct","text":"("},{"kind":"type","text":"OptionStability","ref":"org.graalvm.options.OptionStability"},{"kind":"punct","text":" "},{"kind":"param","text":"stability"},{"kind":"punct","text":")"}],"params":[{"name":"stability","type":[{"kind":"type","text":"OptionStability","ref":"org.graalvm.options.OptionStability"}]}],"returns":{"type":[{"kind":"type","text":"OptionDescriptor.Builder","ref":"org.graalvm.options.OptionDescriptor$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Defines the stability of this option."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Defines the stability of this option. The default value is "},{"kind":"link","target":{"id":"org.graalvm.options.OptionStability#EXPERIMENTAL"},"code":true,"children":[{"kind":"text","text":"OptionStability.EXPERIMENTAL"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":325}},{"id":"org.graalvm.options.OptionDescriptor$Builder#deprecated(boolean)","anchor":"deprecated(boolean)","kind":"method","name":"deprecated","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionDescriptor.Builder","ref":"org.graalvm.options.OptionDescriptor$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"deprecated"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"deprecated"},{"kind":"punct","text":")"}],"params":[{"name":"deprecated","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"OptionDescriptor.Builder","ref":"org.graalvm.options.OptionDescriptor$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Defines if this option is deprecated."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Defines if this option is deprecated. The default value for deprecated is "},{"kind":"code","text":"false"},{"kind":"text","text":". This can be used to evolve options between releases."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":337}},{"id":"org.graalvm.options.OptionDescriptor$Builder#help(java.lang.String)","anchor":"help(java.lang.String)","kind":"method","name":"help","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionDescriptor.Builder","ref":"org.graalvm.options.OptionDescriptor$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"help"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"help"},{"kind":"punct","text":")"}],"params":[{"name":"help","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"type","text":"OptionDescriptor.Builder","ref":"org.graalvm.options.OptionDescriptor$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Specifies a human-readable description on how to use the option."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Specifies a human-readable description on how to use the option."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":347}},{"id":"org.graalvm.options.OptionDescriptor$Builder#usageSyntax(java.lang.String)","anchor":"usageSyntax(java.lang.String)","kind":"method","name":"usageSyntax","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionDescriptor.Builder","ref":"org.graalvm.options.OptionDescriptor$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"usageSyntax"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"usageSyntax"},{"kind":"punct","text":")"}],"params":[{"name":"usageSyntax","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"type","text":"OptionDescriptor.Builder","ref":"org.graalvm.options.OptionDescriptor$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Specifies a human-readable syntax describing the accepted values for this option."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Specifies a human-readable syntax describing the accepted values for this option."}]}]},"since":"22.1","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":358}},{"id":"org.graalvm.options.OptionDescriptor$Builder#deprecationMessage(java.lang.String)","anchor":"deprecationMessage(java.lang.String)","kind":"method","name":"deprecationMessage","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionDescriptor.Builder","ref":"org.graalvm.options.OptionDescriptor$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"deprecationMessage"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"deprecationMessage"},{"kind":"punct","text":")"}],"params":[{"name":"deprecationMessage","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"type","text":"OptionDescriptor.Builder","ref":"org.graalvm.options.OptionDescriptor$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Specifies a human-readable deprecation reason and the recommended fix."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Specifies a human-readable deprecation reason and the recommended fix."}]}]},"since":"20.1.0","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":368}},{"id":"org.graalvm.options.OptionDescriptor$Builder#constant(boolean)","anchor":"constant(boolean)","kind":"method","name":"constant","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionDescriptor.Builder","ref":"org.graalvm.options.OptionDescriptor$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"constant"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":")"}],"params":[{"name":"value","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"OptionDescriptor.Builder","ref":"org.graalvm.options.OptionDescriptor$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Marks this option as constant."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Marks this option as constant. Constant options use "},{"kind":"link","target":{"id":"org.graalvm.options.ConstantOptionKey"},"code":true,"children":[{"kind":"text","text":"ConstantOptionKey"}]},{"kind":"text","text":" as their key type and must be configured using the system property "},{"kind":"code","text":"-Dpolyglot.<option-name>=<value>"},{"kind":"text","text":" before the polyglot runtime is initialized. Setting a constant option at runtime via "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"org.graalvm.polyglot.Engine.Builder.option(String, String)"}]},{"kind":"text","text":" throws an "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":". The default value is "},{"kind":"code","text":"false"},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.options.ConstantOptionKey"},"code":true,"children":[{"kind":"text","text":"ConstantOptionKey"}]}]]},"since":"25.1","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":385}},{"id":"org.graalvm.options.OptionDescriptor$Builder#build()","anchor":"build()","kind":"method","name":"build","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionDescriptor","ref":"org.graalvm.options.OptionDescriptor"},{"kind":"punct","text":" "},{"kind":"name","text":"build"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"OptionDescriptor","ref":"org.graalvm.options.OptionDescriptor"}]},"throws":[{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this descriptor is marked with "},{"kind":"code","text":"constant(true)"},{"kind":"text","text":" but the key is not a "},{"kind":"link","target":{"id":"org.graalvm.options.ConstantOptionKey"},"code":true,"children":[{"kind":"text","text":"ConstantOptionKey"}]},{"kind":"text","text":", or if the key is a "},{"kind":"link","target":{"id":"org.graalvm.options.ConstantOptionKey"},"code":true,"children":[{"kind":"text","text":"ConstantOptionKey"}]},{"kind":"text","text":" but the descriptor is not marked with "},{"kind":"code","text":"constant(true)"},{"kind":"text","text":"."}]}]}],"doc":{"summary":[{"kind":"text","text":"Builds and returns a new option descriptor."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Builds and returns a new option descriptor."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":399}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#toString()","text":"toString","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Represents an option descriptor builder."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Represents an option descriptor builder."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptor.java","line":290}},{"id":"org.graalvm.options.OptionDescriptors","name":"OptionDescriptors","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"OptionDescriptors"},{"kind":"punct","text":" "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"Iterable","ref":"java.lang.Iterable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"OptionDescriptor","ref":"org.graalvm.options.OptionDescriptor"},{"kind":"punct","text":">"}],"interfaces":[[{"kind":"type","text":"Iterable","ref":"java.lang.Iterable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"OptionDescriptor","ref":"org.graalvm.options.OptionDescriptor"},{"kind":"punct","text":">"}]],"members":[{"id":"org.graalvm.options.OptionDescriptors#EMPTY","anchor":"EMPTY","kind":"field","name":"EMPTY","signature":[{"kind":"type","text":"OptionDescriptors","ref":"org.graalvm.options.OptionDescriptors"},{"kind":"punct","text":" "},{"kind":"name","text":"EMPTY"}],"type":[{"kind":"type","text":"OptionDescriptors","ref":"org.graalvm.options.OptionDescriptors"}],"doc":{"summary":[{"kind":"text","text":"An empty set of option descriptors."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"An empty set of option descriptors."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptors.java","line":64}},{"id":"org.graalvm.options.OptionDescriptors#get(java.lang.String)","anchor":"get(java.lang.String)","kind":"method","name":"get","signature":[{"kind":"type","text":"OptionDescriptor","ref":"org.graalvm.options.OptionDescriptor"},{"kind":"punct","text":" "},{"kind":"name","text":"get"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"optionName"},{"kind":"punct","text":")"}],"params":[{"name":"optionName","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"type","text":"OptionDescriptor","ref":"org.graalvm.options.OptionDescriptor"}]},"doc":{"summary":[{"kind":"text","text":"Gets the "},{"kind":"link","target":{"id":"org.graalvm.options.OptionDescriptor"},"code":true,"children":[{"kind":"text","text":"OptionDescriptor"}]},{"kind":"text","text":" matching a given option name or "},{"kind":"code","text":"null"},{"kind":"text","text":" if this option descriptor set does not contain a matching option name."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Gets the "},{"kind":"link","target":{"id":"org.graalvm.options.OptionDescriptor"},"code":true,"children":[{"kind":"text","text":"OptionDescriptor"}]},{"kind":"text","text":" matching a given option name or "},{"kind":"code","text":"null"},{"kind":"text","text":" if this option descriptor set does not contain a matching option name."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptors.java","line":81}},{"id":"org.graalvm.options.OptionDescriptors#createUnion(org.graalvm.options.OptionDescriptors...)","anchor":"createUnion(org.graalvm.options.OptionDescriptors...)","kind":"method","name":"createUnion","modifiers":["static"],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionDescriptors","ref":"org.graalvm.options.OptionDescriptors"},{"kind":"punct","text":" "},{"kind":"name","text":"createUnion"},{"kind":"punct","text":"("},{"kind":"type","text":"OptionDescriptors","ref":"org.graalvm.options.OptionDescriptors"},{"kind":"punct","text":"... "},{"kind":"param","text":"descriptors"},{"kind":"punct","text":")"}],"params":[{"name":"descriptors","type":[{"kind":"type","text":"OptionDescriptors","ref":"org.graalvm.options.OptionDescriptors"},{"kind":"punct","text":"..."}],"varargs":true}],"returns":{"type":[{"kind":"type","text":"OptionDescriptors","ref":"org.graalvm.options.OptionDescriptors"}]},"doc":{"summary":[{"kind":"text","text":"Creates a union options descriptor out of multiple given descriptors."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a union options descriptor out of multiple given descriptors. The operation descriptors are not checked for duplicate keys. The option descriptors are iterated in declaration order."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptors.java","line":90}},{"id":"org.graalvm.options.OptionDescriptors#iterator()","anchor":"iterator()","kind":"method","name":"iterator","signature":[{"kind":"type","text":"Iterator","ref":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"OptionDescriptor","ref":"org.graalvm.options.OptionDescriptor"},{"kind":"punct","text":"> "},{"kind":"name","text":"iterator"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Iterator","ref":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"OptionDescriptor","ref":"org.graalvm.options.OptionDescriptor"},{"kind":"punct","text":">"}]},"overrides":{"id":"java.lang.Iterable#iterator()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html#iterator()"},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptors.java","line":120}},{"id":"org.graalvm.options.OptionDescriptors#create(java.util.List)","anchor":"create(java.util.List)","kind":"method","name":"create","modifiers":["static"],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionDescriptors","ref":"org.graalvm.options.OptionDescriptors"},{"kind":"punct","text":" "},{"kind":"name","text":"create"},{"kind":"punct","text":"("},{"kind":"type","text":"List","ref":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"OptionDescriptor","ref":"org.graalvm.options.OptionDescriptor"},{"kind":"punct","text":"> "},{"kind":"param","text":"descriptors"},{"kind":"punct","text":")"}],"params":[{"name":"descriptors","type":[{"kind":"type","text":"List","ref":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"OptionDescriptor","ref":"org.graalvm.options.OptionDescriptor"},{"kind":"punct","text":">"}]}],"returns":{"type":[{"kind":"type","text":"OptionDescriptors","ref":"org.graalvm.options.OptionDescriptors"}]},"doc":{"summary":[{"kind":"text","text":"Creates an "},{"kind":"link","target":{"id":"org.graalvm.options.OptionDescriptors"},"code":true,"children":[{"kind":"text","text":"OptionDescriptors"}]},{"kind":"text","text":" instance from a list."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates an "},{"kind":"link","target":{"id":"org.graalvm.options.OptionDescriptors"},"code":true,"children":[{"kind":"text","text":"OptionDescriptors"}]},{"kind":"text","text":" instance from a list. The option descriptors implementation is backed by a "},{"kind":"link","target":{"id":"java.util.LinkedHashMap","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/LinkedHashMap.html"},"code":true,"children":[{"kind":"text","text":"LinkedHashMap"}]},{"kind":"text","text":" that preserves ordering."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptors.java","line":129}}],"inherited":[{"from":{"id":"java.lang.Iterable","text":"Iterable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html"},"kind":"interface","members":[{"id":"java.lang.Iterable#forEach(java.util.function.Consumer)","text":"forEach","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html#forEach(java.util.function.Consumer)"},{"id":"java.lang.Iterable#spliterator()","text":"spliterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html#spliterator()"}]}],"doc":{"summary":[{"kind":"text","text":"An interface to a set of "},{"kind":"link","target":{"id":"org.graalvm.options.OptionDescriptor"},"code":true,"children":[{"kind":"text","text":"OptionDescriptor"}]},{"kind":"text","text":"s."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"An interface to a set of "},{"kind":"link","target":{"id":"org.graalvm.options.OptionDescriptor"},"code":true,"children":[{"kind":"text","text":"OptionDescriptor"}]},{"kind":"text","text":"s."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionDescriptors.java","line":57}},{"id":"org.graalvm.options.OptionKey","name":"OptionKey","kind":"class","language":"java","modifiers":["public","sealed"],"typeParams":[{"name":"T"}],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"sealed"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"OptionKey"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"keyword","text":"permits"},{"kind":"punct","text":" "},{"kind":"type","text":"ConstantOptionKey","ref":"org.graalvm.options.ConstantOptionKey"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"permits":[{"id":"org.graalvm.options.ConstantOptionKey"}],"members":[{"id":"org.graalvm.options.OptionKey#<init>(T)","anchor":"<init>(T)","kind":"constructor","name":"OptionKey","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"name","text":"OptionKey"},{"kind":"punct","text":"("},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"param","text":"defaultValue"},{"kind":"punct","text":")"}],"params":[{"name":"defaultValue","type":[{"kind":"typeParam","text":"T"}]}],"doc":{"summary":[{"kind":"text","text":"Constructs a new option key given a default value."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Constructs a new option key given a default value. Throws "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" if no default "},{"kind":"link","target":{"id":"org.graalvm.options.OptionType"},"code":true,"children":[{"kind":"text","text":"OptionType"}]},{"kind":"text","text":" could be "},{"kind":"link","target":{"id":"org.graalvm.options.OptionType#defaultType(T)"},"code":true,"children":[{"kind":"text","text":"resolved"}]},{"kind":"text","text":" for the given type. The default value must not be "},{"kind":"code","text":"null"},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionKey.java","line":62}},{"id":"org.graalvm.options.OptionKey#<init>(T,org.graalvm.options.OptionType)","anchor":"<init>(T,org.graalvm.options.OptionType)","kind":"constructor","name":"OptionKey","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"name","text":"OptionKey"},{"kind":"punct","text":"("},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"param","text":"defaultValue"},{"kind":"punct","text":", "},{"kind":"type","text":"OptionType","ref":"org.graalvm.options.OptionType"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"param","text":"type"},{"kind":"punct","text":")"}],"params":[{"name":"defaultValue","type":[{"kind":"typeParam","text":"T"}]},{"name":"type","type":[{"kind":"type","text":"OptionType","ref":"org.graalvm.options.OptionType"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}]}],"doc":{"summary":[{"kind":"text","text":"Constructs a new option key given a default value and option key."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Constructs a new option key given a default value and option key."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionKey.java","line":76}},{"id":"org.graalvm.options.OptionKey#mapOf(java.lang.Class)","anchor":"mapOf(java.lang.Class)","kind":"method","name":"mapOf","modifiers":["public","static"],"typeParams":[{"name":"V"}],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" <"},{"kind":"typeParam","text":"V"},{"kind":"punct","text":"> "},{"kind":"type","text":"OptionKey","ref":"org.graalvm.options.OptionKey"},{"kind":"punct","text":"<"},{"kind":"type","text":"OptionMap","ref":"org.graalvm.options.OptionMap"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"V"},{"kind":"punct","text":">> "},{"kind":"name","text":"mapOf"},{"kind":"punct","text":"("},{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"V"},{"kind":"punct","text":"> "},{"kind":"param","text":"valueClass"},{"kind":"punct","text":")"}],"params":[{"name":"valueClass","type":[{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"V"},{"kind":"punct","text":">"}]}],"returns":{"type":[{"kind":"type","text":"OptionKey","ref":"org.graalvm.options.OptionKey"},{"kind":"punct","text":"<"},{"kind":"type","text":"OptionMap","ref":"org.graalvm.options.OptionMap"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"V"},{"kind":"punct","text":">>"}]},"doc":{"summary":[{"kind":"text","text":"Constructs a new option key to group/accumulate options with common prefixes."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Constructs a new option key to group/accumulate options with common prefixes. This type of options allow to collect key=value pairs whose keys are unknown beforehand e.g. user defined properties. See "},{"kind":"link","target":{"id":"org.graalvm.options.OptionMap"},"code":true,"children":[{"kind":"text","text":"OptionMap"}]},{"kind":"text","text":". Example usage:"}]},{"kind":"code","text":"@Option.Group(\"mylang\")\npublic class MiscOptions {\n    @Option(help = \"User-defined properties\", category = OptionCategory.USER) //\n    public static final OptionKey<OptionMap<String>> Properties = OptionKey.mapOf(String.class);\n\n    ...\n}"},{"kind":"paragraph","children":[{"kind":"text","text":"Properties can be set using the "},{"kind":"code","text":"mylang.Properties"},{"kind":"text","text":" prefix."}]},{"kind":"code","text":"Context context = Context.newBuilder() //\n                .option(\"mylang.Properties.key\", \"value\") //\n                .option(\"mylang.Properties.user.name\", \"guest\") //\n                .build();"},{"kind":"paragraph","children":[{"kind":"text","text":"The option map can be consumed as follows:"}]},{"kind":"code","text":"OptionMap<String> properties = getOptions().get(MiscOptions.Properties);\nproperties.get(\"key\");       // value\nproperties.get(\"user.name\"); // guest\nproperties.get(\"undefined\"); // null"},{"kind":"paragraph","children":[{"kind":"text","text":"Throws "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" if no default "},{"kind":"link","target":{"id":"org.graalvm.options.OptionType"},"code":true,"children":[{"kind":"text","text":"OptionType"}]},{"kind":"text","text":" could be "},{"kind":"link","target":{"id":"org.graalvm.options.OptionType#defaultType(T)"},"code":true,"children":[{"kind":"text","text":"resolved"}]},{"kind":"text","text":" for the value type."}]}]},"since":"19.2","source":{"path":"org/graalvm/options/OptionKey.java","line":122}},{"id":"org.graalvm.options.OptionKey#getType()","anchor":"getType()","kind":"method","name":"getType","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionType","ref":"org.graalvm.options.OptionType"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"name","text":"getType"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"OptionType","ref":"org.graalvm.options.OptionType"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}]},"doc":{"summary":[{"kind":"text","text":"Returns the option type of this key."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the option type of this key."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionKey.java","line":135}},{"id":"org.graalvm.options.OptionKey#getDefaultValue()","anchor":"getDefaultValue()","kind":"method","name":"getDefaultValue","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"name","text":"getDefaultValue"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"typeParam","text":"T"}]},"doc":{"summary":[{"kind":"text","text":"Returns the default value for this option."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the default value for this option."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionKey.java","line":144}},{"id":"org.graalvm.options.OptionKey#getValue(org.graalvm.options.OptionValues)","anchor":"getValue(org.graalvm.options.OptionValues)","kind":"method","name":"getValue","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"name","text":"getValue"},{"kind":"punct","text":"("},{"kind":"type","text":"OptionValues","ref":"org.graalvm.options.OptionValues"},{"kind":"punct","text":" "},{"kind":"param","text":"values"},{"kind":"punct","text":")"}],"params":[{"name":"values","type":[{"kind":"type","text":"OptionValues","ref":"org.graalvm.options.OptionValues"}]}],"returns":{"type":[{"kind":"typeParam","text":"T"}]},"doc":{"summary":[{"kind":"text","text":"Returns the value of this key given the "},{"kind":"link","target":{"id":"org.graalvm.options.OptionValues"},"code":true,"children":[{"kind":"text","text":"values"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the value of this key given the "},{"kind":"link","target":{"id":"org.graalvm.options.OptionValues"},"code":true,"children":[{"kind":"text","text":"values"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionKey.java","line":153}},{"id":"org.graalvm.options.OptionKey#hasBeenSet(org.graalvm.options.OptionValues)","anchor":"hasBeenSet(org.graalvm.options.OptionValues)","kind":"method","name":"hasBeenSet","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasBeenSet"},{"kind":"punct","text":"("},{"kind":"type","text":"OptionValues","ref":"org.graalvm.options.OptionValues"},{"kind":"punct","text":" "},{"kind":"param","text":"values"},{"kind":"punct","text":")"}],"params":[{"name":"values","type":[{"kind":"type","text":"OptionValues","ref":"org.graalvm.options.OptionValues"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if a value for this key has been set for the given option values or "},{"kind":"code","text":"false"},{"kind":"text","text":" if no value has been set."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if a value for this key has been set for the given option values or "},{"kind":"code","text":"false"},{"kind":"text","text":" if no value has been set."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionKey.java","line":163}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#toString()","text":"toString","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Represents the option key for an option specification."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Represents the option key for an option specification."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionKey.java","line":50}},{"id":"org.graalvm.options.OptionMap","name":"OptionMap","kind":"class","language":"java","modifiers":["public","final"],"typeParams":[{"name":"T","doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the class of the map values"}]}]}],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"OptionMap"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.options.OptionMap#empty()","anchor":"empty()","kind":"method","name":"empty","modifiers":["public","static"],"typeParams":[{"name":"T","doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the class of the map values"}]}]}],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" <"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"type","text":"OptionMap","ref":"org.graalvm.options.OptionMap"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"name","text":"empty"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"OptionMap","ref":"org.graalvm.options.OptionMap"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"an empty option map"}]}]},"doc":{"summary":[{"kind":"text","text":"Returns an empty option map (immutable)."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns an empty option map (immutable)."}]}]},"since":"19.2","source":{"path":"org/graalvm/options/OptionMap.java","line":75}},{"id":"org.graalvm.options.OptionMap#get(java.lang.String)","anchor":"get(java.lang.String)","kind":"method","name":"get","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"name","text":"get"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"key"},{"kind":"punct","text":")"}],"params":[{"name":"key","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the key whose associated value is to be returned"}]}]}],"returns":{"type":[{"kind":"typeParam","text":"T"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the value to which the specified key is mapped, or "},{"kind":"code","text":"null"},{"kind":"text","text":" if this map contains no mapping for the key"}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the value to which the specified key is mapped, or "},{"kind":"code","text":"null"},{"kind":"text","text":" if this option map contains no mapping for the key."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the value to which the specified key is mapped, or "},{"kind":"code","text":"null"},{"kind":"text","text":" if this option map contains no mapping for the key."}]}]},"since":"19.2","source":{"path":"org/graalvm/options/OptionMap.java","line":90}},{"id":"org.graalvm.options.OptionMap#entrySet()","anchor":"entrySet()","kind":"method","name":"entrySet","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Set","ref":"java.util.Set","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Set.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Map.Entry","ref":"java.util.Map$Entry","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.Entry.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">> "},{"kind":"name","text":"entrySet"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Set","ref":"java.util.Set","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Set.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Map.Entry","ref":"java.util.Map$Entry","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.Entry.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">>"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a set view of the mappings contained in this map"}]}]},"doc":{"summary":[{"kind":"text","text":"Returns an unmodifiable "},{"kind":"link","target":{"id":"java.util.Set","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Set.html"},"code":true,"children":[{"kind":"text","text":"Set"}]},{"kind":"text","text":" view of the mappings contained in this map."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns an unmodifiable "},{"kind":"link","target":{"id":"java.util.Set","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Set.html"},"code":true,"children":[{"kind":"text","text":"Set"}]},{"kind":"text","text":" view of the mappings contained in this map."}]}]},"since":"19.2","source":{"path":"org/graalvm/options/OptionMap.java","line":101}},{"id":"org.graalvm.options.OptionMap#hashCode()","anchor":"hashCode()","kind":"method","name":"hashCode","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"hashCode"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"overrides":{"id":"java.lang.Object#hashCode()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},"since":"19.2","source":{"path":"org/graalvm/options/OptionMap.java","line":108}},{"id":"org.graalvm.options.OptionMap#equals(java.lang.Object)","anchor":"equals(java.lang.Object)","kind":"method","name":"equals","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"equals"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"obj"},{"kind":"punct","text":")"}],"params":[{"name":"obj","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"overrides":{"id":"java.lang.Object#equals(java.lang.Object)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},"since":"19.2","source":{"path":"org/graalvm/options/OptionMap.java","line":116}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#toString()","text":"toString","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Represents a mapping between "},{"kind":"link","target":{"id":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":" keys and values."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Represents a mapping between "},{"kind":"link","target":{"id":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":" keys and values. Allows to create "},{"kind":"link","target":{"id":"org.graalvm.options.OptionKey"},"code":true,"children":[{"kind":"text","text":"options"}]},{"kind":"text","text":" to group/accumulate "},{"kind":"code","text":"key=value"},{"kind":"text","text":" pairs, with a common prefix; whose keys are not known beforehand e.g. user defined properties."}]}]},"since":"19.2","source":{"path":"org/graalvm/options/OptionMap.java","line":56}},{"id":"org.graalvm.options.OptionStability","name":"OptionStability","kind":"enum","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"enum"},{"kind":"punct","text":" "},{"kind":"name","text":"OptionStability"}],"superclass":[{"kind":"type","text":"Enum","ref":"java.lang.Enum","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"OptionStability","ref":"org.graalvm.options.OptionStability"},{"kind":"punct","text":">"}],"ancestors":[{"id":"java.lang.Enum","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html"},{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.options.OptionStability#values()","anchor":"values()","kind":"method","name":"values","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionStability","ref":"org.graalvm.options.OptionStability"},{"kind":"punct","text":"[] "},{"kind":"name","text":"values"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"OptionStability","ref":"org.graalvm.options.OptionStability"},{"kind":"punct","text":"[]"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the enum constants in declaration order."}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the enum constants in declaration order."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the enum constants in declaration order."}]}]}},{"id":"org.graalvm.options.OptionStability#valueOf(java.lang.String)","anchor":"valueOf(java.lang.String)","kind":"method","name":"valueOf","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionStability","ref":"org.graalvm.options.OptionStability"},{"kind":"punct","text":" "},{"kind":"name","text":"valueOf"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"name"},{"kind":"punct","text":")"}],"params":[{"name":"name","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"The exact name of the enum constant."}]}]}],"returns":{"type":[{"kind":"type","text":"OptionStability","ref":"org.graalvm.options.OptionStability"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the enum constant with the given name."}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the enum constant with the given name."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the enum constant with the given name."}]}]}},{"id":"org.graalvm.options.OptionStability#STABLE","anchor":"STABLE","kind":"enumConstant","name":"STABLE","signature":[{"kind":"name","text":"STABLE"}],"type":[{"kind":"type","text":"OptionStability","ref":"org.graalvm.options.OptionStability"}],"doc":{"summary":[{"kind":"text","text":"A stable option is expected to remain available for many releases."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"A stable option is expected to remain available for many releases. End users can rely on such an option being present. A stable option can still be removed but will go through a clear deprecating process before being removed."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionStability.java","line":57}},{"id":"org.graalvm.options.OptionStability#EXPERIMENTAL","anchor":"EXPERIMENTAL","kind":"enumConstant","name":"EXPERIMENTAL","signature":[{"kind":"name","text":"EXPERIMENTAL"}],"type":[{"kind":"type","text":"OptionStability","ref":"org.graalvm.options.OptionStability"}],"doc":{"summary":[{"kind":"text","text":"An experimental option has no guarantees of stability and might be removed at any point."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"An experimental option has no guarantees of stability and might be removed at any point."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionStability.java","line":64}}],"inherited":[{"from":{"id":"java.lang.Enum","text":"Enum","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html"},"kind":"class","members":[{"id":"java.lang.Enum#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#clone()"},{"id":"java.lang.Enum#compareTo(E)","text":"compareTo","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#compareTo(E)"},{"id":"java.lang.Enum#describeConstable()","text":"describeConstable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#describeConstable()"},{"id":"java.lang.Enum#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#equals(java.lang.Object)"},{"id":"java.lang.Enum#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#finalize()"},{"id":"java.lang.Enum#getDeclaringClass()","text":"getDeclaringClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#getDeclaringClass()"},{"id":"java.lang.Enum#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#hashCode()"},{"id":"java.lang.Enum#name()","text":"name","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#name()"},{"id":"java.lang.Enum#ordinal()","text":"ordinal","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#ordinal()"},{"id":"java.lang.Enum#toString()","text":"toString","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#toString()"},{"id":"java.lang.Enum#valueOf(java.lang.Class,java.lang.String)","text":"valueOf","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#valueOf(java.lang.Class,java.lang.String)"}]},{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Categorizes options according to their stability."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Categorizes options according to their stability."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionStability.java","line":48}},{"id":"org.graalvm.options.OptionType","name":"OptionType","kind":"class","language":"java","modifiers":["public","final"],"typeParams":[{"name":"T"}],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"OptionType"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.options.OptionType#<init>(java.lang.String,java.util.function.Function,java.util.function.Consumer)","anchor":"<init>(java.lang.String,java.util.function.Function,java.util.function.Consumer)","kind":"constructor","name":"OptionType","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"name","text":"OptionType"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"name"},{"kind":"punct","text":", "},{"kind":"type","text":"Function","ref":"java.util.function.Function","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Function.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"param","text":"stringConverter"},{"kind":"punct","text":", "},{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"param","text":"validator"},{"kind":"punct","text":")"}],"params":[{"name":"name","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the name of the type."}]}]},{"name":"stringConverter","type":[{"kind":"type","text":"Function","ref":"java.util.function.Function","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Function.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a function that converts a string value to the option value. Can throw "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" to indicate an invalid string."}]}]},{"name":"validator","type":[{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"used for validating the option value. Throws "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" if the value is invalid."}]}]}],"doc":{"summary":[{"kind":"text","text":"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."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"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."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionType.java","line":79}},{"id":"org.graalvm.options.OptionType#<init>(java.lang.String,java.util.function.Function)","anchor":"<init>(java.lang.String,java.util.function.Function)","kind":"constructor","name":"OptionType","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"name","text":"OptionType"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"name"},{"kind":"punct","text":", "},{"kind":"type","text":"Function","ref":"java.util.function.Function","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Function.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"param","text":"stringConverter"},{"kind":"punct","text":")"}],"params":[{"name":"name","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the name of the type."}]}]},{"name":"stringConverter","type":[{"kind":"type","text":"Function","ref":"java.util.function.Function","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Function.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a function that converts a string value to the option value. Can throw "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" to indicate an invalid string."}]}]}],"doc":{"summary":[{"kind":"text","text":"Constructs a new option type with name and function that allows to convert a string to the option type."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Constructs a new option type with name and function that allows to convert a string to the option type."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionType.java","line":120}},{"id":"org.graalvm.options.OptionType#<init>(java.lang.String,T,java.util.function.Function,java.util.function.Consumer)","anchor":"<init>(java.lang.String,T,java.util.function.Function,java.util.function.Consumer)","kind":"constructor","name":"OptionType","modifiers":["public"],"annotations":[[{"kind":"annotation","text":"@Deprecated","ref":"java.lang.Deprecated","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Deprecated.html"},{"kind":"punct","text":"("},{"kind":"param","text":"since"},{"kind":"punct","text":" = "},{"kind":"literal","text":"\"19.0\""},{"kind":"punct","text":")"}]],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"name","text":"OptionType"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"name"},{"kind":"punct","text":", "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"param","text":"defaultValue"},{"kind":"punct","text":", "},{"kind":"type","text":"Function","ref":"java.util.function.Function","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Function.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"param","text":"stringConverter"},{"kind":"punct","text":", "},{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"param","text":"validator"},{"kind":"punct","text":")"}],"params":[{"name":"name","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},{"name":"defaultValue","type":[{"kind":"typeParam","text":"T"}]},{"name":"stringConverter","type":[{"kind":"type","text":"Function","ref":"java.util.function.Function","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Function.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}]},{"name":"validator","type":[{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}]}],"deprecated":{"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"Use "},{"kind":"link","target":{"id":"org.graalvm.options.OptionType#<init>(java.lang.String,java.util.function.Function,java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"OptionType(String, Function, Consumer)"}]}]}],"since":"19.0"},"since":"19.0","source":{"path":"org/graalvm/options/OptionType.java","line":129}},{"id":"org.graalvm.options.OptionType#<init>(java.lang.String,T,java.util.function.Function)","anchor":"<init>(java.lang.String,T,java.util.function.Function)","kind":"constructor","name":"OptionType","modifiers":["public"],"annotations":[[{"kind":"annotation","text":"@Deprecated","ref":"java.lang.Deprecated","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Deprecated.html"},{"kind":"punct","text":"("},{"kind":"param","text":"since"},{"kind":"punct","text":" = "},{"kind":"literal","text":"\"19.0\""},{"kind":"punct","text":")"}]],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"name","text":"OptionType"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"name"},{"kind":"punct","text":", "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"param","text":"defaultValue"},{"kind":"punct","text":", "},{"kind":"type","text":"Function","ref":"java.util.function.Function","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Function.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"param","text":"stringConverter"},{"kind":"punct","text":")"}],"params":[{"name":"name","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},{"name":"defaultValue","type":[{"kind":"typeParam","text":"T"}]},{"name":"stringConverter","type":[{"kind":"type","text":"Function","ref":"java.util.function.Function","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Function.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}]}],"deprecated":{"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"Use "},{"kind":"link","target":{"id":"org.graalvm.options.OptionType#<init>(java.lang.String,java.util.function.Function)"},"code":true,"children":[{"kind":"text","text":"OptionType(String, Function)"}]}]}],"since":"19.0"},"since":"19.0","source":{"path":"org/graalvm/options/OptionType.java","line":139}},{"id":"org.graalvm.options.OptionType#getDefaultValue()","anchor":"getDefaultValue()","kind":"method","name":"getDefaultValue","modifiers":["public"],"annotations":[[{"kind":"annotation","text":"@Deprecated","ref":"java.lang.Deprecated","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Deprecated.html"},{"kind":"punct","text":"("},{"kind":"param","text":"since"},{"kind":"punct","text":" = "},{"kind":"literal","text":"\"19.0\""},{"kind":"punct","text":")"}]],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"name","text":"getDefaultValue"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"typeParam","text":"T"}]},"deprecated":{"since":"19.0"},"since":"19.0","source":{"path":"org/graalvm/options/OptionType.java","line":149}},{"id":"org.graalvm.options.OptionType#getName()","anchor":"getName()","kind":"method","name":"getName","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getName"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns the name of this type."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the name of this type."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionType.java","line":159}},{"id":"org.graalvm.options.OptionType#convert(java.lang.String)","anchor":"convert(java.lang.String)","kind":"method","name":"convert","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"name","text":"convert"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":")"}],"params":[{"name":"value","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"typeParam","text":"T"}]},"throws":[{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value is invalid or cannot be converted."}]}]}],"doc":{"summary":[{"kind":"text","text":"Converts a string value, validates it, and converts it to an object of this type."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Converts a string value, validates it, and converts it to an object of this type."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionType.java","line":169}},{"id":"org.graalvm.options.OptionType#convert(java.lang.Object,java.lang.String,java.lang.String)","anchor":"convert(java.lang.Object,java.lang.String,java.lang.String)","kind":"method","name":"convert","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"name","text":"convert"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"previousValue"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"nameSuffix"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":")"}],"params":[{"name":"previousValue","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the previous value holded by option."}]}]},{"name":"nameSuffix","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the key for prefix options."}]}]},{"name":"value","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"typeParam","text":"T"}]},"throws":[{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value is invalid or cannot be converted."}]}]}],"doc":{"summary":[{"kind":"text","text":"Converts a string value, validates it, and converts it to an object of this type."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Converts a string value, validates it, and converts it to an object of this type. For option maps includes the previous map stored for the option and the key."}]}]},"since":"19.2","source":{"path":"org/graalvm/options/OptionType.java","line":184}},{"id":"org.graalvm.options.OptionType#validate(T)","anchor":"validate(T)","kind":"method","name":"validate","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"validate"},{"kind":"punct","text":"("},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":")"}],"params":[{"name":"value","type":[{"kind":"typeParam","text":"T"}]}],"throws":[{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value is invalid or cannot be converted."}]}]}],"doc":{"summary":[{"kind":"text","text":"Validates an option value and throws an "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" if the value is invalid."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Validates an option value and throws an "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" if the value is invalid."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionType.java","line":198}},{"id":"org.graalvm.options.OptionType#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"19.0","source":{"path":"org/graalvm/options/OptionType.java","line":205}},{"id":"org.graalvm.options.OptionType#defaultType(T)","anchor":"defaultType(T)","kind":"method","name":"defaultType","modifiers":["public","static"],"typeParams":[{"name":"T"}],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" <"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"type","text":"OptionType","ref":"org.graalvm.options.OptionType"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"name","text":"defaultType"},{"kind":"punct","text":"("},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":")"}],"params":[{"name":"value","type":[{"kind":"typeParam","text":"T"}]}],"returns":{"type":[{"kind":"type","text":"OptionType","ref":"org.graalvm.options.OptionType"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}]},"doc":{"summary":[{"kind":"text","text":"Returns the default option type for a given value."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the default option type for a given value. Returns "},{"kind":"code","text":"null"},{"kind":"text","text":" if no default option type is available for the Java type of this value."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionType.java","line":281}},{"id":"org.graalvm.options.OptionType#defaultType(java.lang.Class)","anchor":"defaultType(java.lang.Class)","kind":"method","name":"defaultType","modifiers":["public","static"],"typeParams":[{"name":"T"}],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" <"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"type","text":"OptionType","ref":"org.graalvm.options.OptionType"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"name","text":"defaultType"},{"kind":"punct","text":"("},{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"param","text":"clazz"},{"kind":"punct","text":")"}],"params":[{"name":"clazz","type":[{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}]}],"returns":{"type":[{"kind":"type","text":"OptionType","ref":"org.graalvm.options.OptionType"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}]},"doc":{"summary":[{"kind":"text","text":"Returns the default option type for a class."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the default option type for a class. Returns "},{"kind":"code","text":"null"},{"kind":"text","text":" if no default option type is available for this Java type."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionType.java","line":315}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Represents a type of an option that allows to convert string values to Java values."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Represents a type of an option that allows to convert string values to Java values."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionType.java","line":54}},{"id":"org.graalvm.options.OptionValues","name":"OptionValues","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"OptionValues"}],"members":[{"id":"org.graalvm.options.OptionValues#getDescriptors()","anchor":"getDescriptors()","kind":"method","name":"getDescriptors","signature":[{"kind":"type","text":"OptionDescriptors","ref":"org.graalvm.options.OptionDescriptors"},{"kind":"punct","text":" "},{"kind":"name","text":"getDescriptors"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"OptionDescriptors","ref":"org.graalvm.options.OptionDescriptors"}]},"doc":{"summary":[{"kind":"text","text":"Returns all available options."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns all available options."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionValues.java","line":55}},{"id":"org.graalvm.options.OptionValues#set(org.graalvm.options.OptionKey,T)","anchor":"set(org.graalvm.options.OptionKey,T)","kind":"method","name":"set","modifiers":["default"],"annotations":[[{"kind":"annotation","text":"@Deprecated","ref":"java.lang.Deprecated","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Deprecated.html"},{"kind":"punct","text":"("},{"kind":"param","text":"since"},{"kind":"punct","text":" = "},{"kind":"literal","text":"\"22.0\""},{"kind":"punct","text":")"}]],"typeParams":[{"name":"T"}],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" <"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"set"},{"kind":"punct","text":"("},{"kind":"type","text":"OptionKey","ref":"org.graalvm.options.OptionKey"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"param","text":"optionKey"},{"kind":"punct","text":", "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":")"}],"params":[{"name":"optionKey","type":[{"kind":"type","text":"OptionKey","ref":"org.graalvm.options.OptionKey"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}]},{"name":"value","type":[{"kind":"typeParam","text":"T"}]}],"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"because this operation has been deprecated and is no longer supported, in order for OptionValues to be read-only."}]}]}],"doc":{"summary":[{"kind":"text","text":"Sets the value of "},{"kind":"code","text":"optionKey"},{"kind":"text","text":" to "},{"kind":"code","text":"value"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets the value of "},{"kind":"code","text":"optionKey"},{"kind":"text","text":" to "},{"kind":"code","text":"value"},{"kind":"text","text":"."}]}]},"deprecated":{"doc":[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.options.OptionValues"},"code":true,"children":[{"kind":"text","text":"OptionValues"}]},{"kind":"text","text":" 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 read from there."}]}],"since":"22.0"},"since":"19.0","source":{"path":"org/graalvm/options/OptionValues.java","line":68}},{"id":"org.graalvm.options.OptionValues#get(org.graalvm.options.OptionKey)","anchor":"get(org.graalvm.options.OptionKey)","kind":"method","name":"get","typeParams":[{"name":"T"}],"signature":[{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"name","text":"get"},{"kind":"punct","text":"("},{"kind":"type","text":"OptionKey","ref":"org.graalvm.options.OptionKey"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"param","text":"optionKey"},{"kind":"punct","text":")"}],"params":[{"name":"optionKey","type":[{"kind":"type","text":"OptionKey","ref":"org.graalvm.options.OptionKey"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}]}],"returns":{"type":[{"kind":"typeParam","text":"T"}]},"doc":{"summary":[{"kind":"text","text":"Returns the value of a given option."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the value of a given option. "},{"kind":"link","target":{"id":"org.graalvm.options.OptionValues#hasBeenSet(org.graalvm.options.OptionKey)"},"code":true,"children":[{"kind":"text","text":"hasBeenSet(OptionKey)"}]},{"kind":"text","text":" can be used to know whether the value was explicitly set, or is the "},{"kind":"link","target":{"id":"org.graalvm.options.OptionKey#getDefaultValue()"},"code":true,"children":[{"kind":"text","text":"default value"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionValues.java","line":81}},{"id":"org.graalvm.options.OptionValues#hasBeenSet(org.graalvm.options.OptionKey)","anchor":"hasBeenSet(org.graalvm.options.OptionKey)","kind":"method","name":"hasBeenSet","signature":[{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasBeenSet"},{"kind":"punct","text":"("},{"kind":"type","text":"OptionKey","ref":"org.graalvm.options.OptionKey"},{"kind":"punct","text":"<?> "},{"kind":"param","text":"optionKey"},{"kind":"punct","text":")"}],"params":[{"name":"optionKey","type":[{"kind":"type","text":"OptionKey","ref":"org.graalvm.options.OptionKey"},{"kind":"punct","text":"<?>"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Determines if a value for "},{"kind":"code","text":"optionKey"},{"kind":"text","text":" has been set explicitly by the "},{"kind":"code","text":"Context"},{"kind":"text","text":" or "},{"kind":"code","text":"Engine"},{"kind":"text","text":", and therefore "},{"kind":"link","target":{"id":"org.graalvm.options.OptionValues#get(org.graalvm.options.OptionKey)"},"code":true,"children":[{"kind":"text","text":"get(OptionKey)"}]},{"kind":"text","text":" does not call "},{"kind":"link","target":{"id":"org.graalvm.options.OptionKey#getDefaultValue()"},"code":true,"children":[{"kind":"text","text":"OptionKey.getDefaultValue()"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Determines if a value for "},{"kind":"code","text":"optionKey"},{"kind":"text","text":" has been set explicitly by the "},{"kind":"code","text":"Context"},{"kind":"text","text":" or "},{"kind":"code","text":"Engine"},{"kind":"text","text":", and therefore "},{"kind":"link","target":{"id":"org.graalvm.options.OptionValues#get(org.graalvm.options.OptionKey)"},"code":true,"children":[{"kind":"text","text":"get(OptionKey)"}]},{"kind":"text","text":" does not call "},{"kind":"link","target":{"id":"org.graalvm.options.OptionKey#getDefaultValue()"},"code":true,"children":[{"kind":"text","text":"OptionKey.getDefaultValue()"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionValues.java","line":90}},{"id":"org.graalvm.options.OptionValues#hasSetOptions()","anchor":"hasSetOptions()","kind":"method","name":"hasSetOptions","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasSetOptions"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Determines if a value for any of the option keys in "},{"kind":"link","target":{"id":"org.graalvm.options.OptionValues#getDescriptors()"},"code":true,"children":[{"kind":"text","text":"option descriptors"}]},{"kind":"text","text":" "},{"kind":"link","target":{"id":"org.graalvm.options.OptionValues#hasBeenSet(org.graalvm.options.OptionKey)"},"code":true,"children":[{"kind":"text","text":"has been set"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Determines if a value for any of the option keys in "},{"kind":"link","target":{"id":"org.graalvm.options.OptionValues#getDescriptors()"},"code":true,"children":[{"kind":"text","text":"option descriptors"}]},{"kind":"text","text":" "},{"kind":"link","target":{"id":"org.graalvm.options.OptionValues#hasBeenSet(org.graalvm.options.OptionKey)"},"code":true,"children":[{"kind":"text","text":"has been set"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionValues.java","line":98}}],"doc":{"summary":[{"kind":"text","text":"Represents a set of option values based on an "},{"kind":"link","target":{"id":"org.graalvm.options.OptionDescriptor"},"code":true,"children":[{"kind":"text","text":"OptionDescriptor"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Represents a set of option values based on an "},{"kind":"link","target":{"id":"org.graalvm.options.OptionDescriptor"},"code":true,"children":[{"kind":"text","text":"OptionDescriptor"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/options/OptionValues.java","line":48}}]},{"id":"org.graalvm.polyglot","name":"org.graalvm.polyglot","doc":{"summary":[{"kind":"text","text":"The GraalVM SDK polyglot API allows to embed Graal languages in Java applications."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"The GraalVM SDK polyglot API allows to embed Graal languages in Java applications."}]},{"kind":"paragraph","children":[{"kind":"text","text":"To get started quickly create a new "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"org.graalvm.polyglot.Context"}]},{"kind":"text","text":" using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#create(java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"org.graalvm.polyglot.Context.create(String...)"}]},{"kind":"text","text":" and then evaluate guest language code using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#eval(java.lang.String,java.lang.CharSequence)"},"code":true,"children":[{"kind":"text","text":"org.graalvm.polyglot.Context.eval(String, CharSequence)"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"See "},{"kind":"link","url":"https://www.graalvm.org/latest/reference-manual/embed-languages/","children":[{"kind":"text","text":"graalvm.org"}]},{"kind":"text","text":" for more examples on how to use this API."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"For an overview over the features the polyglot API provides."}]}]]},"since":"19.0","types":[{"id":"org.graalvm.polyglot.Context","name":"Context","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"Context"},{"kind":"punct","text":" "},{"kind":"keyword","text":"implements"},{"kind":"punct","text":" "},{"kind":"type","text":"AutoCloseable","ref":"java.lang.AutoCloseable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AutoCloseable.html"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"interfaces":[[{"kind":"type","text":"AutoCloseable","ref":"java.lang.AutoCloseable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AutoCloseable.html"}]],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.polyglot.Context#getEngine()","anchor":"getEngine()","kind":"method","name":"getEngine","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine","ref":"org.graalvm.polyglot.Engine"},{"kind":"punct","text":" "},{"kind":"name","text":"getEngine"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Engine","ref":"org.graalvm.polyglot.Engine"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"Graal "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine"},"code":true,"children":[{"kind":"text","text":"Engine"}]},{"kind":"text","text":" being used by this context"}]}]},"doc":{"summary":[{"kind":"text","text":"Provides access to meta-data about the underlying Graal "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine"},"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Provides access to meta-data about the underlying Graal "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine"},"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":390}},{"id":"org.graalvm.polyglot.Context#eval(org.graalvm.polyglot.Source)","anchor":"eval(org.graalvm.polyglot.Source)","kind":"method","name":"eval","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"eval"},{"kind":"punct","text":"("},{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"},{"kind":"punct","text":" "},{"kind":"param","text":"source"},{"kind":"punct","text":")"}],"params":[{"name":"source","type":[{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a source object to evaluate"}]}]}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the evaluation result. The returned instance is never "},{"kind":"code","text":"null"},{"kind":"text","text":", but the result might represent a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNull()"},"code":true,"children":[{"kind":"text","text":"null"}]},{"kind":"text","text":" value."}]}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case the guest language code parsing or evaluation failed."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed and the current thread is not allowed to access it."}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the language of the given source is not installed or the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getMimeType()"},"code":true,"children":[{"kind":"text","text":"MIME type"}]},{"kind":"text","text":" is not supported with the language or the validation of a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"source option"}]},{"kind":"text","text":" failed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Evaluates a source object by using the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getLanguage()"},"children":[{"kind":"text","text":"language"}]},{"kind":"text","text":" specified in the source."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Evaluates a source object by using the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getLanguage()"},"children":[{"kind":"text","text":"language"}]},{"kind":"text","text":" specified in the source. The result is accessible as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"value"}]},{"kind":"text","text":" and never returns "},{"kind":"code","text":"null"},{"kind":"text","text":". The first time a source is evaluated, it will be parsed. Consecutive invocations of eval with the same source will only execute the already parsed code."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Basic Example:"}]}]},{"kind":"code","text":"try (Context context = Context.create()) {\n    Source source = Source.newBuilder(\"js\", \"42\", \"mysource.js\").build();\n    Value result = context.eval(source);\n    assert result.asInt() == 42;\n}"}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":422}},{"id":"org.graalvm.polyglot.Context#eval(java.lang.String,java.lang.CharSequence)","anchor":"eval(java.lang.String,java.lang.CharSequence)","kind":"method","name":"eval","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"eval"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"languageId"},{"kind":"punct","text":", "},{"kind":"type","text":"CharSequence","ref":"java.lang.CharSequence","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html"},{"kind":"punct","text":" "},{"kind":"param","text":"source"},{"kind":"punct","text":")"}],"params":[{"name":"languageId","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},{"name":"source","type":[{"kind":"type","text":"CharSequence","ref":"java.lang.CharSequence","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html"}]}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the evaluation result. The returned instance is never "},{"kind":"code","text":"null"},{"kind":"text","text":", but the result might represent a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNull()"},"code":true,"children":[{"kind":"text","text":"null"}]},{"kind":"text","text":" value."}]}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case the guest language code parsing or evaluation failed."}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the language does not exist or is not accessible."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed and the current thread is not allowed to access it, or if the given language is not installed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Evaluates a guest language code literal, using a provided "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getId()"},"code":true,"children":[{"kind":"text","text":"language id"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Evaluates a guest language code literal, using a provided "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getId()"},"code":true,"children":[{"kind":"text","text":"language id"}]},{"kind":"text","text":". The result is accessible as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"value"}]},{"kind":"text","text":" and never returns "},{"kind":"code","text":"null"},{"kind":"text","text":". The provided "},{"kind":"link","target":{"id":"java.lang.CharSequence","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html"},"code":true,"children":[{"kind":"text","text":"CharSequence"}]},{"kind":"text","text":" must represent an immutable String."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Basic Example:"}]}]},{"kind":"code","text":"try (Context context = Context.create()) {\n    Value result = context.eval(\"js\", \"42\");\n    assert result.asInt() == 42;\n}"}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":452}},{"id":"org.graalvm.polyglot.Context#parse(org.graalvm.polyglot.Source)","anchor":"parse(org.graalvm.polyglot.Source)","kind":"method","name":"parse","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"parse"},{"kind":"punct","text":"("},{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"},{"kind":"punct","text":" "},{"kind":"param","text":"source"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"params":[{"name":"source","type":[{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a source object to parse"}]}]}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case the guest language code parsing or validation failed."}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the language of the given source is not installed or the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getMimeType()"},"code":true,"children":[{"kind":"text","text":"MIME type"}]},{"kind":"text","text":" is not supported with the language or the validation of a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"source option"}]},{"kind":"text","text":" failed."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed and the current thread is not allowed to access it, or if the given language is not installed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Parses but does not evaluate a given source by using the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getLanguage()"},"children":[{"kind":"text","text":"language"}]},{"kind":"text","text":" specified in the source and returns a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"value"}]},{"kind":"text","text":" that can be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#execute(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"executed"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Parses but does not evaluate a given source by using the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getLanguage()"},"children":[{"kind":"text","text":"language"}]},{"kind":"text","text":" specified in the source and returns a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"value"}]},{"kind":"text","text":" that can be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#execute(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"executed"}]},{"kind":"text","text":". If a parsing fails, e.g. due to a syntax error in the source, then a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" will be thrown. In case of a syntax error the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isSyntaxError()"},"code":true,"children":[{"kind":"text","text":"PolyglotException.isSyntaxError()"}]},{"kind":"text","text":" will return "},{"kind":"code","text":"true"},{"kind":"text","text":". There is no guarantee that only syntax errors will be thrown by this method. Any other guest language exception might be thrown. If the validation succeeds then the method completes without throwing an exception."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The result value only supports an empty set of arguments to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#execute(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"execute"}]},{"kind":"text","text":". If executed repeatedly then the source is evaluated multiple times. "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#interactive(boolean)"},"code":true,"children":[{"kind":"text","text":"Interactive"}]},{"kind":"text","text":" sources will print their result for each execution of the parsing result to the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#out(java.io.OutputStream)"},"code":true,"children":[{"kind":"text","text":"output"}]},{"kind":"text","text":" stream."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If the parsing succeeds and the source is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#cached(boolean)"},"code":true,"children":[{"kind":"text","text":"cached"}]},{"kind":"text","text":" then the result will automatically be reused for consecutive calls to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#parse(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"parse(Source)"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#eval(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"eval(Source)"}]},{"kind":"text","text":". If the validation should be performed for each invocation or the result should not be remembered then "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#cached(boolean)"},"code":true,"children":[{"kind":"text","text":"cached"}]},{"kind":"text","text":" can be set to "},{"kind":"code","text":"false"},{"kind":"text","text":". By default sources are cached."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Basic Example:"}]}]},{"kind":"code","text":"try (Context context = Context.create()) {\n    Source source = Source.create(\"js\", \"42\");\n    Value value;\n    try {\n        value = context.parse(source);\n        // parsing succeeded\n    } catch (PolyglotException e) {\n        if (e.isSyntaxError()) {\n            SourceSection location = e.getSourceLocation();\n            // syntax error detected at location\n        } else {\n            // other guest error detected\n        }\n        throw e;\n    }\n    // evaluate the parsed script\n    value.execute();\n}"}]},"since":"20.2","source":{"path":"org/graalvm/polyglot/Context.java","line":514}},{"id":"org.graalvm.polyglot.Context#parse(java.lang.String,java.lang.CharSequence)","anchor":"parse(java.lang.String,java.lang.CharSequence)","kind":"method","name":"parse","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"parse"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"languageId"},{"kind":"punct","text":", "},{"kind":"type","text":"CharSequence","ref":"java.lang.CharSequence","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html"},{"kind":"punct","text":" "},{"kind":"param","text":"source"},{"kind":"punct","text":")"}],"params":[{"name":"languageId","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},{"name":"source","type":[{"kind":"type","text":"CharSequence","ref":"java.lang.CharSequence","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html"}]}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case the guest language code parsing or evaluation failed."}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the language does not exist or is not accessible."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed and the current thread is not allowed to access it, or if the given language is not installed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Parses but does not evaluate a guest language code literal using a provided "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getId()"},"code":true,"children":[{"kind":"text","text":"language id"}]},{"kind":"text","text":" and character sequence and returns a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"value"}]},{"kind":"text","text":" that can be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#execute(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"executed"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Parses but does not evaluate a guest language code literal using a provided "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getId()"},"code":true,"children":[{"kind":"text","text":"language id"}]},{"kind":"text","text":" and character sequence and returns a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"value"}]},{"kind":"text","text":" that can be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#execute(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"executed"}]},{"kind":"text","text":". The provided "},{"kind":"link","target":{"id":"java.lang.CharSequence","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html"},"code":true,"children":[{"kind":"text","text":"CharSequence"}]},{"kind":"text","text":" must represent an immutable String. This method represents a short-hand for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#parse(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"parse(Source)"}]},{"kind":"text","text":" ."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The result value only supports an empty set of arguments to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#execute(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"execute"}]},{"kind":"text","text":". If executed repeatedly then the source is evaluated multiple times. "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#interactive(boolean)"},"code":true,"children":[{"kind":"text","text":"Interactive"}]},{"kind":"text","text":" sources will print their result for each execution of the parsing result to the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#out(java.io.OutputStream)"},"code":true,"children":[{"kind":"text","text":"output"}]},{"kind":"text","text":" stream."}]},{"kind":"code","text":"try (Context context = Context.create()) {\n    Value value;\n    try {\n        value = context.parse(\"js\", \"42\");\n        // parsing succeeded\n    } catch (PolyglotException e) {\n        if (e.isSyntaxError()) {\n            SourceSection location = e.getSourceLocation();\n            // syntax error detected at location\n        } else {\n            // other guest error detected\n        }\n        throw e;\n    }\n    // evaluate the parsed script\n    value.execute();\n}"}]},"since":"20.2","source":{"path":"org/graalvm/polyglot/Context.java","line":561}},{"id":"org.graalvm.polyglot.Context#getPolyglotBindings()","anchor":"getPolyglotBindings()","kind":"method","name":"getPolyglotBindings","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"getPolyglotBindings"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if context is already closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns polyglot bindings that may be used to exchange symbols between the host and guest languages."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns polyglot bindings that may be used to exchange symbols between the host and guest languages. All languages have unrestricted access to the polyglot bindings. The returned bindings object always has "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMembers()"},"code":true,"children":[{"kind":"text","text":"members"}]},{"kind":"text","text":" and its members are "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"readable"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#putMember(java.lang.String,java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"writable"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#removeMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"removable"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Guest languages may put and get members through language specific APIs. For example, in JavaScript, symbols of the polyglot bindings can be accessed using "},{"kind":"code","text":"Polyglot.import(\"name\")"},{"kind":"text","text":" and set using "},{"kind":"code","text":"Polyglot.export(\"name\", value)"},{"kind":"text","text":". Please see the individual language reference on how to access these symbols."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":585}},{"id":"org.graalvm.polyglot.Context#getBindings(java.lang.String)","anchor":"getBindings(java.lang.String)","kind":"method","name":"getBindings","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"getBindings"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"languageId"},{"kind":"punct","text":")"}],"params":[{"name":"languageId","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"throws":[{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the language does not exist or is not accessible."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case the lazy initialization failed due to a guest language error."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns a value that represents the top-most bindings of a language."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns a value that represents the top-most bindings of a language. The top most bindings of the language returns a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"member"}]},{"kind":"text","text":" for a symbol in the scope. Languages may allow modifications of members of the returned bindings object at the language's discretion. If the language has not been "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#initialize(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"initialized"}]},{"kind":"text","text":" yet, it will be initialized when the bindings are requested."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":606}},{"id":"org.graalvm.polyglot.Context#initialize(java.lang.String)","anchor":"initialize(java.lang.String)","kind":"method","name":"initialize","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"initialize"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"languageId"},{"kind":"punct","text":")"}],"params":[{"name":"languageId","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the identifier of the language to initialize."}]}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" if the language was initialized. Returns "},{"kind":"code","text":"false"},{"kind":"text","text":" if it was already initialized."}]}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case the initialization failed due to a guest language error."}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the language does not exist or is not accessible."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Forces the initialization of a language."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Forces the initialization of a language. It is not necessary to explicitly initialize a language, it will be initialized the first time it is used."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":626}},{"id":"org.graalvm.polyglot.Context#resetLimits()","anchor":"resetLimits()","kind":"method","name":"resetLimits","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"resetLimits"},{"kind":"punct","text":"()"}],"doc":{"summary":[{"kind":"text","text":"Resets all accumulators of resource limits for the associated context to zero."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Resets all accumulators of resource limits for the associated context to zero."}]}]},"since":"19.3","source":{"path":"org/graalvm/polyglot/Context.java","line":639}},{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)","anchor":"asValue(java.lang.Object)","kind":"method","name":"asValue","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"asValue"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"hostValue"},{"kind":"punct","text":")"}],"params":[{"name":"hostValue","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the host value to convert to a polyglot value."}]}]}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the polyglot value."}]}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed"}]}]}],"doc":{"summary":[{"kind":"text","text":"Converts a host value to a polyglot "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"value"}]},{"kind":"text","text":" representation."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Converts a host value to a polyglot "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"value"}]},{"kind":"text","text":" representation. This conversion is applied implicitly whenever "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#execute(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"execution"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#newInstance(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"instantiation"}]},{"kind":"text","text":" arguments are provided, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#putMember(java.lang.String,java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"members"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#setArrayElement(long,java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"array elements"}]},{"kind":"text","text":" are set or when a value is returned by a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"polyglot proxy"}]},{"kind":"text","text":". It is not required nor efficient to explicitly convert to polyglot values before performing these operations. This method is useful to convert a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"mapped"}]},{"kind":"text","text":" host value back to a polyglot value while preserving the identity."}]},{"kind":"paragraph","children":[{"kind":"text","text":"When a host value is converted to a polyglot value the following rules apply:"}]},{"kind":"list","ordered":true,"items":[[{"kind":"paragraph","children":[{"kind":"text","text":"If the "},{"kind":"code","text":"hostValue"},{"kind":"text","text":" is "},{"kind":"code","text":"null"},{"kind":"text","text":", then it will be interpreted as polyglot "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNull()"},"code":true,"children":[{"kind":"text","text":"null"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the "},{"kind":"code","text":"hostValue"},{"kind":"text","text":" is already a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"polyglot value"}]},{"kind":"text","text":", then it will be cast to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"Value"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the "},{"kind":"code","text":"hostValue"},{"kind":"text","text":" is an instance of "},{"kind":"link","target":{"id":"java.lang.Byte","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Byte.html"},"code":true,"children":[{"kind":"text","text":"Byte"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.lang.Short","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Short.html"},"code":true,"children":[{"kind":"text","text":"Short"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.lang.Integer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Integer.html"},"code":true,"children":[{"kind":"text","text":"Integer"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.lang.Long","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Long.html"},"code":true,"children":[{"kind":"text","text":"Long"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.lang.Float","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Float.html"},"code":true,"children":[{"kind":"text","text":"Float"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"java.lang.Double","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Double.html"},"code":true,"children":[{"kind":"text","text":"Double"}]},{"kind":"text","text":", then it will be interpreted as polyglot "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":". Other subclasses of "},{"kind":"link","target":{"id":"java.lang.Number","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Number.html"},"code":true,"children":[{"kind":"text","text":"Number"}]},{"kind":"text","text":" will be interpreted as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isHostObject()"},"code":true,"children":[{"kind":"text","text":"host object"}]},{"kind":"text","text":" (see later)."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the "},{"kind":"code","text":"hostValue"},{"kind":"text","text":" is an instance of "},{"kind":"link","target":{"id":"java.lang.Character","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Character.html"},"code":true,"children":[{"kind":"text","text":"Character"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":", then it will be interpreted as polyglot "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isString()"},"code":true,"children":[{"kind":"text","text":"string"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the "},{"kind":"code","text":"hostValue"},{"kind":"text","text":" is an instance of "},{"kind":"link","target":{"id":"java.lang.Boolean","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Boolean.html"},"code":true,"children":[{"kind":"text","text":"Boolean"}]},{"kind":"text","text":", then it will be interpreted as polyglot "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isBoolean()"},"code":true,"children":[{"kind":"text","text":"boolean"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the "},{"kind":"code","text":"hostValue"},{"kind":"text","text":" is an instance of "},{"kind":"link","target":{"id":"java.time.Instant","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Instant.html"},"code":true,"children":[{"kind":"text","text":"Instant"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.time.LocalTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalTime.html"},"code":true,"children":[{"kind":"text","text":"LocalTime"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.time.LocalDateTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalDateTime.html"},"code":true,"children":[{"kind":"text","text":"LocalDateTime"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.time.ZonedDateTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/ZonedDateTime.html"},"code":true,"children":[{"kind":"text","text":"ZonedDateTime"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.time.OffsetDateTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/OffsetDateTime.html"},"code":true,"children":[{"kind":"text","text":"OffsetDateTime"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.time.OffsetTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/OffsetTime.html"},"code":true,"children":[{"kind":"text","text":"OffsetTime"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.sql.Time","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.sql/java/sql/Time.html"},"code":true,"children":[{"kind":"text","text":"java.sql.Time"}]},{"kind":"text","text":", or "},{"kind":"link","target":{"id":"java.util.Date","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Date.html"},"code":true,"children":[{"kind":"text","text":"java.util.Date"}]},{"kind":"text","text":" but not "},{"kind":"link","target":{"id":"java.sql.Date","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.sql/java/sql/Date.html"},"code":true,"children":[{"kind":"text","text":"java.sql.Date"}]},{"kind":"text","text":", then it will be interpreted as polyglot "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTime()"},"code":true,"children":[{"kind":"text","text":"time"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the "},{"kind":"code","text":"hostValue"},{"kind":"text","text":" is an instance of "},{"kind":"link","target":{"id":"java.time.Instant","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Instant.html"},"code":true,"children":[{"kind":"text","text":"Instant"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.time.LocalDate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalDate.html"},"code":true,"children":[{"kind":"text","text":"LocalDate"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.time.LocalDateTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalDateTime.html"},"code":true,"children":[{"kind":"text","text":"LocalDateTime"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.time.ZonedDateTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/ZonedDateTime.html"},"code":true,"children":[{"kind":"text","text":"ZonedDateTime"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.time.OffsetDateTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/OffsetDateTime.html"},"code":true,"children":[{"kind":"text","text":"OffsetDateTime"}]},{"kind":"text","text":", or "},{"kind":"link","target":{"id":"java.util.Date","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Date.html"},"code":true,"children":[{"kind":"text","text":"java.util.Date"}]},{"kind":"text","text":" but not "},{"kind":"link","target":{"id":"java.sql.Time","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.sql/java/sql/Time.html"},"code":true,"children":[{"kind":"text","text":"java.sql.Time"}]},{"kind":"text","text":", then it will be interpreted as polyglot "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isDate()"},"code":true,"children":[{"kind":"text","text":"date"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the "},{"kind":"code","text":"hostValue"},{"kind":"text","text":" is an instance of "},{"kind":"link","target":{"id":"java.time.ZoneId","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/ZoneId.html"},"code":true,"children":[{"kind":"text","text":"ZoneId"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.time.Instant","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Instant.html"},"code":true,"children":[{"kind":"text","text":"Instant"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.time.ZonedDateTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/ZonedDateTime.html"},"code":true,"children":[{"kind":"text","text":"ZonedDateTime"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.time.OffsetDateTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/OffsetDateTime.html"},"code":true,"children":[{"kind":"text","text":"OffsetDateTime"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.time.OffsetTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/OffsetTime.html"},"code":true,"children":[{"kind":"text","text":"OffsetTime"}]},{"kind":"text","text":", or "},{"kind":"link","target":{"id":"java.util.Date","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Date.html"},"code":true,"children":[{"kind":"text","text":"java.util.Date"}]},{"kind":"text","text":" but not "},{"kind":"link","target":{"id":"java.sql.Time","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.sql/java/sql/Time.html"},"code":true,"children":[{"kind":"text","text":"java.sql.Time"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"java.sql.Date","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.sql/java/sql/Date.html"},"code":true,"children":[{"kind":"text","text":"java.sql.Date"}]},{"kind":"text","text":", then it will be interpreted as polyglot "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTimeZone()"},"code":true,"children":[{"kind":"text","text":"time zone"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the "},{"kind":"code","text":"hostValue"},{"kind":"text","text":" is an instance of "},{"kind":"link","target":{"id":"java.time.ZonedDateTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/ZonedDateTime.html"},"code":true,"children":[{"kind":"text","text":"ZonedDateTime"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.time.OffsetDateTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/OffsetDateTime.html"},"code":true,"children":[{"kind":"text","text":"OffsetDateTime"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.time.Instant","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Instant.html"},"code":true,"children":[{"kind":"text","text":"Instant"}]},{"kind":"text","text":", or "},{"kind":"link","target":{"id":"java.util.Date","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Date.html"},"code":true,"children":[{"kind":"text","text":"java.util.Date"}]},{"kind":"text","text":" but not "},{"kind":"link","target":{"id":"java.sql.Time","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.sql/java/sql/Time.html"},"code":true,"children":[{"kind":"text","text":"java.sql.Time"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"java.sql.Date","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.sql/java/sql/Date.html"},"code":true,"children":[{"kind":"text","text":"java.sql.Date"}]},{"kind":"text","text":", then it will be interpreted as polyglot "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isInstant()"},"code":true,"children":[{"kind":"text","text":"instant"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the "},{"kind":"code","text":"hostValue"},{"kind":"text","text":" is an instance of "},{"kind":"link","target":{"id":"java.time.Duration","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Duration.html"},"code":true,"children":[{"kind":"text","text":"Duration"}]},{"kind":"text","text":" then it will be interpreted as polyglot "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isDuration()"},"code":true,"children":[{"kind":"text","text":"duration"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the "},{"kind":"code","text":"hostValue"},{"kind":"text","text":" is a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"polyglot proxy"}]},{"kind":"text","text":", then it will be interpreted according to the behavior specified by the proxy. See the javadoc of the proxy subclass for further details."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the "},{"kind":"code","text":"hostValue"},{"kind":"text","text":" is a non-primitive "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"mapped Java value"}]},{"kind":"text","text":", then the original value will be restored. For example, if a guest language object was mapped to "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"Map"}]},{"kind":"text","text":", then the original object identity will be preserved when converting back to a polyglot value."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Any other "},{"kind":"code","text":"hostValue"},{"kind":"text","text":" will be interpreted as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isHostObject()"},"code":true,"children":[{"kind":"text","text":"host object"}]},{"kind":"text","text":". Host objects expose all their public java fields and methods as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"members"}]},{"kind":"text","text":". In addition, Java arrays, subtypes of "},{"kind":"link","target":{"id":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},"code":true,"children":[{"kind":"text","text":"List"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"java.util.Map$Entry","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.Entry.html"},"code":true,"children":[{"kind":"text","text":"Entry"}]},{"kind":"text","text":" will be interpreted as a value with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasArrayElements()"},"code":true,"children":[{"kind":"text","text":"array elements"}]},{"kind":"text","text":". The subtypes of "},{"kind":"link","target":{"id":"java.lang.Iterable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html"},"code":true,"children":[{"kind":"text","text":"Iterable"}]},{"kind":"text","text":" will be interpreted as a value with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasIterator()"},"code":true,"children":[{"kind":"text","text":"Value.hasIterator()"}]},{"kind":"text","text":" iterator}. The subtypes of "},{"kind":"link","target":{"id":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},"code":true,"children":[{"kind":"text","text":"Iterator"}]},{"kind":"text","text":" will be interpreted as an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isIterator()"},"code":true,"children":[{"kind":"text","text":"iterator"}]},{"kind":"text","text":" value. The subtypes of "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"Map"}]},{"kind":"text","text":" will be interpreted as a value with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasHashEntries()"},"code":true,"children":[{"kind":"text","text":"Value.hasHashEntries()"}]},{"kind":"text","text":" hash entries}. And single method interfaces annotated with "},{"kind":"link","target":{"id":"java.lang.FunctionalInterface","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/FunctionalInterface.html"},"code":true,"children":[{"kind":"text","text":"FunctionalInterface"}]},{"kind":"text","text":" are "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#execute(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"executable"}]},{"kind":"text","text":" directly. Java "},{"kind":"link","target":{"id":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},"code":true,"children":[{"kind":"text","text":"Class"}]},{"kind":"text","text":" instances are interpreted as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canInstantiate()"},"code":true,"children":[{"kind":"text","text":"instantiable"}]},{"kind":"text","text":", but they do not expose Class methods as members."}]}]]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Basic Examples:"}]},{"kind":"text","text":" The following assertion statements always hold:"}]},{"kind":"code","text":"Context context = Context.create();\nassert context.asValue(null).isNull();\nassert context.asValue(42).isNumber();\nassert context.asValue(\"42\").isString();\nassert context.asValue('c').isString();\nassert context.asValue(new String[0]).hasArrayElements();\nassert context.asValue(new ArrayList<>()).isHostObject();\nassert context.asValue(new ArrayList<>()).hasArrayElements();\nassert context.asValue((Supplier<Integer>) () -> 42).execute().asInt() == 42;"},{"kind":"heading","level":1,"children":[{"kind":"text","text":"Mapping to Java methods and fields"}]},{"kind":"paragraph","children":[{"kind":"text","text":"When Java host objects are passed to guest languages, their public methods and fields are provided as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"members"}]},{"kind":"text","text":". Methods and fields are grouped by name, so only one member is exposed for each name."}]},{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},"code":true,"children":[{"kind":"text","text":"Class"}]},{"kind":"text","text":" objects have a member named "},{"kind":"code","text":"static"},{"kind":"text","text":" referring to the class's companion object containing the static methods of the class. Likewise, the companion object has a member named "},{"kind":"code","text":"class"},{"kind":"text","text":" that points back to the class object."}]},{"kind":"paragraph","children":[{"kind":"text","text":"When an argument value needs to be mapped to match a required Java method parameter type, then the semantics of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"host value mapping"}]},{"kind":"text","text":" is used. The result of the mapping is equivalent of calling "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"Value.as(Class)"}]},{"kind":"text","text":" with the parameter type. Therefore, a "},{"kind":"link","target":{"id":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"},"code":true,"children":[{"kind":"text","text":"ClassCastException"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"},"code":true,"children":[{"kind":"text","text":"NullPointerException"}]},{"kind":"text","text":" is thrown if a parameter value cannot be cast to the required parameter type."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Overloaded java methods are selected based on the provided arguments. In case multiple mapped Java methods with the same name are applicable for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#execute(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"executions"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#newInstance(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"instantiations"}]},{"kind":"text","text":", then the method with the most concrete method with applicable arguments will be called."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The following parameter type hierarchy is used for a method resolution. Left-most parameter types are prioritized over types to their right."}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isBoolean()"},"code":true,"children":[{"kind":"text","text":"Boolean"}]},{"kind":"text","text":" values: boolean, Boolean, Object"}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"String values: char, Character, String, CharSequence, Object"}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Number values: byte, Byte, short, Short, int, Integer, long, Long, float, Float, double, Double, Number, Object"}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Other values are resolved based on their Java type hierarchy."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"If there are multiple concrete methods or too many arguments provided, then an illegal argument type error will be raised."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Advanced Example:"}]},{"kind":"text","text":" This example first creates a new instance of the Java class "},{"kind":"code","text":"Record"},{"kind":"text","text":" and inspects it using the polyglot value API. Later, a host value is converted to a polyglot value using JavaScript guest language."}]},{"kind":"paragraph","children":[{"kind":"text","text":"In the following examples all assertions hold."}]},{"kind":"code","text":"class JavaRecord {\n  public int x = 42;\n  public double y = 42.0;\n  public String name() {\n    return \"foo\";\n  }\n}\nContext context = Context.create();\nValue record = context.asValue(new JavaRecord());\nassert record.getMember(\"x\").asInt() == 42;\nassert record.getMember(\"y\").asDouble() == 42.0d;\nassert record.getMember(\"name\").execute().asString().equals(\"foo\");\n\nassert context.eval(\"js\", \"(function(record) record.x)\")\n              .execute(record).asInt() == 42;\nassert context.eval(\"js\", \"(function(record) record.y)\")\n              .execute(record).asDouble() == 42.0d;\nassert context.eval(\"js\", \"(function(record) record.name())\")\n              .execute(record).asString().equals(\"foo\");"}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"Value.as(Class)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":792}},{"id":"org.graalvm.polyglot.Context#enter()","anchor":"enter()","kind":"method","name":"enter","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"enter"},{"kind":"punct","text":"()"}],"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"code":true,"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a language has denied execution on the current thread."}]}]}],"doc":{"summary":[{"kind":"text","text":"Explicitly enters the context on the current thread."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Explicitly enters the context on the current thread. A context needs to be entered and left for any operation to be performed. For example, before and after invoking the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#execute(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"execute"}]},{"kind":"text","text":" method. This can be inefficient if a very high number of simple operations needs to be performed. By "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#enter()"},"code":true,"children":[{"kind":"text","text":"entering"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#leave()"},"code":true,"children":[{"kind":"text","text":"leaving"}]},{"kind":"text","text":" once explicitly, the overhead for entering/leaving the context for each operation can be eliminated. Contexts can be entered multiple times on the same thread."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#leave()"},"code":true,"children":[{"kind":"text","text":"leave a context."}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":813}},{"id":"org.graalvm.polyglot.Context#equals(java.lang.Object)","anchor":"equals(java.lang.Object)","kind":"method","name":"equals","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"equals"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"obj"},{"kind":"punct","text":")"}],"params":[{"name":"obj","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"overrides":{"id":"java.lang.Object#equals(java.lang.Object)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":824}},{"id":"org.graalvm.polyglot.Context#hashCode()","anchor":"hashCode()","kind":"method","name":"hashCode","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"hashCode"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"overrides":{"id":"java.lang.Object#hashCode()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":838}},{"id":"org.graalvm.polyglot.Context#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"25.3","source":{"path":"org/graalvm/polyglot/Context.java","line":848}},{"id":"org.graalvm.polyglot.Context#leave()","anchor":"leave()","kind":"method","name":"leave","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"leave"},{"kind":"punct","text":"()"}],"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed or if the context was not "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#enter()"},"code":true,"children":[{"kind":"text","text":"entered"}]},{"kind":"text","text":" on the current thread."}]}]}],"doc":{"summary":[{"kind":"text","text":"Explicitly leaves the context on the current thread."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Explicitly leaves the context on the current thread. The context must be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#enter()"},"code":true,"children":[{"kind":"text","text":"entered"}]},{"kind":"text","text":" before calling this method."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#enter()"},"code":true,"children":[{"kind":"text","text":"enter a context."}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":866}},{"id":"org.graalvm.polyglot.Context#close(boolean)","anchor":"close(boolean)","kind":"method","name":"close","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"close"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"cancelIfExecuting"},{"kind":"punct","text":")"}],"params":[{"name":"cancelIfExecuting","type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"true"},{"kind":"text","text":" then currently executing contexts will be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isCancelled()"},"code":true,"children":[{"kind":"text","text":"cancelled"}]},{"kind":"text","text":", else an "},{"kind":"link","target":{"id":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"},"code":true,"children":[{"kind":"text","text":"IllegalStateException"}]},{"kind":"text","text":" is thrown."}]}]}],"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case the close failed due to a guest language error, or, if cancelIfExecuting is "},{"kind":"code","text":"false"},{"kind":"text","text":", the exception is also thrown when the context was "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isCancelled()"},"code":true,"children":[{"kind":"text","text":"cancelled"}]},{"kind":"text","text":" or the context was "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isExit()"},"code":true,"children":[{"kind":"text","text":"exited"}]},{"kind":"text","text":" at request of the guest application."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is still running and cancelIfExecuting is "},{"kind":"code","text":"false"}]}]}],"doc":{"summary":[{"kind":"text","text":"Closes the context and frees up potentially allocated native resources."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Closes the context and frees up potentially allocated native resources. A context cannot free all native resources allocated automatically. For this reason it is necessary to close contexts after use. If a context is cancelled, then the executing thread will throw a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":". The exception indicates that it was "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isCancelled()"},"code":true,"children":[{"kind":"text","text":"cancelled"}]},{"kind":"text","text":". Please note, canceling a single context can negatively affect the performance of other executing contexts constructed with the same engine."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If internal errors occur during context closing, then they are printed to the configured "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#err(java.io.OutputStream)"},"code":true,"children":[{"kind":"text","text":"error output stream"}]},{"kind":"text","text":". If a context was closed, then its methods will throw an "},{"kind":"link","target":{"id":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"},"code":true,"children":[{"kind":"text","text":"IllegalStateException"}]},{"kind":"text","text":" when invoked. If an attempt to close a context was successful, then consecutive calls to close have no effect."}]},{"kind":"paragraph","children":[{"kind":"text","text":"For convenience, before the actual closing process begins, the close method leaves the context on the current thread, if it was entered "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#enter()"},"code":true,"children":[{"kind":"text","text":"explicitly"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#close()"},"code":true,"children":[{"kind":"text","text":"close an engine."}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":906}},{"id":"org.graalvm.polyglot.Context#close()","anchor":"close()","kind":"method","name":"close","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"close"},{"kind":"punct","text":"()"}],"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case the close failed due to a guest language error, or the context was "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isCancelled()"},"code":true,"children":[{"kind":"text","text":"cancelled"}]},{"kind":"text","text":" or the context was "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isExit()"},"code":true,"children":[{"kind":"text","text":"exited"}]},{"kind":"text","text":" at request of the guest application."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is currently executing on another thread."}]}]}],"overrides":{"id":"java.lang.AutoCloseable#close()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AutoCloseable.html#close()"},"doc":{"summary":[{"kind":"text","text":"Closes this context and frees up potentially allocated native resources."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Closes this context and frees up potentially allocated native resources. A context may not free all native resources allocated automatically. For this reason it is recommended to close contexts after use. If the context is currently being executed on another thread, then an "},{"kind":"link","target":{"id":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"},"code":true,"children":[{"kind":"text","text":"IllegalStateException"}]},{"kind":"text","text":" is thrown. To close concurrently executing contexts see "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close(boolean)"},"code":true,"children":[{"kind":"text","text":"close(boolean)"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If internal errors occur during the context closure, then they are printed to the configured "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#err(java.io.OutputStream)"},"code":true,"children":[{"kind":"text","text":"error output stream"}]},{"kind":"text","text":". If a context was closed, then its methods will throw an "},{"kind":"link","target":{"id":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"},"code":true,"children":[{"kind":"text","text":"IllegalStateException"}]},{"kind":"text","text":", when invoked. If an attempt to close a context was successful, then consecutive calls to close have no effect."}]},{"kind":"paragraph","children":[{"kind":"text","text":"For convenience, before the actual closing process begins, the close method leaves the context on the current thread, if it was entered "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#enter()"},"code":true,"children":[{"kind":"text","text":"explicitly"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#close()"},"code":true,"children":[{"kind":"text","text":"close an engine."}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":934}},{"id":"org.graalvm.polyglot.Context#interrupt(java.time.Duration)","anchor":"interrupt(java.time.Duration)","kind":"method","name":"interrupt","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"interrupt"},{"kind":"punct","text":"("},{"kind":"type","text":"Duration","ref":"java.time.Duration","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Duration.html"},{"kind":"punct","text":" "},{"kind":"param","text":"timeout"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"TimeoutException","ref":"java.util.concurrent.TimeoutException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/concurrent/TimeoutException.html"}],"params":[{"name":"timeout","type":[{"kind":"type","text":"Duration","ref":"java.time.Duration","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Duration.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"specifies the duration the interrupt method will wait for the active threads of the context to be finished. Setting the duration to "},{"kind":"link","target":{"id":"java.time.Duration#ZERO","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Duration.html#ZERO"},"code":true,"children":[{"kind":"text","text":"0"}]},{"kind":"text","text":" means wait indefinitely."}]}]}],"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case the context is entered in the current thread."}]}]},{"type":[{"kind":"type","text":"TimeoutException","ref":"java.util.concurrent.TimeoutException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/concurrent/TimeoutException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case the interrupt was not successful, i.e., not all threads were finished within the specified time limit."}]}]}],"doc":{"summary":[{"kind":"text","text":"Use this method to interrupt this context."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Use this method to interrupt this context. The interruption is non-destructive meaning the context is still usable after this method finishes. Please note that guest finally blocks are executed during interrupt. A context thread may not be interruptiple if it uses non-interruptible waiting or executes non-interruptible host code. This method may be used as a \"soft cancel\", meaning that it can be used before "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close(boolean)"},"code":true,"children":[{"kind":"text","text":"close(true)"}]},{"kind":"text","text":" is executed."}]}]},"since":"20.3","source":{"path":"org/graalvm/polyglot/Context.java","line":956}},{"id":"org.graalvm.polyglot.Context#safepoint()","anchor":"safepoint()","kind":"method","name":"safepoint","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"safepoint"},{"kind":"punct","text":"()"}],"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case the close failed due to a guest language error."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"code":true,"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":"."}]}]}],"doc":{"summary":[{"kind":"text","text":"Polls safepoints events and executes them for the current thread."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Polls safepoints events and executes them for the current thread. This allows guest languages to run actions between long-running host method calls. Polyglot embeddings that rely on cancellation should call this method whenever a potentially long-running host operation is executed. For example, iterating an unbounded array. Guest language code and operations automatically poll safepoints regularly."}]},{"kind":"paragraph","children":[{"kind":"text","text":"In this example we allow "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#interrupt(java.time.Duration)"},"code":true,"children":[{"kind":"text","text":"interruption"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close(boolean)"},"code":true,"children":[{"kind":"text","text":"cancellation"}]},{"kind":"text","text":" to stop the processing of our event queue."}]},{"kind":"code","text":"class EventProcessor {\n\n  List events = new ArrayDeque(); // list of arbitrary size\n\n  public void processEvents() {\n    Context context = Context.getCurrent();\n\n    while (Object event = events.pop()) {\n\n        // process event\n\n        // allow cancellation and interruptions\n        try {\n            context.safepoint();\n        } catch (PolyglotException e) {\n            if (e.isInterrupted() || e.isCancelled()) {\n                // break event processing if interrupted or cancelled\n                throw e;\n            }\n            // other handling of guest errors or rethrow\n        }\n    }\n }\n}"}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Context.java","line":1006}},{"id":"org.graalvm.polyglot.Context#getCurrent()","anchor":"getCurrent()","kind":"method","name":"getCurrent","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Context","ref":"org.graalvm.polyglot.Context"},{"kind":"punct","text":" "},{"kind":"name","text":"getCurrent"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Context","ref":"org.graalvm.polyglot.Context"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if no context is currently entered."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the currently entered polyglot context."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the currently entered polyglot context. A context will be entered if the current executing Java method is called by a Graal guest language or if a context is entered explicitly using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#enter()"},"code":true,"children":[{"kind":"text","text":"Context.enter()"}]},{"kind":"text","text":" on the current thread. The returned context may be used to:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"text","text":"Evaluate guest language code from "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#eval(java.lang.String,java.lang.CharSequence)"},"code":true,"children":[{"kind":"text","text":"string literals"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#eval(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"file"}]},{"kind":"text","text":" sources."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Convert"}]},{"kind":"text","text":" Java values to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"polyglot values"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Access top-level "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#getBindings(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"bindings"}]},{"kind":"text","text":" of other languages."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Access "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#getPolyglotBindings()"},"code":true,"children":[{"kind":"text","text":"polyglot bindings"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Access meta-data like available "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#getLanguages()"},"code":true,"children":[{"kind":"text","text":"languages"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#getOptions()"},"code":true,"children":[{"kind":"text","text":"options"}]},{"kind":"text","text":" of the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#getEngine()"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":"."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"The returned context can "},{"kind":"strong","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" be used to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#enter()"},"code":true,"children":[{"kind":"text","text":"enter"}]},{"kind":"text","text":" , "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#leave()"},"code":true,"children":[{"kind":"text","text":"leave"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"code":true,"children":[{"kind":"text","text":"close"}]},{"kind":"text","text":" the context or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#getEngine()"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":". Invoking such methods will cause an "},{"kind":"link","target":{"id":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"},"code":true,"children":[{"kind":"text","text":"IllegalStateException"}]},{"kind":"text","text":" to be thrown. This ensures that only the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#create(java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"creator"}]},{"kind":"text","text":" of a context is allowed to enter, leave or close a context."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The current entered context may change. It is therefore required to call "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#getCurrent()"},"code":true,"children":[{"kind":"text","text":"getCurrent"}]},{"kind":"text","text":" every time a context is needed. The current entered context should not be cached in static fields."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1039}},{"id":"org.graalvm.polyglot.Context#create(java.lang.String...)","anchor":"create(java.lang.String...)","kind":"method","name":"create","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Context","ref":"org.graalvm.polyglot.Context"},{"kind":"punct","text":" "},{"kind":"name","text":"create"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"... "},{"kind":"param","text":"permittedLanguages"},{"kind":"punct","text":")"}],"params":[{"name":"permittedLanguages","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"..."}],"varargs":true}],"returns":{"type":[{"kind":"type","text":"Context","ref":"org.graalvm.polyglot.Context"}]},"doc":{"summary":[{"kind":"text","text":"Creates a context with default configuration."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a context with default configuration. This method is a shortcut for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#newBuilder(java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"newBuilder(permittedLanguages).build()"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#newBuilder(java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"newBuilder(String...)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1055}},{"id":"org.graalvm.polyglot.Context#newBuilder(java.lang.String...)","anchor":"newBuilder(java.lang.String...)","kind":"method","name":"newBuilder","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"newBuilder"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"... "},{"kind":"param","text":"permittedLanguages"},{"kind":"punct","text":")"}],"params":[{"name":"permittedLanguages","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"..."}],"varargs":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"names of languages permitted in the context. If no languages are provided, then all installed languages will be permitted. If an explicit "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#engine(org.graalvm.polyglot.Engine)"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":" was specified then only those languages may be used that were installed and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#newBuilder(java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"permitted"}]},{"kind":"text","text":" by the specified engine. Languages are validated when the context is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#build()"},"code":true,"children":[{"kind":"text","text":"built"}]},{"kind":"text","text":". An "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" will be thrown if an unknown or a language denied by the engine was used."}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a builder that can create a context"}]}]},"doc":{"summary":[{"kind":"text","text":"Creates a builder for constructing a context with custom configuration."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a builder for constructing a context with custom configuration."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1072}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"A polyglot context for Graal guest languages that allows to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#eval(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"evaluate"}]},{"kind":"text","text":" code."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"A polyglot context for Graal guest languages that allows to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#eval(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"evaluate"}]},{"kind":"text","text":" code. A polyglot context represents the global runtime state of all "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#getLanguages()"},"code":true,"children":[{"kind":"text","text":"installed"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#newBuilder(java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"permitted"}]},{"kind":"text","text":" languages. Permitted languages are "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#initialize(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"initialized"}]},{"kind":"text","text":" lazily, when they are used for the first time. For many context operations, a "},{"kind":"emphasis","children":[{"kind":"text","text":"language identifier"}]},{"kind":"text","text":" needs to be specified. A language identifier is unique for each language."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Evaluation"}]},{"kind":"paragraph","children":[{"kind":"text","text":"A context allows to evaluate a guest language source code using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#eval(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"eval(Source)"}]},{"kind":"text","text":". This is possible by evaluating "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":" objects or a given language identifier and code "},{"kind":"link","target":{"id":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":". The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#eval(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"evaluation"}]},{"kind":"text","text":" returns either the result value or throws a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" if a guest language error occurs."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Example"}]},{"kind":"text","text":" for evaluation of a fragment of JavaScript code with a new context:"}]},{"kind":"code","text":"Context context = Context.create();\nValue result = context.eval(\"js\", \"42\");\nassert result.asInt() == 42;\ncontext.close();"},{"kind":"paragraph","children":[{"kind":"text","text":"In this example:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"text","text":"First we create a new context with all permitted languages."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Next, we evaluate the expression \"42\" with language \"js\", which is the language identifier for JavaScript. Since this is the first time we access JavaScript, it automatically gets "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#initialize(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"initialized"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Then, we assert the result value by converting the result value as primitive "},{"kind":"code","text":"int"},{"kind":"text","text":" ."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Finally, when a context is no longer needed, it is recommended to explicitly close it to ensure timely release of resources. While contexts are automatically closed when no longer strongly reachable, explicit closure is still preferred. Contexts are also "},{"kind":"link","target":{"id":"java.lang.AutoCloseable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AutoCloseable.html"},"code":true,"children":[{"kind":"text","text":"AutoCloseable"}]},{"kind":"text","text":", allowing them to be used with the Java "},{"kind":"code","text":"try-with-resources"},{"kind":"text","text":" statement."}]}]]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Configuration"}]},{"kind":"paragraph","children":[{"kind":"text","text":"Contexts may be created either with default configuration using the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#create(java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"create method"}]},{"kind":"text","text":" or with custom configuration using the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#newBuilder(java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"builder"}]},{"kind":"text","text":". Both methods allow to specify a subset of the installed languages as permitted languages. If no language is specified then all installed languages are permitted. Using the builder method "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#in(java.io.InputStream)"},"code":true,"children":[{"kind":"text","text":"input"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#err(java.io.OutputStream)"},"code":true,"children":[{"kind":"text","text":"error"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#out(java.io.OutputStream)"},"code":true,"children":[{"kind":"text","text":"output"}]},{"kind":"text","text":" streams, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"options"}]},{"kind":"text","text":", and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#arguments(java.lang.String,java.lang.String[])"},"code":true,"children":[{"kind":"text","text":"application arguments"}]},{"kind":"text","text":" may be configured."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Options may be specified for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#getLanguages()"},"code":true,"children":[{"kind":"text","text":"languages"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#getInstruments()"},"code":true,"children":[{"kind":"text","text":"instruments"}]},{"kind":"text","text":", the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#getOptions()"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":" and the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#getOptions()"},"code":true,"children":[{"kind":"text","text":"compiler"}]},{"kind":"text","text":". For "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getOptions()"},"code":true,"children":[{"kind":"text","text":"language options"}]},{"kind":"text","text":", the option key consists of the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getId()"},"code":true,"children":[{"kind":"text","text":"language id"}]},{"kind":"text","text":" plus a dot followed by the option name (e.g. \"js.Strict\"). For most languages the option names start with an upper-case letter by convention. A list of available options may be received using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getOptions()"},"code":true,"children":[{"kind":"text","text":"Language.getOptions()"}]},{"kind":"text","text":". "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Instrument#getOptions()"},"code":true,"children":[{"kind":"text","text":"Instrument options"}]},{"kind":"text","text":" are structured in the same way as language options but start with the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Instrument#getId()"},"code":true,"children":[{"kind":"text","text":"instrument id"}]},{"kind":"text","text":" instead."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If system properties are "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#useSystemProperties(boolean)"},"code":true,"children":[{"kind":"text","text":"enabled"}]},{"kind":"text","text":", which they are by default, then all polyglot options maybe specified with the prefix \"polyglot.\" (e.g. \"-Dpolyglot.js.Strict=true\"). The system properties are read only once when the context or engine instance is created. After that, changes to the system properties have no affect."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Each Graal language performs an initialization step before it can be used to execute code, after which it remains initialized for the lifetime of the context. Initialization is by default lazy and automatic, but initialization can be forced "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#initialize(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"manually"}]},{"kind":"text","text":" if needed."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Example"}]},{"kind":"text","text":" for custom configuration using the context builder:"}]},{"kind":"code","text":"OutputStream myOut = new BufferedOutputStream()\nContext context = Context.newBuilder(\"js\", \"R\")\n                         .out(myOut)\n                         .option(\"js.Strict\", \"true\")\n                         .allowAllAccess(true)\n                         .build();\ncontext.eval(\"js\", \"42\");\ncontext.eval(\"R\", \"42\");\ncontext.close();"},{"kind":"paragraph","children":[{"kind":"text","text":"In this example:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"text","text":"At first, we create a new context and specify permitted languages as parameters."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Secondly, we set the standard output stream to be used for the context."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Then, we specify an option for JavaScript language only, by structuring the option key with the language id followed by the option name;"}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"With "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"Builder.allowAllAccess(boolean)"}]},{"kind":"text","text":" we grant a new context instance with the same access privileges as the host virtual machine."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Next, we evaluate the expression \"42\" with language \"js\", which is the language identifier for JavaScript. Since this is the first time we access JavaScript, it first gets "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#initialize(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"initialized"}]},{"kind":"text","text":" as well."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Similarly to the previous line, the R language expression gets evaluated."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Finally, we close the context, since it is no longer needed, to free all allocated resources. Contexts are also "},{"kind":"link","target":{"id":"java.lang.AutoCloseable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AutoCloseable.html"},"code":true,"children":[{"kind":"text","text":"AutoCloseable"}]},{"kind":"text","text":" for use with the Java "},{"kind":"code","text":"try-with-resources"},{"kind":"text","text":" statement."}]}]]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Bindings"}]},{"kind":"paragraph","children":[{"kind":"text","text":"The symbols of the top-most scope of a language can be accessed using the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#getBindings(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"language bindings"}]},{"kind":"text","text":". Each language provides its own bindings object for a context. The bindings object may be used to read, modify, insert and delete members in the top-most scope of the language. Certain languages may not allow write access to the bindings object. See "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#getBindings(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"getBindings(String)"}]},{"kind":"text","text":" for details."}]},{"kind":"paragraph","children":[{"kind":"text","text":"A context instance also provides access to the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#getPolyglotBindings()"},"code":true,"children":[{"kind":"text","text":"polyglot"}]},{"kind":"text","text":" bindings. The polyglot bindings are shared between languages and may be used to exchange values. See "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#getPolyglotBindings()"},"code":true,"children":[{"kind":"text","text":"getPolyglotBindings()"}]},{"kind":"text","text":" for details."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Examples"}]},{"kind":"text","text":" using language bindings from JavaScript:"}]},{"kind":"code","text":"Context context = Context.create(\"js\");\nValue jsBindings = context.getBindings(\"js\")\n\njsBindings.putMember(\"foo\", 42);\nassert context.eval(\"js\", \"foo\").asInt() == 42;\n\ncontext.eval(\"js\", \"var bar = 42\");\nassert jsBindings.getMember(\"bar\").asInt() == 42;\n\nassert jsBindings.getMember(\"Math\")\n                 .getMember(\"abs\")\n                 .execute(-42)\n                 .asInt() == 42;\ncontext.close();"},{"kind":"paragraph","children":[{"kind":"text","text":"In this example:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"text","text":"We create a new context with JavaScript as the only permitted language."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Next, we load the JavaScript bindings object and assign it to a local variable "},{"kind":"code","text":"jsBindings"},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Then, we insert a new member "},{"kind":"code","text":"foo"},{"kind":"text","text":" into to the bindings object and verify that the object is accessible within the language by reading from a global symbol with the same name."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"After that, we declare a new global variable in JavaScript and verify that it is accessible as member of the language bindings object."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Next, we access we access a JavaScript builtin named "},{"kind":"code","text":"Math.abs"},{"kind":"text","text":" symbol and execute it with -42. This result is asserted to be 42."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Finally, we close the context to free all allocated resources."}]}]]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Host Interoperability"}]},{"kind":"paragraph","children":[{"kind":"text","text":"It is often necessary to interact with values of the host runtime and Graal guest languages. Such objects are referred to as "},{"kind":"emphasis","children":[{"kind":"text","text":"host objects"}]},{"kind":"text","text":". Every Java value that is passed to a Graal language is interpreted according to the specification described in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"asValue(Object)"}]},{"kind":"text","text":". Also see "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"Value.as(Class)"}]},{"kind":"text","text":" for further details."}]},{"kind":"paragraph","children":[{"kind":"text","text":"By default only public classes, methods, and fields that are annotated with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Export"},"code":true,"children":[{"kind":"text","text":"@HostAccess.Export"}]},{"kind":"text","text":" are accessible to the guest language. This policy can be customized using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostAccess(org.graalvm.polyglot.HostAccess)"},"code":true,"children":[{"kind":"text","text":"Builder.allowHostAccess(HostAccess)"}]},{"kind":"text","text":" when constructing the context."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Example"}]},{"kind":"text","text":" using a Java object from JavaScript:"}]},{"kind":"code","text":"public class JavaRecord {\n    @HostAccess.Export public int x;\n\n    @HostAccess.Export\n    public String name() {\n        return \"foo\";\n    }\n}\nContext context = Context.create();\n\nJavaRecord record = new JavaRecord();\ncontext.getBindings(\"js\").putMember(\"javaRecord\", record);\n\ncontext.eval(\"js\", \"javaRecord.x = 42\");\nassert record.x == 42;\n\ncontext.eval(\"js\", \"javaRecord.name()\").asString().equals(\"foo\");"},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Error Handling"}]},{"kind":"paragraph","children":[{"kind":"text","text":"Program execution may fail when executing a guest language code or when accessing guest language object. Almost all methods in the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"Value"}]},{"kind":"text","text":" API throw a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" in case an error occurs. See "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" for further details on error handling."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Isolation"}]},{"kind":"paragraph","children":[{"kind":"text","text":"Each context is by default isolated from all other instances with respect to both language evaluation semantics and resource consumption. By default, a new context instance has no access to host resources, like threads, files or loading new host classes. To allow access to such resources either the individual access right must be granted or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"all access"}]},{"kind":"text","text":" must be set to "},{"kind":"code","text":"true"},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Contexts can be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#engine(org.graalvm.polyglot.Engine)"},"children":[{"kind":"text","text":"configured"}]},{"kind":"text","text":" to share certain system resources like ASTs or optimized code by specifying a single underlying engine. See "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine"},"code":true,"children":[{"kind":"text","text":"Engine"}]},{"kind":"text","text":" for more details about code sharing."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Context can be configured to allow value sharing between multiple contexts (allowed by default). See "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowValueSharing(boolean)"},"code":true,"children":[{"kind":"text","text":"Builder.allowValueSharing(boolean)"}]},{"kind":"text","text":" for details."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Proxies"}]},{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"proxy interfaces"}]},{"kind":"text","text":" allow to mimic guest language objects, arrays, executables, primitives and native objects in Graal languages. Every Graal language will treat proxy instances like objects of that particular language. Multiple proxy interfaces can be implemented at the same time. For example, it is useful to provide proxy values that are objects with members and arrays at the same time."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Thread-Safety"}]},{"kind":"paragraph","children":[{"kind":"text","text":"It is safe to use a context instance from a single thread. It is also safe to use it with multiple threads if they do not access the context at the same time. Whether a single context instance may be used from multiple threads at the same time depends on if all initialized languages support it. If initialized languages support multi-threading, then the context instance may be used from multiple threads at the same time. If a context is used from multiple threads and the language does not fit, then an "},{"kind":"link","target":{"id":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"},"code":true,"children":[{"kind":"text","text":"IllegalStateException"}]},{"kind":"text","text":" is thrown by the accessing method."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Meta-data from the context's underlying "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#getEngine()"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":" can be retrieved safely by any thread at any time."}]},{"kind":"paragraph","children":[{"kind":"text","text":"A context may be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":" from any thread, but only if the context is not currently executing code. If the context is currently executing some code, a different thread may kill the running execution and close the context using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close(boolean)"},"code":true,"children":[{"kind":"text","text":"close(boolean)"}]},{"kind":"text","text":"."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Context Exit"}]},{"kind":"paragraph","children":[{"kind":"text","text":"A context is exited naturally by calling the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close(boolean)"},"code":true,"children":[{"kind":"text","text":"close"}]},{"kind":"text","text":" method. A context may also be exited at the guest application request. There are two ways a guest language may exit."}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"text","text":"Soft exit. A guest language throws a special exception that causes the embedder thread to eventually throw a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isExit()"},"code":true,"children":[{"kind":"text","text":"PolyglotException.isExit()"}]},{"kind":"text","text":" returning "},{"kind":"code","text":"true"},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#getExitStatus()"},"code":true,"children":[{"kind":"text","text":"PolyglotException.getExitStatus()"}]},{"kind":"text","text":" returning the exit status code specified by the guest application. The special exception does not influence other threads and does not trigger context close on its own. Closing the context is up to the embedder."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Hard exit. A guest language uses a builtin command that unwinds all context threads and closes the context by force. Embedder threads also throw a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isExit()"},"code":true,"children":[{"kind":"text","text":"PolyglotException.isExit()"}]},{"kind":"text","text":" returning "},{"kind":"code","text":"true"},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#getExitStatus()"},"code":true,"children":[{"kind":"text","text":"PolyglotException.getExitStatus()"}]},{"kind":"text","text":" returning the exit status code specified by the guest application. However, the context is closed automatically. The hard exit can be customized using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#useSystemExit(boolean)"},"code":true,"children":[{"kind":"text","text":"Builder.useSystemExit(boolean)"}]},{"kind":"text","text":". If "},{"kind":"code","text":"true"},{"kind":"text","text":", the context threads are unwound by calling "},{"kind":"link","target":{"id":"java.lang.System#exit(int)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/System.html#exit(int)"},"code":true,"children":[{"kind":"text","text":"System.exit(int)"}]},{"kind":"text","text":" with the exit status parameter specified by the guest application. This operation terminates the whole host application."}]}]]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Pre-Initialization"}]},{"kind":"paragraph","children":[{"kind":"text","text":"The context pre-initialization can be used to perform expensive builtin creation in the time of native compilation."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The context pre-initialization is enabled by setting the system property "},{"kind":"code","text":"polyglot.image-build-time.PreinitializeContexts"},{"kind":"text","text":" to a comma separated list of language ids which should be pre-initialized, for example: "},{"kind":"code","text":"-Dpolyglot.image-build-time.PreinitializeContexts=js,python"}]},{"kind":"paragraph","children":[{"kind":"text","text":"See "},{"kind":"code","text":"com.oracle.truffle.api.TruffleLanguage.patchContext(java.lang.Object, com.oracle.truffle.api.TruffleLanguage.Env)"},{"kind":"text","text":" for details about pre-initialization for language implementers."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":343}},{"id":"org.graalvm.polyglot.Context$Builder","name":"Context.Builder","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"Context.Builder"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"enclosing":"org.graalvm.polyglot.Context","members":[{"id":"org.graalvm.polyglot.Context$Builder#apply(java.util.function.Consumer)","anchor":"apply(java.util.function.Consumer)","kind":"method","name":"apply","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"apply"},{"kind":"punct","text":"("},{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":"> "},{"kind":"param","text":"action"},{"kind":"punct","text":")"}],"params":[{"name":"action","type":[{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"The Consumer that configures this Builder instance; it is not supposed to finalize the Builder using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#build()"},"code":true,"children":[{"kind":"text","text":"build()"}]},{"kind":"text","text":"."}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Applies the provided Consumer to this Builder instance."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Applies the provided Consumer to this Builder instance."}]},{"kind":"paragraph","children":[{"kind":"text","text":"This method allows encapsulating complex Builder configuration logic into separate methods while maintaining the fluent API of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder"},"code":true,"children":[{"kind":"text","text":"Context.Builder"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Example"}]},{"kind":"code","text":"private void configureEnv(Builder builder) {\n    return builder.environment(\"DEBUG\", appConfiguration.isDebugMode())\n                  .environment(\"APP_NAME\", appConfiguration.getApplicationName())\n                  .environment(\"JAVA_VER\", System.getProperty(\"java.version\"))@\n}\n\npublic Context createContext() {\n    return Context.newBuilder()\n                  .apply(this::configureEnv)\n                  .allowNativeAccess(true)\n                  .build();\n}"}]},"since":"25.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1178}},{"id":"org.graalvm.polyglot.Context$Builder#engine(org.graalvm.polyglot.Engine)","anchor":"engine(org.graalvm.polyglot.Engine)","kind":"method","name":"engine","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"engine"},{"kind":"punct","text":"("},{"kind":"type","text":"Engine","ref":"org.graalvm.polyglot.Engine"},{"kind":"punct","text":" "},{"kind":"param","text":"engine"},{"kind":"punct","text":")"}],"params":[{"name":"engine","type":[{"kind":"type","text":"Engine","ref":"org.graalvm.polyglot.Engine"}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Explicitly sets the underlying engine to use."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Explicitly sets the underlying engine to use. By default, every context has its own isolated engine. If multiple contexts are created from one engine, then they may share/cache certain system resources like ASTs or optimized code by specifying a single underlying engine. See "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine"},"code":true,"children":[{"kind":"text","text":"Engine"}]},{"kind":"text","text":" for more details about system resource sharing."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1191}},{"id":"org.graalvm.polyglot.Context$Builder#out(java.io.OutputStream)","anchor":"out(java.io.OutputStream)","kind":"method","name":"out","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"out"},{"kind":"punct","text":"("},{"kind":"type","text":"OutputStream","ref":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"},{"kind":"punct","text":" "},{"kind":"param","text":"out"},{"kind":"punct","text":")"}],"params":[{"name":"out","type":[{"kind":"type","text":"OutputStream","ref":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Sets the standard output stream to be used for the context."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets the standard output stream to be used for the context. If not set, then the standard output stream configured for the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#engine(org.graalvm.polyglot.Engine)"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":" or standard error stream is used."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1204}},{"id":"org.graalvm.polyglot.Context$Builder#err(java.io.OutputStream)","anchor":"err(java.io.OutputStream)","kind":"method","name":"err","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"err"},{"kind":"punct","text":"("},{"kind":"type","text":"OutputStream","ref":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"},{"kind":"punct","text":" "},{"kind":"param","text":"err"},{"kind":"punct","text":")"}],"params":[{"name":"err","type":[{"kind":"type","text":"OutputStream","ref":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Sets the error output stream to be used for the context."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets the error output stream to be used for the context. If not set, then either the error stream configured for the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#engine(org.graalvm.polyglot.Engine)"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":" or standard error stream is used."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1217}},{"id":"org.graalvm.polyglot.Context$Builder#in(java.io.InputStream)","anchor":"in(java.io.InputStream)","kind":"method","name":"in","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"in"},{"kind":"punct","text":"("},{"kind":"type","text":"InputStream","ref":"java.io.InputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/InputStream.html"},{"kind":"punct","text":" "},{"kind":"param","text":"in"},{"kind":"punct","text":")"}],"params":[{"name":"in","type":[{"kind":"type","text":"InputStream","ref":"java.io.InputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/InputStream.html"}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Sets the input stream to be used for the context."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets the input stream to be used for the context. If not set, then either the input stream configured for the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#engine(org.graalvm.polyglot.Engine)"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":" or standard in stream is used."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1229}},{"id":"org.graalvm.polyglot.Context$Builder#allowHostAccess(boolean)","anchor":"allowHostAccess(boolean)","kind":"method","name":"allowHostAccess","modifiers":["public"],"annotations":[[{"kind":"annotation","text":"@Deprecated","ref":"java.lang.Deprecated","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Deprecated.html"},{"kind":"punct","text":"("},{"kind":"param","text":"since"},{"kind":"punct","text":" = "},{"kind":"literal","text":"\"19.0\""},{"kind":"punct","text":")"}]],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowHostAccess"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"enabled"},{"kind":"punct","text":")"}],"params":[{"name":"enabled","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allows guest languages to access the host language by loading new classes."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows guest languages to access the host language by loading new classes. Default is "},{"kind":"code","text":"false"},{"kind":"text","text":". If "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"all access"}]},{"kind":"text","text":" is set to "},{"kind":"code","text":"true"},{"kind":"text","text":", then host access is enabled if not disallowed explicitly."}]}]},"deprecated":{"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"use "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostAccess(org.graalvm.polyglot.HostAccess)"},"code":true,"children":[{"kind":"text","text":"allowHostAccess(HostAccess)"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostClassLookup(java.util.function.Predicate)"},"code":true,"children":[{"kind":"text","text":"allowHostClassLookup(Predicate)"}]},{"kind":"text","text":" instead."}]}],"since":"19.0"},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1244}},{"id":"org.graalvm.polyglot.Context$Builder#allowHostAccess(org.graalvm.polyglot.HostAccess)","anchor":"allowHostAccess(org.graalvm.polyglot.HostAccess)","kind":"method","name":"allowHostAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowHostAccess"},{"kind":"punct","text":"("},{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"},{"kind":"punct","text":" "},{"kind":"param","text":"config"},{"kind":"punct","text":")"}],"params":[{"name":"config","type":[{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Configures which public constructors, methods or fields of public classes are accessible by guest applications."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Configures which public constructors, methods or fields of public classes are accessible by guest applications. By default if "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"allowAllAccess(boolean)"}]},{"kind":"text","text":" is "},{"kind":"code","text":"false"},{"kind":"text","text":" the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#EXPLICIT"},"code":true,"children":[{"kind":"text","text":"HostAccess.EXPLICIT"}]},{"kind":"text","text":" policy will be used, otherwise "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#ALL"},"code":true,"children":[{"kind":"text","text":"HostAccess.ALL"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Repeated calls of this method on the same "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder"},"code":true,"children":[{"kind":"text","text":"Context.Builder"}]},{"kind":"text","text":" instance override the previously set "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"HostAccess"}]},{"kind":"text","text":" configuration. Use "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#extendHostAccess(org.graalvm.polyglot.HostAccess,java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"extendHostAccess(HostAccess, Consumer)"}]},{"kind":"text","text":" for composable "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"HostAccess"}]},{"kind":"text","text":" configuration."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#EXPLICIT"},"code":true,"children":[{"kind":"text","text":"EXPLICIT - to allow explicitly annotated constructors, methods or fields."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#ALL"},"code":true,"children":[{"kind":"text","text":"ALL - to allow unrestricted access (use only for trusted guest applications)."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#NONE"},"code":true,"children":[{"kind":"text","text":"NONE - to not allow any access."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#newBuilder()"},"code":true,"children":[{"kind":"text","text":"newBuilder() - to create a custom configuration."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#extendHostAccess(org.graalvm.polyglot.HostAccess,java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"- for composable "},{"kind":"code","text":"HostAccess"},{"kind":"text","text":" configuration."}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1272}},{"id":"org.graalvm.polyglot.Context$Builder#extendHostAccess(org.graalvm.polyglot.HostAccess,java.util.function.Consumer)","anchor":"extendHostAccess(org.graalvm.polyglot.HostAccess,java.util.function.Consumer)","kind":"method","name":"extendHostAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"extendHostAccess"},{"kind":"punct","text":"("},{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"},{"kind":"punct","text":" "},{"kind":"param","text":"defaultInitialValue"},{"kind":"punct","text":", "},{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":"> "},{"kind":"param","text":"setup"},{"kind":"punct","text":")"}],"params":[{"name":"defaultInitialValue","type":[{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"- the initial value to use if no "},{"kind":"code","text":"HostAccess"},{"kind":"text","text":" is configured."}]}]},{"name":"setup","type":[{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"- Consumer that receives a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder"},"code":true,"children":[{"kind":"text","text":"HostAccess.Builder"}]},{"kind":"text","text":" preconfigured with the current "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"HostAccess"}]},{"kind":"text","text":" configuration."}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder"},"code":true,"children":[{"kind":"text","text":"Builder"}]}]}]},"doc":{"summary":[{"kind":"text","text":"Extends the existing host access configuration that determines, which public constructors, methods or fields of public classes are accessible by guest applications."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Extends the existing host access configuration that determines, which public constructors, methods or fields of public classes are accessible by guest applications."}]},{"kind":"paragraph","children":[{"kind":"text","text":"This method allows composing code that configures "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"HostAccess"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The provided "},{"kind":"code","text":"setup"},{"kind":"text","text":" is applied to a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder"},"code":true,"children":[{"kind":"text","text":"HostAccess.Builder"}]},{"kind":"text","text":" instance, which is initialized with the current "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"HostAccess"}]},{"kind":"text","text":" configuration. If no "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"HostAccess"}]},{"kind":"text","text":" configuration exists, the "},{"kind":"code","text":"defaultInitialValue"},{"kind":"text","text":" is used to initialize the builder."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Example usage"}]},{"kind":"code","text":"public static final class MyArrayWrapper {\n    private final Value v;\n\n    private MyArrayWrapper(Value v) {\n        this.v = v;\n    }\n\n    // ...\n\n    public static void addMapping(Context.Builder builder) {\n        builder.extendHostAccess(HostAccess.NONE,\n                        b -> b.targetTypeMapping(Value.class, MyArrayWrapper.class,\n                                        Value::hasArrayElements,\n                                        MyArrayWrapper::new));\n    }\n}\n\n// ...\n\npublic Context createContext() {\n    return Context.newBuilder().\n                  .allowHostAccess(HostAccess.ALL)\n                  .apply(MyArrayWrapper::addMapping)\n                    // ...\n                  .build();\n}"},{"kind":"paragraph","children":[{"kind":"text","text":"In this example the call to "},{"kind":"code","text":"extendHostAccess"},{"kind":"text","text":" in "},{"kind":"code","text":"MyArrayWrapper::addMapping"},{"kind":"text","text":" does not override the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#ALL"},"code":true,"children":[{"kind":"text","text":"HostAccess.ALL"}]},{"kind":"text","text":" configured before. Using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostAccess(org.graalvm.polyglot.HostAccess)"},"code":true,"children":[{"kind":"text","text":"allowHostAccess(HostAccess)"}]},{"kind":"text","text":" in this situation would override the previous configuration."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostAccess"},"code":true,"children":[{"kind":"text","text":"- to set or override existing "},{"kind":"code","text":"HostAccess"},{"kind":"text","text":" configuration."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#extendIO(org.graalvm.polyglot.io.IOAccess,java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"- to extend existing "},{"kind":"code","text":"IOAccess"},{"kind":"text","text":" configuration."}]}]]},"since":"25.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1332}},{"id":"org.graalvm.polyglot.Context$Builder#allowNativeAccess(boolean)","anchor":"allowNativeAccess(boolean)","kind":"method","name":"allowNativeAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowNativeAccess"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"enabled"},{"kind":"punct","text":")"}],"params":[{"name":"enabled","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allows guest languages to access the native interface."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows guest languages to access the native interface."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1345}},{"id":"org.graalvm.polyglot.Context$Builder#allowCreateThread(boolean)","anchor":"allowCreateThread(boolean)","kind":"method","name":"allowCreateThread","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowCreateThread"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"enabled"},{"kind":"punct","text":")"}],"params":[{"name":"enabled","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"If "},{"kind":"code","text":"true"},{"kind":"text","text":", allows guest languages to create new threads."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"If "},{"kind":"code","text":"true"},{"kind":"text","text":", allows guest languages to create new threads. Default is "},{"kind":"code","text":"false"},{"kind":"text","text":". If "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"all access"}]},{"kind":"text","text":" is set to "},{"kind":"code","text":"true"},{"kind":"text","text":", then the creation of threads is enabled if not allowed explicitly. Threads created by guest languages are closed, when the context is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"code":true,"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1359}},{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)","anchor":"allowAllAccess(boolean)","kind":"method","name":"allowAllAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowAllAccess"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"enabled"},{"kind":"punct","text":")"}],"params":[{"name":"enabled","type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" for all access by default."}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Sets the default value for all privileges."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets the default value for all privileges. If not explicitly specified, then all access is "},{"kind":"code","text":"false"},{"kind":"text","text":". If all access is enabled then certain privileges may still be disabled by configuring it explicitly using the builder (either before or after the call to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"allowAllAccess()"}]},{"kind":"text","text":"). Allowing all access should only be set if the guest application is fully trusted."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If "},{"kind":"code","text":"true"},{"kind":"text","text":", grants the context the same access privileges as the host virtual machine. If the host VM runs without a "},{"kind":"link","target":{"id":"java.lang.SecurityManager","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityManager.html"},"code":true,"children":[{"kind":"text","text":"security manager"}]},{"kind":"text","text":" enabled, then enabling all access gives the guest languages full control over the host process. Otherwise, Java "},{"kind":"link","target":{"id":"java.lang.SecurityManager","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityManager.html"},"code":true,"children":[{"kind":"text","text":"security manager"}]},{"kind":"text","text":" is in control of restricting the privileges of the polyglot context. If new privilege restrictions are added to the polyglot API, then they will default to full access."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Grants full access to the following privileges by default:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowCreateThread(boolean)"},"code":true,"children":[{"kind":"text","text":"creation"}]},{"kind":"text","text":" and use of new threads."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The access to public "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostAccess(org.graalvm.polyglot.HostAccess)"},"code":true,"children":[{"kind":"text","text":"host classes"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The loading of new "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostClassLoading(boolean)"},"code":true,"children":[{"kind":"text","text":"host classes"}]},{"kind":"text","text":" by adding entries to the class path."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Exporting new members into the polyglot "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#getPolyglotBindings()"},"code":true,"children":[{"kind":"text","text":"bindings"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Unrestricted "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowIO(org.graalvm.polyglot.io.IOAccess)"},"code":true,"children":[{"kind":"text","text":"IO operations"}]},{"kind":"text","text":" on host system."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Passing "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowExperimentalOptions(boolean)"},"code":true,"children":[{"kind":"text","text":"experimental options"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowCreateProcess(boolean)"},"code":true,"children":[{"kind":"text","text":"creation"}]},{"kind":"text","text":" and use of new sub-processes."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowEnvironmentAccess(org.graalvm.polyglot.EnvironmentAccess)"},"code":true,"children":[{"kind":"text","text":"access"}]},{"kind":"text","text":" to process environment variables."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowInnerContextOptions(boolean)"},"code":true,"children":[{"kind":"text","text":"changing"}]},{"kind":"text","text":" of options for of inner contexts spawned by the language."}]}]]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1398}},{"id":"org.graalvm.polyglot.Context$Builder#allowHostClassLoading(boolean)","anchor":"allowHostClassLoading(boolean)","kind":"method","name":"allowHostClassLoading","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowHostClassLoading"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"enabled"},{"kind":"punct","text":")"}],"params":[{"name":"enabled","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"If host class loading is enabled, then the guest language is allowed to load new host classes via jar or class files."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"If host class loading is enabled, then the guest language is allowed to load new host classes via jar or class files. If "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"all access"}]},{"kind":"text","text":" is set to "},{"kind":"code","text":"true"},{"kind":"text","text":", then the host class loading is enabled if it is not disallowed explicitly. For host class loading to be useful, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowIO(org.graalvm.polyglot.io.IOAccess)"},"code":true,"children":[{"kind":"text","text":"IO"}]},{"kind":"text","text":" operations "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostClassLookup(java.util.function.Predicate)"},"code":true,"children":[{"kind":"text","text":"host class lookup"}]},{"kind":"text","text":", and the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostAccess(org.graalvm.polyglot.HostAccess)"},"code":true,"children":[{"kind":"text","text":"host access policy"}]},{"kind":"text","text":" needs to be configured as well."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostAccess(org.graalvm.polyglot.HostAccess)"},"code":true,"children":[{"kind":"text","text":"allowHostAccess(HostAccess)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostClassLookup(java.util.function.Predicate)"},"code":true,"children":[{"kind":"text","text":"allowHostClassLookup(Predicate)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1416}},{"id":"org.graalvm.polyglot.Context$Builder#allowHostClassLookup(java.util.function.Predicate)","anchor":"allowHostClassLookup(java.util.function.Predicate)","kind":"method","name":"allowHostClassLookup","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowHostClassLookup"},{"kind":"punct","text":"("},{"kind":"type","text":"Predicate","ref":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"classFilter"},{"kind":"punct","text":")"}],"params":[{"name":"classFilter","type":[{"kind":"type","text":"Predicate","ref":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a predicate that returns "},{"kind":"code","text":"true"},{"kind":"text","text":" or "},{"kind":"code","text":"false"},{"kind":"text","text":" for a qualified Java class name or "},{"kind":"code","text":"null"},{"kind":"text","text":" to disable host class lookup."}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Sets a filter that specifies the Java host classes that can be looked up by the guest application."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets a filter that specifies the Java host classes that can be looked up by the guest application. If set to "},{"kind":"code","text":"null"},{"kind":"text","text":" then no class lookup is allowed and relevant language builtins are not available (e.g. "},{"kind":"code","text":"Java.type"},{"kind":"text","text":" in JavaScript). If the "},{"kind":"code","text":"classFilter"},{"kind":"text","text":" parameter is set to a filter predicate, then language builtins are available and classes can be looked up if the filter predicate returns "},{"kind":"code","text":"true"},{"kind":"text","text":" for the fully qualified class name. If the filter returns "},{"kind":"code","text":"false"},{"kind":"text","text":", then the class cannot be looked up and as a result throws a guest language error when accessed. By default and if "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"all access"}]},{"kind":"text","text":" is "},{"kind":"code","text":"false"},{"kind":"text","text":", host class lookup is disabled. By default and if "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"all access"}]},{"kind":"text","text":" is "},{"kind":"code","text":"true"},{"kind":"text","text":", then all classes may be looked up by the guest application."}]},{"kind":"paragraph","children":[{"kind":"text","text":"In order to access class members looked up by the guest application a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostAccess(org.graalvm.polyglot.HostAccess)"},"code":true,"children":[{"kind":"text","text":"host access policy"}]},{"kind":"text","text":" needs to be set or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"all access"}]},{"kind":"text","text":" needs to be set to "},{"kind":"code","text":"true"},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"To load new classes the context uses the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#hostClassLoader(java.lang.ClassLoader)"},"code":true,"children":[{"kind":"text","text":"hostClassLoader"}]},{"kind":"text","text":" if specified or the "},{"kind":"link","target":{"id":"java.lang.Thread#getContextClassLoader()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Thread.html#getContextClassLoader()"},"code":true,"children":[{"kind":"text","text":"context class loader"}]},{"kind":"text","text":" that will be captured when the context is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#build()"},"code":true,"children":[{"kind":"text","text":"built"}]},{"kind":"text","text":". If an explicit "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#engine(org.graalvm.polyglot.Engine)"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":" was specified, then the context class loader at engine "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#build()"},"code":true,"children":[{"kind":"text","text":"build-time"}]},{"kind":"text","text":" will be used instead. When the Java module system is available (>= JDK 9) then only classes are accessible that are exported to the unnamed module of the captured class loader."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Example usage with JavaScript:"}]},{"kind":"code","text":"public class MyClass {\n    @HostAccess.Export\n    public int accessibleMethod() {\n        return 42;\n    }\n\n    public static void main(String[] args) {\n        try (Context context = Context.newBuilder() //\n                        .allowHostClassLookup(c -> c.equals(\"myPackage.MyClass\")) //\n                        .build()) {\n            int result = context.eval(\"js\", \"\" +\n                            \"var MyClass = Java.type('myPackage.MyClass');\" +\n                            \"new MyClass().accessibleMethod()\").asInt();\n            assert result == 42;\n        }\n    }\n}"},{"kind":"heading","level":4,"children":[{"kind":"text","text":"In this example:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"text","text":"We create a new context with the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostClassLookup(java.util.function.Predicate)"},"code":true,"children":[{"kind":"text","text":"permission"}]},{"kind":"text","text":" to look up the class "},{"kind":"code","text":"myPackage.MyClass"},{"kind":"text","text":" in the guest language application."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"We evaluate a JavaScript code snippet that accesses the Java class "},{"kind":"code","text":"myPackage.MyClass"},{"kind":"text","text":" using the "},{"kind":"code","text":"Java.type"},{"kind":"text","text":" builtin provided by the JavaScript language implementation. Other classes can only be looked up if the provided class filter returns "},{"kind":"code","text":"true"},{"kind":"text","text":" for their name."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"We create a new instance of the Java class "},{"kind":"code","text":"MyClass"},{"kind":"text","text":" by using the JavaScript "},{"kind":"code","text":"new"},{"kind":"text","text":" keyword."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"We call the method "},{"kind":"code","text":"accessibleMethod"},{"kind":"text","text":" which returns "},{"kind":"code","text":"42"},{"kind":"text","text":". The method is accessible to the guest language because because the enclosing class and the declared method are public, as well as annotated with the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Export"},"code":true,"children":[{"kind":"text","text":"@HostAccess.Export"}]},{"kind":"text","text":" annotation. Which Java members of classes are accessible can be configured using the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostAccess(org.graalvm.polyglot.HostAccess)"},"code":true,"children":[{"kind":"text","text":"host access policy"}]},{"kind":"text","text":"."}]}]]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostClassLoading(boolean)"},"code":true,"children":[{"kind":"text","text":"allowHostClassLoading - to allow loading of classes."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostAccess(org.graalvm.polyglot.HostAccess)"},"code":true,"children":[{"kind":"text","text":"allowHostAccess - to configure the access policy of host values for guest languages."}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1495}},{"id":"org.graalvm.polyglot.Context$Builder#allowExperimentalOptions(boolean)","anchor":"allowExperimentalOptions(boolean)","kind":"method","name":"allowExperimentalOptions","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowExperimentalOptions"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"enabled"},{"kind":"punct","text":")"}],"params":[{"name":"enabled","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allow experimental options to be used for language options."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allow experimental options to be used for language options. Do not use experimental options in production environments. If set to "},{"kind":"code","text":"false"},{"kind":"text","text":" (the default), then passing an experimental option results in an "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" when the context is built."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Alternatively "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#allowExperimentalOptions(boolean)"},"code":true,"children":[{"kind":"text","text":"Engine.Builder.allowExperimentalOptions(boolean)"}]},{"kind":"text","text":" may be used when constructing the context using an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#engine(org.graalvm.polyglot.Engine)"},"code":true,"children":[{"kind":"text","text":"explicit engine"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1511}},{"id":"org.graalvm.polyglot.Context$Builder#allowPolyglotAccess(org.graalvm.polyglot.PolyglotAccess)","anchor":"allowPolyglotAccess(org.graalvm.polyglot.PolyglotAccess)","kind":"method","name":"allowPolyglotAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowPolyglotAccess"},{"kind":"punct","text":"("},{"kind":"type","text":"PolyglotAccess","ref":"org.graalvm.polyglot.PolyglotAccess"},{"kind":"punct","text":" "},{"kind":"param","text":"accessPolicy"},{"kind":"punct","text":")"}],"params":[{"name":"accessPolicy","type":[{"kind":"type","text":"PolyglotAccess","ref":"org.graalvm.polyglot.PolyglotAccess"}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allow polyglot access using the provided policy."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allow polyglot access using the provided policy. If "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"all access"}]},{"kind":"text","text":" is "},{"kind":"code","text":"true"},{"kind":"text","text":" then the default polyglot access policy is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess#ALL"},"code":true,"children":[{"kind":"text","text":"PolyglotAccess.ALL"}]},{"kind":"text","text":", otherwise "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess#NONE"},"code":true,"children":[{"kind":"text","text":"PolyglotAccess.NONE"}]},{"kind":"text","text":". The provided access policy must not be "},{"kind":"code","text":"null"},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1524}},{"id":"org.graalvm.polyglot.Context$Builder#allowValueSharing(boolean)","anchor":"allowValueSharing(boolean)","kind":"method","name":"allowValueSharing","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowValueSharing"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"enabled"},{"kind":"punct","text":")"}],"params":[{"name":"enabled","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Enables or disables sharing of any "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"value"}]},{"kind":"text","text":" between contexts."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Enables or disables sharing of any "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"value"}]},{"kind":"text","text":" between contexts. Value sharing is enabled by default and is not affected by "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"allowAllAccess(boolean)"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If this option is set to "},{"kind":"code","text":"true"},{"kind":"text","text":" (default) then any value that is associated with one context will be automatically migrated when passed to another context. Primitive, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isHostObject()"},"code":true,"children":[{"kind":"text","text":"host"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isHostObject()"},"code":true,"children":[{"kind":"text","text":"proxy"}]},{"kind":"text","text":" values can be migrated without limitation. When guest language values are migrated, they capture and remember their original context. Guest language objects need to be accessed when their respective context is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#enter()"},"code":true,"children":[{"kind":"text","text":"entered"}]},{"kind":"text","text":", therefore before any access their original context is entered and subsequently left. Entering the original context may fail, for example when the context of a original context value only allows single threaded access to values or if it was "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"code":true,"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":" in the mean time."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If this option is set to "},{"kind":"code","text":"false"},{"kind":"text","text":" then any value passed from one context to another will fail with an error indicating that sharing is disallowed. Turning sharing off can be useful when strict safety is required and it would be considered an error if a value of one context is passed to another."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Values of a guest language that are passed from one context to another are restricted to using the interoperability protocol only. In practice this often leads to slight changes and incompatibilities in behavior. For example, the prototype of a JavaScript object passed from one context to another is not writable, as the interoperability protocol does not allow such an operation (yet). A typical use-case is passing big immutable data structures that are infrequently accessed from one context to another, without copying them. In practice, passing values from one context to another should be avoided if possible, as their access is slower and their language compatibility reduced. This feature was introduced in 21.3. Older versions fail when guest values are passed from one context to another."}]}]},"since":"21.3","source":{"path":"org/graalvm/polyglot/Context.java","line":1563}},{"id":"org.graalvm.polyglot.Context$Builder#allowInnerContextOptions(boolean)","anchor":"allowInnerContextOptions(boolean)","kind":"method","name":"allowInnerContextOptions","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowInnerContextOptions"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"enabled"},{"kind":"punct","text":")"}],"params":[{"name":"enabled","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allows this context to spawn inner contexts that may change option values set for the outer context."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows this context to spawn inner contexts that may change option values set for the outer context. If this privilege is set to "},{"kind":"code","text":"false"},{"kind":"text","text":" then inner contexts are only allowed to use the same option values as its outer context. If this privilege is set to "},{"kind":"code","text":"true"},{"kind":"text","text":" then the context may modify option values for inner contexts it creates. This privilege should not be enabled for security sensitive use-cases. The default value for this privilege is inherited from "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"allowAllAccess(boolean)"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Inner contexts are spawned by language implementations to implement language embeddings of their own. For example, some languages provide dedicated APIs to spawn language virtual machines. Such APIs are often implemented using the inner context mechanism."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"allowAllAccess(boolean)"}]}]]},"since":"22.3","source":{"path":"org/graalvm/polyglot/Context.java","line":1583}},{"id":"org.graalvm.polyglot.Context$Builder#hostClassFilter(java.util.function.Predicate)","anchor":"hostClassFilter(java.util.function.Predicate)","kind":"method","name":"hostClassFilter","modifiers":["public"],"annotations":[[{"kind":"annotation","text":"@Deprecated","ref":"java.lang.Deprecated","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Deprecated.html"},{"kind":"punct","text":"("},{"kind":"param","text":"since"},{"kind":"punct","text":" = "},{"kind":"literal","text":"\"19.0\""},{"kind":"punct","text":")"}]],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"hostClassFilter"},{"kind":"punct","text":"("},{"kind":"type","text":"Predicate","ref":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"classFilter"},{"kind":"punct","text":")"}],"params":[{"name":"classFilter","type":[{"kind":"type","text":"Predicate","ref":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a predicate that returns "},{"kind":"code","text":"true"},{"kind":"text","text":" or "},{"kind":"code","text":"false"},{"kind":"text","text":" for a java qualified class name."}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Sets a class filter that allows to limit the classes that are allowed to be loaded by guest languages."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets a class filter that allows to limit the classes that are allowed to be loaded by guest languages. If the filter returns "},{"kind":"code","text":"true"},{"kind":"text","text":", then the class is accessible, otherwise it is not accessible and throws a guest language error when accessed. In order to have an effect, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostAccess(org.graalvm.polyglot.HostAccess)"},"code":true,"children":[{"kind":"text","text":"allowHostAccess(org.graalvm.polyglot.HostAccess)"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"allowAllAccess(boolean)"}]},{"kind":"text","text":" needs to be set to "},{"kind":"code","text":"true"},{"kind":"text","text":"."}]}]},"deprecated":{"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"use "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostClassLookup(java.util.function.Predicate)"},"code":true,"children":[{"kind":"text","text":"allowHostClassLookup(Predicate)"}]},{"kind":"text","text":" instead."}]}],"since":"19.0"},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1600}},{"id":"org.graalvm.polyglot.Context$Builder#option(java.lang.String,java.lang.String)","anchor":"option(java.lang.String,java.lang.String)","kind":"method","name":"option","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"option"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"key"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":")"}],"params":[{"name":"key","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},{"name":"value","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Sets an option for this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"context"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets an option for this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"context"}]},{"kind":"text","text":". By default, any options for the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#getOptions()"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getOptions()"},"code":true,"children":[{"kind":"text","text":"language"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Instrument#getOptions()"},"code":true,"children":[{"kind":"text","text":"instrument"}]},{"kind":"text","text":" can be set for a context. If an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#engine(org.graalvm.polyglot.Engine)"},"code":true,"children":[{"kind":"text","text":"explicit engine"}]},{"kind":"text","text":" is set for the context, then only language options can be set. Instrument and engine options can be set exclusively on the explicit engine instance. If a language option is set for the context and the engine, then the option of the context is going to take precedence."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If one of the set option keys or values is invalid, then an "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" is thrown when the context is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#build()"},"code":true,"children":[{"kind":"text","text":"built"}]},{"kind":"text","text":". The given key and value must not be "},{"kind":"code","text":"null"},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"To specify an option for the engine."}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1623}},{"id":"org.graalvm.polyglot.Context$Builder#options(java.util.Map)","anchor":"options(java.util.Map)","kind":"method","name":"options","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"options"},{"kind":"punct","text":"("},{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"options"},{"kind":"punct","text":")"}],"params":[{"name":"options","type":[{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a map options."}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Shortcut for setting multiple "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"options"}]},{"kind":"text","text":" using a map."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Shortcut for setting multiple "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"options"}]},{"kind":"text","text":" using a map. All values of the provided map must be non-null."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"To set a single option."}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1641}},{"id":"org.graalvm.polyglot.Context$Builder#arguments(java.lang.String,java.lang.String[])","anchor":"arguments(java.lang.String,java.lang.String[])","kind":"method","name":"arguments","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"arguments"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"language"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"[] "},{"kind":"param","text":"args"},{"kind":"punct","text":")"}],"params":[{"name":"language","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the language id of the primary language."}]}]},{"name":"args","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"[]"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"an array of arguments passed to the guest language program."}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"throws":[{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if an invalid language id was specified."}]}]}],"doc":{"summary":[{"kind":"text","text":"Sets the guest language application arguments for a language "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"context"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets the guest language application arguments for a language "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"context"}]},{"kind":"text","text":". Application arguments are typically made available to guest language implementations. It depends on the language if and how they are accessible within the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#eval(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"evaluated"}]},{"kind":"text","text":" guest language scripts. Passing no arguments to a language is equivalent to providing an empty arguments array."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1660}},{"id":"org.graalvm.polyglot.Context$Builder#allowIO(org.graalvm.polyglot.io.IOAccess)","anchor":"allowIO(org.graalvm.polyglot.io.IOAccess)","kind":"method","name":"allowIO","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowIO"},{"kind":"punct","text":"("},{"kind":"type","text":"IOAccess","ref":"org.graalvm.polyglot.io.IOAccess"},{"kind":"punct","text":" "},{"kind":"param","text":"ioAccess"},{"kind":"punct","text":")"}],"params":[{"name":"ioAccess","type":[{"kind":"type","text":"IOAccess","ref":"org.graalvm.polyglot.io.IOAccess"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the IO configuration"}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder"},"code":true,"children":[{"kind":"text","text":"Builder"}]}]}]},"doc":{"summary":[{"kind":"text","text":"Configures guest language access to host IO."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Configures guest language access to host IO. Default is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess#NONE"},"code":true,"children":[{"kind":"text","text":"IOAccess.NONE"}]},{"kind":"text","text":". If "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"all access"}]},{"kind":"text","text":" is set to "},{"kind":"code","text":"true"},{"kind":"text","text":", then "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess#ALL"},"code":true,"children":[{"kind":"text","text":"IOAccess.ALL"}]},{"kind":"text","text":" is used unless explicitly set. This method can be used to virtualize file system access in the guest language by using an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess"},"code":true,"children":[{"kind":"text","text":"IOAccess"}]},{"kind":"text","text":" with a custom filesystem."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Repeated calls of this method on the same "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder"},"code":true,"children":[{"kind":"text","text":"Context.Builder"}]},{"kind":"text","text":" instance override the previously set "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess"},"code":true,"children":[{"kind":"text","text":"IOAccess"}]},{"kind":"text","text":" configuration. Use "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#extendIO(org.graalvm.polyglot.io.IOAccess,java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"extendIO(IOAccess, Consumer)"}]},{"kind":"text","text":" for composable "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess"},"code":true,"children":[{"kind":"text","text":"IOAccess"}]},{"kind":"text","text":" configuration."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess#ALL"},"code":true,"children":[{"kind":"text","text":"- to allow full host IO access."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess#NONE"},"code":true,"children":[{"kind":"text","text":"- to disable host IO access."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess#newBuilder()"},"code":true,"children":[{"kind":"text","text":"- to create a custom configuration."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#extendIO(org.graalvm.polyglot.io.IOAccess,java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"- for composable IOAccess configuration."}]}]]},"since":"23.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1697}},{"id":"org.graalvm.polyglot.Context$Builder#extendIO(org.graalvm.polyglot.io.IOAccess,java.util.function.Consumer)","anchor":"extendIO(org.graalvm.polyglot.io.IOAccess,java.util.function.Consumer)","kind":"method","name":"extendIO","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"extendIO"},{"kind":"punct","text":"("},{"kind":"type","text":"IOAccess","ref":"org.graalvm.polyglot.io.IOAccess"},{"kind":"punct","text":" "},{"kind":"param","text":"defaultInitialValue"},{"kind":"punct","text":", "},{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"IOAccess.Builder","ref":"org.graalvm.polyglot.io.IOAccess$Builder"},{"kind":"punct","text":"> "},{"kind":"param","text":"setup"},{"kind":"punct","text":")"}],"params":[{"name":"defaultInitialValue","type":[{"kind":"type","text":"IOAccess","ref":"org.graalvm.polyglot.io.IOAccess"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"- the initial value to use if no "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess"},"code":true,"children":[{"kind":"text","text":"IOAccess"}]},{"kind":"text","text":" is configured."}]}]},{"name":"setup","type":[{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"IOAccess.Builder","ref":"org.graalvm.polyglot.io.IOAccess$Builder"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"- Consumer that receives a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess$Builder"},"code":true,"children":[{"kind":"text","text":"IOAccess.Builder"}]},{"kind":"text","text":" preconfigured with the current "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess"},"code":true,"children":[{"kind":"text","text":"IOAccess"}]},{"kind":"text","text":" configuration."}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder"},"code":true,"children":[{"kind":"text","text":"Builder"}]}]}]},"doc":{"summary":[{"kind":"text","text":"Extends the existing guest language access to host IO configuration."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Extends the existing guest language access to host IO configuration. This method allows composing code that configures "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess"},"code":true,"children":[{"kind":"text","text":"IOAccess"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The provided "},{"kind":"code","text":"setup"},{"kind":"text","text":" is applied to a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess$Builder"},"code":true,"children":[{"kind":"text","text":"IOAccess.Builder"}]},{"kind":"text","text":" instance, which is initialized with the current "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess"},"code":true,"children":[{"kind":"text","text":"IOAccess"}]},{"kind":"text","text":" configuration. If no "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess"},"code":true,"children":[{"kind":"text","text":"IOAccess"}]},{"kind":"text","text":" configuration exists, the "},{"kind":"code","text":"defaultInitialValue"},{"kind":"text","text":" is used to initialize the builder."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Example usage"}]},{"kind":"code","text":"private void addFileSystem(IOAccess.Builder builder) {\n    builder.fileSystem(new MyCustomFileSystem());\n}\n\npublic Context createContext() {\n    return Context.newBuilder().extendIOAccess(IOAccess.NONE, this::addFileSystem)\n                    // ...\n                    .extendIOAccess(IOAccess.NONE, b -> b.allowHostSocketAccess(true))\n                    // ...\n                    .build();\n}"},{"kind":"paragraph","children":[{"kind":"text","text":"In this example the call to "},{"kind":"code","text":"extendIOAccess"},{"kind":"text","text":" does not override the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" configured in "},{"kind":"code","text":"addFileSystem"},{"kind":"text","text":". Using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowIO(org.graalvm.polyglot.io.IOAccess)"},"code":true,"children":[{"kind":"text","text":"allowIO(IOAccess)"}]},{"kind":"text","text":" in this situation would override the configured "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowIO(org.graalvm.polyglot.io.IOAccess)"},"code":true,"children":[{"kind":"text","text":"- to set or override existing "},{"kind":"code","text":"IOAccess"},{"kind":"text","text":"."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#extendHostAccess(org.graalvm.polyglot.HostAccess,java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"- to extend existing "},{"kind":"code","text":"HostAccess"},{"kind":"text","text":" configuration."}]}]]},"since":"25.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1740}},{"id":"org.graalvm.polyglot.Context$Builder#allowIO(boolean)","anchor":"allowIO(boolean)","kind":"method","name":"allowIO","modifiers":["public"],"annotations":[[{"kind":"annotation","text":"@Deprecated","ref":"java.lang.Deprecated","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Deprecated.html"},{"kind":"punct","text":"("},{"kind":"param","text":"since"},{"kind":"punct","text":" = "},{"kind":"literal","text":"\"23.0\""},{"kind":"punct","text":")"}]],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowIO"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"enabled"},{"kind":"punct","text":")"}],"params":[{"name":"enabled","type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" to enable Input/Output"}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder"},"code":true,"children":[{"kind":"text","text":"Builder"}]}]}]},"doc":{"summary":[{"kind":"text","text":"If "},{"kind":"code","text":"true"},{"kind":"text","text":", allows guest language to perform unrestricted IO operations on host system."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"If "},{"kind":"code","text":"true"},{"kind":"text","text":", allows guest language to perform unrestricted IO operations on host system. Default is "},{"kind":"code","text":"false"},{"kind":"text","text":". If "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"all access"}]},{"kind":"text","text":" is set to "},{"kind":"code","text":"true"},{"kind":"text","text":", then IO is enabled if not allowed explicitly."}]}]},"deprecated":{"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"If the value was previously "},{"kind":"code","text":"true"},{"kind":"text","text":" pass "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess#ALL"},"code":true,"children":[{"kind":"text","text":"IOAccess.ALL"}]},{"kind":"text","text":", otherwise pass "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess#NONE"},"code":true,"children":[{"kind":"text","text":"IOAccess.NONE"}]},{"kind":"text","text":"."}]}],"since":"23.0"},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1759}},{"id":"org.graalvm.polyglot.Context$Builder#fileSystem(org.graalvm.polyglot.io.FileSystem)","anchor":"fileSystem(org.graalvm.polyglot.io.FileSystem)","kind":"method","name":"fileSystem","modifiers":["public"],"annotations":[[{"kind":"annotation","text":"@Deprecated","ref":"java.lang.Deprecated","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Deprecated.html"},{"kind":"punct","text":"("},{"kind":"param","text":"since"},{"kind":"punct","text":" = "},{"kind":"literal","text":"\"23.0\""},{"kind":"punct","text":")"}]],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"fileSystem"},{"kind":"punct","text":"("},{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"},{"kind":"punct","text":" "},{"kind":"param","text":"fileSystem"},{"kind":"punct","text":")"}],"params":[{"name":"fileSystem","type":[{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the file system to be installed"}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder"},"code":true,"children":[{"kind":"text","text":"Builder"}]}]}]},"doc":{"summary":[{"kind":"text","text":"Installs a new "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Installs a new "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":"."}]}]},"deprecated":{"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"If a file system was previously set use "},{"kind":"code","text":"allowIO(IOAccess.newBuilder().fileSystem(fileSystem).build())"},{"kind":"text","text":"."}]}],"since":"23.0"},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1774}},{"id":"org.graalvm.polyglot.Context$Builder#serverTransport(org.graalvm.polyglot.io.MessageTransport)","anchor":"serverTransport(org.graalvm.polyglot.io.MessageTransport)","kind":"method","name":"serverTransport","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"serverTransport"},{"kind":"punct","text":"("},{"kind":"type","text":"MessageTransport","ref":"org.graalvm.polyglot.io.MessageTransport"},{"kind":"punct","text":" "},{"kind":"param","text":"serverTransport"},{"kind":"punct","text":")"}],"params":[{"name":"serverTransport","type":[{"kind":"type","text":"MessageTransport","ref":"org.graalvm.polyglot.io.MessageTransport"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"an implementation of message transport interceptor"}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Take over the transport of messages communication with a server peer."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Take over the transport of messages communication with a server peer. Provide an implementation of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.MessageTransport"},"code":true,"children":[{"kind":"text","text":"MessageTransport"}]},{"kind":"text","text":" to virtualize a transport of messages to a server endpoint. "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.MessageTransport#open(java.net.URI,org.graalvm.polyglot.io.MessageEndpoint)"},"code":true,"children":[{"kind":"text","text":"MessageTransport.open(java.net.URI, org.graalvm.polyglot.io.MessageEndpoint)"}]},{"kind":"text","text":" corresponds to accept of a server socket."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.io.MessageTransport"},"code":true,"children":[{"kind":"text","text":"MessageTransport"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1792}},{"id":"org.graalvm.polyglot.Context$Builder#logHandler(java.util.logging.Handler)","anchor":"logHandler(java.util.logging.Handler)","kind":"method","name":"logHandler","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"logHandler"},{"kind":"punct","text":"("},{"kind":"type","text":"Handler","ref":"java.util.logging.Handler","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Handler.html"},{"kind":"punct","text":" "},{"kind":"param","text":"logHandler"},{"kind":"punct","text":")"}],"params":[{"name":"logHandler","type":[{"kind":"type","text":"Handler","ref":"java.util.logging.Handler","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Handler.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"java.util.logging.Handler","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Handler.html"},"code":true,"children":[{"kind":"text","text":"Handler"}]},{"kind":"text","text":" to use for logging in built "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]},{"kind":"text","text":". The passed "},{"kind":"code","text":"logHandler"},{"kind":"text","text":" is closed when the context is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"code":true,"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":"."}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder"},"code":true,"children":[{"kind":"text","text":"Builder"}]}]}]},"doc":{"summary":[{"kind":"text","text":"Installs a new logging "},{"kind":"link","target":{"id":"java.util.logging.Handler","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Handler.html"},"code":true,"children":[{"kind":"text","text":"Handler"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Installs a new logging "},{"kind":"link","target":{"id":"java.util.logging.Handler","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Handler.html"},"code":true,"children":[{"kind":"text","text":"Handler"}]},{"kind":"text","text":". The logger's "},{"kind":"link","target":{"id":"java.util.logging.Level","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html"},"code":true,"children":[{"kind":"text","text":"Level"}]},{"kind":"text","text":" configuration is done using the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#options(java.util.Map)"},"code":true,"children":[{"kind":"text","text":"Context's options"}]},{"kind":"text","text":". The level option key has the following format: "},{"kind":"code","text":"log.languageId.loggerName.level"},{"kind":"text","text":" or "},{"kind":"code","text":"log.instrumentId.loggerName.level"},{"kind":"text","text":". The value is either the name of a pre-defined "},{"kind":"link","target":{"id":"java.util.logging.Level","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html"},"code":true,"children":[{"kind":"text","text":"Level"}]},{"kind":"text","text":" constant or a numeric "},{"kind":"link","target":{"id":"java.util.logging.Level","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html"},"code":true,"children":[{"kind":"text","text":"Level"}]},{"kind":"text","text":" value. If not explicitly set in options, the level is inherited from the parent logger."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Examples"}]},{"kind":"text","text":" of setting log level options:"},{"kind":"break"},{"kind":"text","text":" "},{"kind":"code","text":"builder.option(\"log.level\",\"FINE\");"},{"kind":"text","text":" sets the "},{"kind":"link","target":{"id":"java.util.logging.Level#FINE","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html#FINE"},"code":true,"children":[{"kind":"text","text":"FINE level"}]},{"kind":"text","text":" to all "},{"kind":"code","text":"TruffleLogger"},{"kind":"text","text":"s."},{"kind":"break"},{"kind":"text","text":" "},{"kind":"code","text":"builder.option(\"log.js.level\",\"FINE\");"},{"kind":"text","text":" sets the "},{"kind":"link","target":{"id":"java.util.logging.Level#FINE","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html#FINE"},"code":true,"children":[{"kind":"text","text":"FINE level"}]},{"kind":"text","text":" to JavaScript "},{"kind":"code","text":"TruffleLogger"},{"kind":"text","text":"s."},{"kind":"break"},{"kind":"text","text":" "},{"kind":"code","text":"builder.option(\"log.js.com.oracle.truffle.js.parser.JavaScriptLanguage.level\",\"FINE\");"},{"kind":"text","text":" sets the "},{"kind":"link","target":{"id":"java.util.logging.Level#FINE","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html#FINE"},"code":true,"children":[{"kind":"text","text":"FINE level"}]},{"kind":"text","text":" to "},{"kind":"code","text":"TruffleLogger"},{"kind":"text","text":" for the "},{"kind":"code","text":"JavaScriptLanguage"},{"kind":"text","text":" class."},{"kind":"break"}]},{"kind":"paragraph","children":[{"kind":"text","text":"If the "},{"kind":"code","text":"logHandler"},{"kind":"text","text":" is not set on "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine"},"code":true,"children":[{"kind":"text","text":"Engine"}]},{"kind":"text","text":" nor on "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]},{"kind":"text","text":", the log messages are printed to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#err(java.io.OutputStream)"},"code":true,"children":[{"kind":"text","text":"Context's error output stream"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1824}},{"id":"org.graalvm.polyglot.Context$Builder#timeZone(java.time.ZoneId)","anchor":"timeZone(java.time.ZoneId)","kind":"method","name":"timeZone","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"timeZone"},{"kind":"punct","text":"("},{"kind":"type","text":"ZoneId","ref":"java.time.ZoneId","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/ZoneId.html"},{"kind":"punct","text":" "},{"kind":"param","text":"zone"},{"kind":"punct","text":")"}],"params":[{"name":"zone","type":[{"kind":"type","text":"ZoneId","ref":"java.time.ZoneId","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/ZoneId.html"}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder"},"code":true,"children":[{"kind":"text","text":"Builder"}]}]}]},"doc":{"summary":[{"kind":"text","text":"Sets the default time zone to be used for this context."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets the default time zone to be used for this context. If not set, or explicitly set to "},{"kind":"code","text":"null"},{"kind":"text","text":", then UTC is used with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#CONSTRAINED"},"code":true,"children":[{"kind":"text","text":"SandboxPolicy.CONSTRAINED"}]},{"kind":"text","text":" or stricter sandbox policies, and the "},{"kind":"link","target":{"id":"java.time.ZoneId#systemDefault()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/ZoneId.html#systemDefault()"},"code":true,"children":[{"kind":"text","text":"system default"}]},{"kind":"text","text":" zone is used otherwise."}]}],"see":[[{"kind":"link","target":{"id":"java.time.ZoneId#systemDefault()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/ZoneId.html#systemDefault()"},"code":true,"children":[{"kind":"text","text":"ZoneId.systemDefault()"}]}]]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1840}},{"id":"org.graalvm.polyglot.Context$Builder#logHandler(java.io.OutputStream)","anchor":"logHandler(java.io.OutputStream)","kind":"method","name":"logHandler","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"logHandler"},{"kind":"punct","text":"("},{"kind":"type","text":"OutputStream","ref":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"},{"kind":"punct","text":" "},{"kind":"param","text":"logOut"},{"kind":"punct","text":")"}],"params":[{"name":"logOut","type":[{"kind":"type","text":"OutputStream","ref":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"},"code":true,"children":[{"kind":"text","text":"OutputStream"}]},{"kind":"text","text":" to use for logging in built "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]},{"kind":"text","text":". The passed "},{"kind":"code","text":"logOut"},{"kind":"text","text":" stream is closed when the context is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"code":true,"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":"."}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder"},"code":true,"children":[{"kind":"text","text":"Builder"}]}]}]},"doc":{"summary":[{"kind":"text","text":"Installs a new logging "},{"kind":"link","target":{"id":"java.util.logging.Handler","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Handler.html"},"code":true,"children":[{"kind":"text","text":"Handler"}]},{"kind":"text","text":" using given "},{"kind":"link","target":{"id":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"},"code":true,"children":[{"kind":"text","text":"OutputStream"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Installs a new logging "},{"kind":"link","target":{"id":"java.util.logging.Handler","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Handler.html"},"code":true,"children":[{"kind":"text","text":"Handler"}]},{"kind":"text","text":" using given "},{"kind":"link","target":{"id":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"},"code":true,"children":[{"kind":"text","text":"OutputStream"}]},{"kind":"text","text":". The logger's "},{"kind":"link","target":{"id":"java.util.logging.Level","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html"},"code":true,"children":[{"kind":"text","text":"Level"}]},{"kind":"text","text":" configuration is done using the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#options(java.util.Map)"},"code":true,"children":[{"kind":"text","text":"Context's options"}]},{"kind":"text","text":". The level option key has the following format: "},{"kind":"code","text":"log.languageId.loggerName.level"},{"kind":"text","text":" or "},{"kind":"code","text":"log.instrumentId.loggerName.level"},{"kind":"text","text":". The value is either the name of pre-defined "},{"kind":"link","target":{"id":"java.util.logging.Level","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html"},"code":true,"children":[{"kind":"text","text":"Level"}]},{"kind":"text","text":" constant or a numeric "},{"kind":"link","target":{"id":"java.util.logging.Level","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html"},"code":true,"children":[{"kind":"text","text":"Level"}]},{"kind":"text","text":" value. If not explicitly set in options the level is inherited from the parent logger."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Examples"}]},{"kind":"text","text":" of setting log level options:"},{"kind":"break"},{"kind":"text","text":" "},{"kind":"code","text":"builder.option(\"log.level\",\"FINE\");"},{"kind":"text","text":" sets the "},{"kind":"link","target":{"id":"java.util.logging.Level#FINE","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html#FINE"},"code":true,"children":[{"kind":"text","text":"FINE level"}]},{"kind":"text","text":" to all "},{"kind":"code","text":"TruffleLogger"},{"kind":"text","text":"s."},{"kind":"break"},{"kind":"text","text":" "},{"kind":"code","text":"builder.option(\"log.js.level\",\"FINE\");"},{"kind":"text","text":" sets the "},{"kind":"link","target":{"id":"java.util.logging.Level#FINE","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html#FINE"},"code":true,"children":[{"kind":"text","text":"FINE level"}]},{"kind":"text","text":" to JavaScript "},{"kind":"code","text":"TruffleLogger"},{"kind":"text","text":"s."},{"kind":"break"},{"kind":"text","text":" "},{"kind":"code","text":"builder.option(\"log.js.com.oracle.truffle.js.parser.JavaScriptLanguage.level\",\"FINE\");"},{"kind":"text","text":" sets the "},{"kind":"link","target":{"id":"java.util.logging.Level#FINE","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html#FINE"},"code":true,"children":[{"kind":"text","text":"FINE level"}]},{"kind":"text","text":" to "},{"kind":"code","text":"TruffleLogger"},{"kind":"text","text":" for the "},{"kind":"code","text":"JavaScriptLanguage"},{"kind":"text","text":" class."},{"kind":"break"}]},{"kind":"paragraph","children":[{"kind":"text","text":"If the "},{"kind":"code","text":"logHandler"},{"kind":"text","text":" is not set on "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine"},"code":true,"children":[{"kind":"text","text":"Engine"}]},{"kind":"text","text":" nor on "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]},{"kind":"text","text":" the log messages are printed to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#out(java.io.OutputStream)"},"code":true,"children":[{"kind":"text","text":"Context's standard output stream"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1872}},{"id":"org.graalvm.polyglot.Context$Builder#allowCreateProcess(boolean)","anchor":"allowCreateProcess(boolean)","kind":"method","name":"allowCreateProcess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowCreateProcess"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"enabled"},{"kind":"punct","text":")"}],"params":[{"name":"enabled","type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" to enable external process creation"}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"If "},{"kind":"code","text":"true"},{"kind":"text","text":", allows guest language to execute external processes."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"If "},{"kind":"code","text":"true"},{"kind":"text","text":", allows guest language to execute external processes. Default is "},{"kind":"code","text":"false"},{"kind":"text","text":". If "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"all access"}]},{"kind":"text","text":" is set to "},{"kind":"code","text":"true"},{"kind":"text","text":", then process creation is enabled if not denied explicitly."}]}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1886}},{"id":"org.graalvm.polyglot.Context$Builder#processHandler(org.graalvm.polyglot.io.ProcessHandler)","anchor":"processHandler(org.graalvm.polyglot.io.ProcessHandler)","kind":"method","name":"processHandler","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"processHandler"},{"kind":"punct","text":"("},{"kind":"type","text":"ProcessHandler","ref":"org.graalvm.polyglot.io.ProcessHandler"},{"kind":"punct","text":" "},{"kind":"param","text":"handler"},{"kind":"punct","text":")"}],"params":[{"name":"handler","type":[{"kind":"type","text":"ProcessHandler","ref":"org.graalvm.polyglot.io.ProcessHandler"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the handler to be installed"}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Installs a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.ProcessHandler"},"code":true,"children":[{"kind":"text","text":"ProcessHandler"}]},{"kind":"text","text":" responsible for external process creation."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Installs a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.ProcessHandler"},"code":true,"children":[{"kind":"text","text":"ProcessHandler"}]},{"kind":"text","text":" responsible for external process creation."}]}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1897}},{"id":"org.graalvm.polyglot.Context$Builder#resourceLimits(org.graalvm.polyglot.ResourceLimits)","anchor":"resourceLimits(org.graalvm.polyglot.ResourceLimits)","kind":"method","name":"resourceLimits","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"resourceLimits"},{"kind":"punct","text":"("},{"kind":"type","text":"ResourceLimits","ref":"org.graalvm.polyglot.ResourceLimits"},{"kind":"punct","text":" "},{"kind":"param","text":"limits"},{"kind":"punct","text":")"}],"params":[{"name":"limits","type":[{"kind":"type","text":"ResourceLimits","ref":"org.graalvm.polyglot.ResourceLimits"}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Assigns resource limit configuration to a context."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Assigns resource limit configuration to a context. By default no resource limits are assigned. The limits will be enabled for all contexts created using this builder. Assigning a limit may have performance impact of all contexts that run with the same engine."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.ResourceLimits"},"code":true,"children":[{"kind":"text","text":"for usage examples"}]}]]},"since":"19.3.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1912}},{"id":"org.graalvm.polyglot.Context$Builder#exceptionHandler(java.util.function.Consumer)","anchor":"exceptionHandler(java.util.function.Consumer)","kind":"method","name":"exceptionHandler","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"exceptionHandler"},{"kind":"punct","text":"("},{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"},{"kind":"punct","text":"> "},{"kind":"param","text":"handler"},{"kind":"punct","text":")"}],"params":[{"name":"handler","type":[{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the handler to invoke before a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" is thrown to the host, or "},{"kind":"code","text":"null"},{"kind":"text","text":" to disable custom handling and, when an explicit engine is used, inherit the handler from that engine"}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Sets an exception handler that is invoked whenever a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" is about to be thrown from a context bound value back to the host."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets an exception handler that is invoked whenever a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" is about to be thrown from a context bound value back to the host."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The handler is called on the host thread that performs the polyglot operation, for example when invoking "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"Value"}]},{"kind":"text","text":" methods, executing guest code, or initializing a language. It receives the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" that would normally be thrown to the caller."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The handler can inspect the exception, perform additional logging or metrics, or translate the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" into a different exception type. If the handler throws an exception, that exception is propagated to the caller instead of the original "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":". If the handler returns normally, the original "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" is thrown as usual."}]},{"kind":"paragraph","children":[{"kind":"text","text":"A common use case is to unwrap and rethrow host runtime exceptions so that calling code can handle them directly:"}]},{"kind":"code","text":"static void rethrowHostRuntimeException(PolyglotException e) {\n    if (e.isHostException()) {\n        Throwable t = e.asHostException();\n        if (t instanceof RuntimeException rt) {\n            // rethrow the original host runtime exception\n            throw rt;\n        }\n    }\n    // fall through, the PolyglotException will be thrown\n}\n\ntry (Context c = Context.newBuilder()\n                .exceptionHandler(MyHost::rethrowHostRuntimeException)\n                .build()) {\n    try {\n        // Without an exception handler, this would throw a PolyglotException\n        // wrapping the IllegalStateException as a host exception.\n        c.asValue(new IllegalStateException(\"test\")).throwException();\n    } catch (IllegalStateException e) {\n        // The handler rethrew the original host exception.\n        assert \"test\".equals(e.getMessage());\n    }\n}"},{"kind":"paragraph","children":[{"kind":"text","text":"In this example, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#throwException()"},"code":true,"children":[{"kind":"text","text":"Value.throwException()"}]},{"kind":"text","text":" would normally throw a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":". Because the handler rethrows the underlying host "},{"kind":"link","target":{"id":"java.lang.RuntimeException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/RuntimeException.html"},"code":true,"children":[{"kind":"text","text":"RuntimeException"}]},{"kind":"text","text":", the caller observes "},{"kind":"code","text":"IllegalStateException"},{"kind":"text","text":" directly instead of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Handlers should be written carefully, because any host call into the context can then appear to throw additional exception types. In particular, translating guest exceptions into unrelated runtime exceptions can make APIs harder to reason about and should only be done with care."}]},{"kind":"paragraph","children":[{"kind":"text","text":"When this builder is used together with an explicit "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine"},"code":true,"children":[{"kind":"text","text":"Engine"}]},{"kind":"text","text":", and that engine has an exception handler configured, the context must either use the same handler instance or "},{"kind":"code","text":"null"},{"kind":"text","text":". Using a different handler instance and an explicit engine at the same time causes "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#build()"},"code":true,"children":[{"kind":"text","text":"build()"}]},{"kind":"text","text":" to fail with an "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":". Passing "},{"kind":"code","text":"null"},{"kind":"text","text":" lets the context inherit the handler configured on the engine."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#exceptionHandler(java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"Engine.Builder.exceptionHandler(Consumer)"}]}]]},"since":"25.1","source":{"path":"org/graalvm/polyglot/Context.java","line":1985}},{"id":"org.graalvm.polyglot.Context$Builder#sandbox(org.graalvm.polyglot.SandboxPolicy)","anchor":"sandbox(org.graalvm.polyglot.SandboxPolicy)","kind":"method","name":"sandbox","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"sandbox"},{"kind":"punct","text":"("},{"kind":"type","text":"SandboxPolicy","ref":"org.graalvm.polyglot.SandboxPolicy"},{"kind":"punct","text":" "},{"kind":"param","text":"policy"},{"kind":"punct","text":")"}],"params":[{"name":"policy","type":[{"kind":"type","text":"SandboxPolicy","ref":"org.graalvm.polyglot.SandboxPolicy"}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Sets a code sandbox policy to a context."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets a code sandbox policy to a context. By default, the context's sandbox policy is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#TRUSTED"},"code":true,"children":[{"kind":"text","text":"SandboxPolicy.TRUSTED"}]},{"kind":"text","text":", there are no restrictions to the context configuration."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy"},"code":true,"children":[{"kind":"text","text":"SandboxPolicy"}]}]]},"since":"23.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1997}},{"id":"org.graalvm.polyglot.Context$Builder#allowEnvironmentAccess(org.graalvm.polyglot.EnvironmentAccess)","anchor":"allowEnvironmentAccess(org.graalvm.polyglot.EnvironmentAccess)","kind":"method","name":"allowEnvironmentAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowEnvironmentAccess"},{"kind":"punct","text":"("},{"kind":"type","text":"EnvironmentAccess","ref":"org.graalvm.polyglot.EnvironmentAccess"},{"kind":"punct","text":" "},{"kind":"param","text":"accessPolicy"},{"kind":"punct","text":")"}],"params":[{"name":"accessPolicy","type":[{"kind":"type","text":"EnvironmentAccess","ref":"org.graalvm.polyglot.EnvironmentAccess"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.EnvironmentAccess"},"code":true,"children":[{"kind":"text","text":"environment access policy"}]}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allow environment access using the provided policy."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allow environment access using the provided policy. If "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"all access"}]},{"kind":"text","text":" is "},{"kind":"code","text":"true"},{"kind":"text","text":" then the default environment access policy is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.EnvironmentAccess#INHERIT"},"code":true,"children":[{"kind":"text","text":"EnvironmentAccess.INHERIT"}]},{"kind":"text","text":", otherwise "},{"kind":"link","target":{"id":"org.graalvm.polyglot.EnvironmentAccess#NONE"},"code":true,"children":[{"kind":"text","text":"EnvironmentAccess.NONE"}]},{"kind":"text","text":". The provided access policy must not be "},{"kind":"code","text":"null"},{"kind":"text","text":"."}]}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/Context.java","line":2012}},{"id":"org.graalvm.polyglot.Context$Builder#environment(java.lang.String,java.lang.String)","anchor":"environment(java.lang.String,java.lang.String)","kind":"method","name":"environment","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"environment"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"name"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":")"}],"params":[{"name":"name","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the environment variable name"}]}]},{"name":"value","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the environment variable value"}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Sets an environment variable."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets an environment variable."}]}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/Context.java","line":2025}},{"id":"org.graalvm.polyglot.Context$Builder#environment(java.util.Map)","anchor":"environment(java.util.Map)","kind":"method","name":"environment","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"environment"},{"kind":"punct","text":"("},{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"env"},{"kind":"punct","text":")"}],"params":[{"name":"env","type":[{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"environment variables"}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Shortcut for setting multiple "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#environment(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"environment variables"}]},{"kind":"text","text":" using a map."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Shortcut for setting multiple "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#environment(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"environment variables"}]},{"kind":"text","text":" using a map. All values of the provided map must be non-null."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#environment(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"To set a single environment variable."}]}]]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/Context.java","line":2043}},{"id":"org.graalvm.polyglot.Context$Builder#currentWorkingDirectory(java.nio.file.Path)","anchor":"currentWorkingDirectory(java.nio.file.Path)","kind":"method","name":"currentWorkingDirectory","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"currentWorkingDirectory"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"workingDirectory"},{"kind":"punct","text":")"}],"params":[{"name":"workingDirectory","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the new current working directory"}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"throws":[{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"when "},{"kind":"code","text":"workingDirectory"},{"kind":"text","text":" is "},{"kind":"code","text":"null"}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"when "},{"kind":"code","text":"workingDirectory"},{"kind":"text","text":" is a relative path"}]}]}],"doc":{"summary":[{"kind":"text","text":"Sets the current working directory used by the guest application to resolve relative paths."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets the current working directory used by the guest application to resolve relative paths. When the Context is built, the given directory is set as the current working directory on the Context's file system using the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#setCurrentWorkingDirectory(java.nio.file.Path)"},"code":true,"children":[{"kind":"text","text":"FileSystem.setCurrentWorkingDirectory"}]},{"kind":"text","text":" method."}]}]},"since":"20.0.0","source":{"path":"org/graalvm/polyglot/Context.java","line":2063}},{"id":"org.graalvm.polyglot.Context$Builder#hostClassLoader(java.lang.ClassLoader)","anchor":"hostClassLoader(java.lang.ClassLoader)","kind":"method","name":"hostClassLoader","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"hostClassLoader"},{"kind":"punct","text":"("},{"kind":"type","text":"ClassLoader","ref":"java.lang.ClassLoader","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassLoader.html"},{"kind":"punct","text":" "},{"kind":"param","text":"classLoader"},{"kind":"punct","text":")"}],"params":[{"name":"classLoader","type":[{"kind":"type","text":"ClassLoader","ref":"java.lang.ClassLoader","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassLoader.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the host class loader"}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Sets a host class loader."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets a host class loader. If set the given "},{"kind":"code","text":"classLoader"},{"kind":"text","text":" is used to load host classes and it's also set as a "},{"kind":"link","target":{"id":"java.lang.Thread#setContextClassLoader(java.lang.ClassLoader)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Thread.html#setContextClassLoader(java.lang.ClassLoader)"},"code":true,"children":[{"kind":"text","text":"context ClassLoader"}]},{"kind":"text","text":" during code execution. Otherwise the ClassLoader that was captured when the context was "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#build()"},"code":true,"children":[{"kind":"text","text":"built"}]},{"kind":"text","text":" is used to load host classes and the "},{"kind":"link","target":{"id":"java.lang.Thread#setContextClassLoader(java.lang.ClassLoader)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Thread.html#setContextClassLoader(java.lang.ClassLoader)"},"code":true,"children":[{"kind":"text","text":"context ClassLoader"}]},{"kind":"text","text":" is not set during code execution. Setting the hostClassLoader has a negative effect on enter and leave performance."}]}]},"since":"20.1.0","source":{"path":"org/graalvm/polyglot/Context.java","line":2084}},{"id":"org.graalvm.polyglot.Context$Builder#useSystemExit(boolean)","anchor":"useSystemExit(boolean)","kind":"method","name":"useSystemExit","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"useSystemExit"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"enabled"},{"kind":"punct","text":")"}],"params":[{"name":"enabled","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Specifies whether "},{"kind":"link","target":{"id":"java.lang.System#exit(int)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/System.html#exit(int)"},"code":true,"children":[{"kind":"text","text":"System.exit(int)"}]},{"kind":"text","text":" may be used to improve efficiency of stack unwinding for context exit requested by the guest application."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Specifies whether "},{"kind":"link","target":{"id":"java.lang.System#exit(int)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/System.html#exit(int)"},"code":true,"children":[{"kind":"text","text":"System.exit(int)"}]},{"kind":"text","text":" may be used to improve efficiency of stack unwinding for context exit requested by the guest application."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]}]]},"since":"22.0","source":{"path":"org/graalvm/polyglot/Context.java","line":2097}},{"id":"org.graalvm.polyglot.Context$Builder#spawnIsolate(boolean)","anchor":"spawnIsolate(boolean)","kind":"method","name":"spawnIsolate","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"spawnIsolate"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":")"}],"params":[{"name":"value","type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" to spawn a polyglot isolate"}]}]}],"returns":{"type":[{"kind":"type","text":"Context.Builder","ref":"org.graalvm.polyglot.Context$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Specifies whether the implicitly created engine should run guest languages in a polyglot isolate."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Specifies whether the implicitly created engine should run guest languages in a polyglot isolate."}]},{"kind":"paragraph","children":[{"kind":"text","text":"A polyglot isolate executes guest languages with an isolated heap. This can be useful for sandboxing and for running guest languages as native images when the current runtime does not support optimizing guest language execution. If enabled, all languages permitted by this context are run in the isolate. If "},{"kind":"code","text":"value"},{"kind":"text","text":" is "},{"kind":"code","text":"true"},{"kind":"text","text":", this builder must have been created with an explicit permitted languages list, for example using "},{"kind":"code","text":"Context.newBuilder(\"js\")"},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"This setting is equivalent to setting the "},{"kind":"code","text":"engine.SpawnIsolate"},{"kind":"text","text":" engine option to "},{"kind":"code","text":"true"},{"kind":"text","text":" or "},{"kind":"code","text":"false"},{"kind":"text","text":". If both are set to conflicting values, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#build()"},"code":true,"children":[{"kind":"text","text":"build()"}]},{"kind":"text","text":" fails with "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":". For contexts that use an explicit engine, configure isolate spawning on the engine builder rather than on the context builder."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#spawnIsolate(boolean)"},"code":true,"children":[{"kind":"text","text":"Engine.Builder.spawnIsolate(boolean)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#supportsCompilation()"},"code":true,"children":[{"kind":"text","text":"Engine.supportsCompilation()"}]}],[{"kind":"link","url":"https://www.graalvm.org/latest/reference-manual/embed-languages/#polyglot-isolates","children":[{"kind":"text","text":" Polyglot Isolates documentation"}]}]]},"since":"25.1","source":{"path":"org/graalvm/polyglot/Context.java","line":2125}},{"id":"org.graalvm.polyglot.Context$Builder#build()","anchor":"build()","kind":"method","name":"build","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context","ref":"org.graalvm.polyglot.Context"},{"kind":"punct","text":" "},{"kind":"name","text":"build"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Context","ref":"org.graalvm.polyglot.Context"}]},"doc":{"summary":[{"kind":"text","text":"Creates a new context instance from the configuration provided in the builder."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new context instance from the configuration provided in the builder. The same context builder can be used to create multiple context instances."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":2136}},{"id":"org.graalvm.polyglot.Context$Builder#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"25.3","source":{"path":"org/graalvm/polyglot/Context.java","line":2326}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Builder class to construct "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]},{"kind":"text","text":" instances."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Builder class to construct "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]},{"kind":"text","text":" instances. A builder instance is not thread-safe and must not be used from multiple threads at the same time."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Context.java","line":1103}},{"id":"org.graalvm.polyglot.Engine","name":"Engine","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"Engine"},{"kind":"punct","text":" "},{"kind":"keyword","text":"implements"},{"kind":"punct","text":" "},{"kind":"type","text":"AutoCloseable","ref":"java.lang.AutoCloseable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AutoCloseable.html"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"interfaces":[[{"kind":"type","text":"AutoCloseable","ref":"java.lang.AutoCloseable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AutoCloseable.html"}]],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.polyglot.Engine#getLanguages()","anchor":"getLanguages()","kind":"method","name":"getLanguages","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"Language","ref":"org.graalvm.polyglot.Language"},{"kind":"punct","text":"> "},{"kind":"name","text":"getLanguages"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"Language","ref":"org.graalvm.polyglot.Language"},{"kind":"punct","text":">"}]},"doc":{"summary":[{"kind":"text","text":"Gets a map of all installed languages with the language id as key and the language object as value."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Gets a map of all installed languages with the language id as key and the language object as value. The returned map is unmodifiable and might be used from multiple threads."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":220}},{"id":"org.graalvm.polyglot.Engine#getInstruments()","anchor":"getInstruments()","kind":"method","name":"getInstruments","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"Instrument","ref":"org.graalvm.polyglot.Instrument"},{"kind":"punct","text":"> "},{"kind":"name","text":"getInstruments"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"Instrument","ref":"org.graalvm.polyglot.Instrument"},{"kind":"punct","text":">"}]},"doc":{"summary":[{"kind":"text","text":"Gets all installed instruments of this engine."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Gets all installed instruments of this engine. An instrument alters and/or monitors the execution of guest language source code. Common examples for instruments are debuggers, profilers, or monitoring tools. Instruments are enabled via "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Instrument#getOptions()"},"code":true,"children":[{"kind":"text","text":"options"}]},{"kind":"text","text":" passed to the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":" when the engine or context is constructed."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":238}},{"id":"org.graalvm.polyglot.Engine#getOptions()","anchor":"getOptions()","kind":"method","name":"getOptions","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionDescriptors","ref":"org.graalvm.options.OptionDescriptors"},{"kind":"punct","text":" "},{"kind":"name","text":"getOptions"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"OptionDescriptors","ref":"org.graalvm.options.OptionDescriptors"}]},"doc":{"summary":[{"kind":"text","text":"Returns all options available for the engine."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns all options available for the engine. The engine offers options with the following "},{"kind":"link","target":{"id":"org.graalvm.options.OptionDescriptor#getKey()"},"code":true,"children":[{"kind":"text","text":"groups"}]},{"kind":"text","text":":"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":": options to configure the behavior of this engine."}]}],[{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"compiler"}]},{"kind":"text","text":": options to configure the behavior of the compiler."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"The language and instrument specific options need to be retrieved using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Instrument#getOptions()"},"code":true,"children":[{"kind":"text","text":"Instrument.getOptions()"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getOptions()"},"code":true,"children":[{"kind":"text","text":"Language.getOptions()"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getOptions()"},"code":true,"children":[{"kind":"text","text":"To get a list of options for a language."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Instrument#getOptions()"},"code":true,"children":[{"kind":"text","text":"To get a list of options for an instrument."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"To set an option for an engine, language, or instrument."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"To set an option for a context."}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":264}},{"id":"org.graalvm.polyglot.Engine#getVersion()","anchor":"getVersion()","kind":"method","name":"getVersion","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getVersion"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"doc":{"summary":[{"kind":"text","text":"Gets the version string of the engine in an unspecified format."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Gets the version string of the engine in an unspecified format."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":277}},{"id":"org.graalvm.polyglot.Engine#close(boolean)","anchor":"close(boolean)","kind":"method","name":"close","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"close"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"cancelIfExecuting"},{"kind":"punct","text":")"}],"params":[{"name":"cancelIfExecuting","type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"true"},{"kind":"text","text":" then currently executing contexts will be cancelled, else an "},{"kind":"link","target":{"id":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"},"code":true,"children":[{"kind":"text","text":"IllegalStateException"}]},{"kind":"text","text":" is thrown."}]}]}],"doc":{"summary":[{"kind":"text","text":"Closes this engine and frees up allocated native resources."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Closes this engine and frees up allocated native resources. If there are still open context instances that were created using this engine and they are currently not being executed then they will be closed automatically. If an attempt to close an engine was successful then consecutive calls to close have no effect. If a context is cancelled then the currently executing thread will throw a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":". The exception indicates that it was "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isCancelled()"},"code":true,"children":[{"kind":"text","text":"cancelled"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":294}},{"id":"org.graalvm.polyglot.Engine#close()","anchor":"close()","kind":"method","name":"close","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"close"},{"kind":"punct","text":"()"}],"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if there currently executing open context instances."}]}]}],"overrides":{"id":"java.lang.AutoCloseable#close()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AutoCloseable.html#close()"},"doc":{"summary":[{"kind":"text","text":"Closes this engine and frees up allocated native resources."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Closes this engine and frees up allocated native resources. If there are still open context instances that were created using this engine and they are currently not being executed then they will be closed automatically. If an attempt to close the engine was successful then consecutive calls to close have no effect."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#close(boolean)"},"code":true,"children":[{"kind":"text","text":"close(boolean)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#close()"},"code":true,"children":[{"kind":"text","text":"Engine.close()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":313}},{"id":"org.graalvm.polyglot.Engine#storeCache(java.nio.file.Path)","anchor":"storeCache(java.nio.file.Path)","kind":"method","name":"storeCache","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"storeCache"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"targetFile"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"params":[{"name":"targetFile","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this engine or the host virtual machine does not support storing the cache."}]}]}],"doc":{"summary":[{"kind":"text","text":"Stores the auxiliary engine cache to the targetFile without cancellation."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Stores the auxiliary engine cache to the targetFile without cancellation."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#storeCache(java.nio.file.Path,org.graalvm.nativeimage.c.type.WordPointer)"},"code":true,"children":[{"kind":"text","text":"storeCache(Path, WordPointer)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#persistCache(org.graalvm.polyglot.Engine.CancellationCallback)"},"code":true,"children":[{"kind":"text","text":"persistCache(CancellationCallback)"}]}]]},"since":"25.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":327}},{"id":"org.graalvm.polyglot.Engine#storeCache(java.nio.file.Path,org.graalvm.nativeimage.c.type.WordPointer)","anchor":"storeCache(java.nio.file.Path,org.graalvm.nativeimage.c.type.WordPointer)","kind":"method","name":"storeCache","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"storeCache"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"targetFile"},{"kind":"punct","text":", "},{"kind":"type","text":"WordPointer","ref":"org.graalvm.nativeimage.c.type.WordPointer","url":"https://graalvm.elide.help/25.6.0-elide.4/api/nativeimage/org/graalvm/nativeimage/c/type/WordPointer.html"},{"kind":"punct","text":" "},{"kind":"param","text":"cancelledWord"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"CancellationException","ref":"java.util.concurrent.CancellationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/concurrent/CancellationException.html"},{"kind":"punct","text":", "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"params":[{"name":"targetFile","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the file to which the cache is stored"}]}]},{"name":"cancelledWord","type":[{"kind":"type","text":"WordPointer","ref":"org.graalvm.nativeimage.c.type.WordPointer","url":"https://graalvm.elide.help/25.6.0-elide.4/api/nativeimage/org/graalvm/nativeimage/c/type/WordPointer.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a native pointer; if set to a non-zero value, the operation is cancelled. Allows cancellation of the cache store operation through a "},{"kind":"code","text":"cancelled"},{"kind":"text","text":" control word. The memory "},{"kind":"code","text":"address"},{"kind":"text","text":" pointing to the control word is polled periodically during storage without guaranteed frequency and may be delayed by safepoints such as garbage collection. A control word value of zero must be maintained for the duration of the operation. If a non-zero value is detected, the operation will be cancelled. A non-null provided pointer must remain accessible during the entire operation. Providing an invalid or inaccessible pointer may result in a VM crash."}]}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" if the file was written; otherwise, "},{"kind":"code","text":"false"}]}]},"throws":[{"type":[{"kind":"type","text":"CancellationException","ref":"java.util.concurrent.CancellationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/concurrent/CancellationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the storeCache operation was cancelled via the "},{"kind":"code","text":"cancelled"},{"kind":"text","text":" pointer"}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this engine or host virtual machine does not support cache storage"}]}]}],"doc":{"summary":[{"kind":"text","text":"Stores the auxiliary engine cache to the "},{"kind":"code","text":"targetFile"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Stores the auxiliary engine cache to the "},{"kind":"code","text":"targetFile"},{"kind":"text","text":". If it already exists, the file will be overwritten. The option "},{"kind":"code","text":"engine.CacheStoreEnabled"},{"kind":"text","text":" must be set to "},{"kind":"code","text":"true"},{"kind":"text","text":" to use this feature. Stored caches may be loaded by specifying the path using the "},{"kind":"code","text":"engine.CacheLoad"},{"kind":"text","text":" option."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Note that this feature is experimental and only supported on native-image hosts built with auxiliary engine caching enabled."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Basic Usage:"}]},{"kind":"code","text":"// Store the engine cache into a file\nPath store = Files.createTempFile(\"cache\", \"engine\");\ntry (Engine e = Engine.newBuilder().allowExperimentalOptions(true).option(\"engine.CacheStoreEnabled\", \"true\").build()) {\n    try (Context c = Context.newBuilder().engine(e).build()) {\n        // Evaluate sources, run application\n    }\n    e.storeCache(store);\n}\n\n// Load the engine cache from a file\ntry (Engine e = Engine.newBuilder().allowExperimentalOptions(true).option(\"engine.CacheLoad\", store.toAbsolutePath().toString()).build()) {\n    try (Context c = Context.newBuilder().engine(e).build()) {\n        // The context should be able to use\n        // the existing code cache.\n    }\n}"},{"kind":"paragraph","children":[{"kind":"text","text":"See the "},{"kind":"link","url":"https://github.com/oracle/graal/blob/master/truffle/docs/AuxiliaryEngineCaching.md","children":[{"kind":"text","text":" documentation"}]},{"kind":"text","text":" on auxiliary engine caching for further details."}]}]},"since":"25.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":385}},{"id":"org.graalvm.polyglot.Engine#persistCache(org.graalvm.polyglot.Engine.CancellationCallback)","anchor":"persistCache(org.graalvm.polyglot.Engine.CancellationCallback)","kind":"method","name":"persistCache","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"ByteBuffer","ref":"java.nio.ByteBuffer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteBuffer.html"},{"kind":"punct","text":" "},{"kind":"name","text":"persistCache"},{"kind":"punct","text":"("},{"kind":"type","text":"Engine.CancellationCallback","ref":"org.graalvm.polyglot.Engine$CancellationCallback"},{"kind":"punct","text":" "},{"kind":"param","text":"callback"},{"kind":"punct","text":")"}],"params":[{"name":"callback","type":[{"kind":"type","text":"Engine.CancellationCallback","ref":"org.graalvm.polyglot.Engine$CancellationCallback"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"callback used to request cancellation, or "},{"kind":"code","text":"null"},{"kind":"text","text":" for no cancellation"}]}]}],"returns":{"type":[{"kind":"type","text":"ByteBuffer","ref":"java.nio.ByteBuffer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteBuffer.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a buffer containing the persisted cache image, or "},{"kind":"code","text":"null"},{"kind":"text","text":" if no image was produced, for example because the configured maximum image size was exceeded"}]}]},"throws":[{"type":[{"kind":"type","text":"CancellationException","ref":"java.util.concurrent.CancellationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/concurrent/CancellationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the persist operation was cancelled via the callback"}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this engine or host virtual machine does not support in-memory cache persistence"}]}]}],"doc":{"summary":[{"kind":"text","text":"Persists the auxiliary engine cache into an in-memory buffer."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Persists the auxiliary engine cache into an in-memory buffer. The option "},{"kind":"code","text":"engine.CacheStoreEnabled"},{"kind":"text","text":" must be set to "},{"kind":"code","text":"true"},{"kind":"text","text":" to use this feature. The returned buffer contains the cache image bytes and can be written to a file by the caller."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Note that this feature is experimental and only supported on native-image hosts built with auxiliary engine caching enabled."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If "},{"kind":"code","text":"callback"},{"kind":"text","text":" is non-null, it is polled periodically to request cancellation. Cancellation support during the low-level auxiliary image persistence phase is only available on hosts that support it; otherwise callback cancellation is limited to the compilation-preparation phase. Implementations that cannot support the callback semantics may throw "},{"kind":"link","target":{"id":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},"code":true,"children":[{"kind":"text","text":"UnsupportedOperationException"}]},{"kind":"text","text":"."}]}]},"since":"25.1","source":{"path":"org/graalvm/polyglot/Engine.java","line":412}},{"id":"org.graalvm.polyglot.Engine#getImplementationName()","anchor":"getImplementationName()","kind":"method","name":"getImplementationName","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getImplementationName"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"doc":{"summary":[{"kind":"text","text":"Gets a human-readable name of the polyglot implementation (for example, \"Default Truffle Engine\" or \"Graal Truffle Engine\")."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Gets a human-readable name of the polyglot implementation (for example, \"Default Truffle Engine\" or \"Graal Truffle Engine\"). The returned value may change without notice. The value is never "},{"kind":"code","text":"null"},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":423}},{"id":"org.graalvm.polyglot.Engine#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"25.3","source":{"path":"org/graalvm/polyglot/Engine.java","line":432}},{"id":"org.graalvm.polyglot.Engine#create()","anchor":"create()","kind":"method","name":"create","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine","ref":"org.graalvm.polyglot.Engine"},{"kind":"punct","text":" "},{"kind":"name","text":"create"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Engine","ref":"org.graalvm.polyglot.Engine"}]},"doc":{"summary":[{"kind":"text","text":"Creates a new engine instance with default configuration."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new engine instance with default configuration. This method is a shortcut for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#newBuilder(java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"newBuilder().build()"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#create(java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"to create a new execution context."}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":448}},{"id":"org.graalvm.polyglot.Engine#create(java.lang.String...)","anchor":"create(java.lang.String...)","kind":"method","name":"create","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine","ref":"org.graalvm.polyglot.Engine"},{"kind":"punct","text":" "},{"kind":"name","text":"create"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"... "},{"kind":"param","text":"permittedLanguages"},{"kind":"punct","text":")"}],"params":[{"name":"permittedLanguages","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"..."}],"varargs":true}],"returns":{"type":[{"kind":"type","text":"Engine","ref":"org.graalvm.polyglot.Engine"}]},"doc":{"summary":[{"kind":"text","text":"Creates a new engine instance with default configuration with a set of permitted languages."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new engine instance with default configuration with a set of permitted languages. This method is a shortcut for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#newBuilder(java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"newBuilder(permittedLanguages).build()"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#create(java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"to create a new execution context."}]}]]},"since":"21.3","source":{"path":"org/graalvm/polyglot/Engine.java","line":460}},{"id":"org.graalvm.polyglot.Engine#newBuilder()","anchor":"newBuilder()","kind":"method","name":"newBuilder","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"newBuilder"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Creates a new engine builder that allows to configure an engine instance."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new engine builder that allows to configure an engine instance. This method is equivalent to calling "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#newBuilder(java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"newBuilder(String...)"}]},{"kind":"text","text":" with an empty set of permitted languages."}]}]},"since":"21.3","source":{"path":"org/graalvm/polyglot/Engine.java","line":471}},{"id":"org.graalvm.polyglot.Engine#newBuilder(java.lang.String...)","anchor":"newBuilder(java.lang.String...)","kind":"method","name":"newBuilder","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"newBuilder"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"... "},{"kind":"param","text":"permittedLanguages"},{"kind":"punct","text":")"}],"params":[{"name":"permittedLanguages","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"..."}],"varargs":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"names of languages permitted in the engine. If no languages are provided, then all installed languages will be permitted. All contexts created with this engine will inherit the set of permitted languages."}]}]}],"returns":{"type":[{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a builder that can create a context"}]}]},"doc":{"summary":[{"kind":"text","text":"Creates a new engine builder that allows to configure an engine instance."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new engine builder that allows to configure an engine instance."}]}]},"since":"21.3","source":{"path":"org/graalvm/polyglot/Engine.java","line":484}},{"id":"org.graalvm.polyglot.Engine#newBuilder(org.graalvm.polyglot.Engine.Preinitialized)","anchor":"newBuilder(org.graalvm.polyglot.Engine.Preinitialized)","kind":"method","name":"newBuilder","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"newBuilder"},{"kind":"punct","text":"("},{"kind":"type","text":"Engine.Preinitialized","ref":"org.graalvm.polyglot.Engine$Preinitialized"},{"kind":"punct","text":" "},{"kind":"param","text":"state"},{"kind":"punct","text":")"}],"params":[{"name":"state","type":[{"kind":"type","text":"Engine.Preinitialized","ref":"org.graalvm.polyglot.Engine$Preinitialized"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the prepared state to consume"}]}]}],"returns":{"type":[{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a builder that can create an engine"}]}]},"throws":[{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"state"},{"kind":"text","text":" is "},{"kind":"code","text":"null"}]}]}],"doc":{"summary":[{"kind":"text","text":"Creates a new engine builder that consumes the given prepared state when "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#build()"},"code":true,"children":[{"kind":"text","text":"Builder.build()"}]},{"kind":"text","text":" is called."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new engine builder that consumes the given prepared state when "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#build()"},"code":true,"children":[{"kind":"text","text":"Builder.build()"}]},{"kind":"text","text":" is called. The builder inherits the permitted languages and sandbox policy used to prepare the state. A prepared state can create only one engine. Calling "},{"kind":"code","text":"build()"},{"kind":"text","text":" consumes the state even if building the engine fails."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Runtime options must be compatible with the prepared state. The options "},{"kind":"code","text":"engine.SpecializationStatistics"},{"kind":"text","text":" and "},{"kind":"code","text":"engine.AssertProbes"},{"kind":"text","text":", and the options of retained instruments, must match the preparation configuration. For retained instruments, this includes which options were explicitly set. The experimental-option policy uses the consuming builder's "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#allowExperimentalOptions(boolean)"},"code":true,"children":[{"kind":"text","text":"configuration"}]},{"kind":"text","text":"."}]}]},"since":"25.5","source":{"path":"org/graalvm/polyglot/Engine.java","line":506}},{"id":"org.graalvm.polyglot.Engine#findHome()","anchor":"findHome()","kind":"method","name":"findHome","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"name","text":"findHome"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path to a folder containing the GraalVM or "},{"kind":"code","text":"null"},{"kind":"text","text":" if it cannot be found"}]}]},"doc":{"summary":[{"kind":"text","text":"Finds the GraalVM home folder."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Finds the GraalVM home folder. This is equivalent to "},{"kind":"link","target":{"id":"org.graalvm.home.HomeFinder#getHomeFolder()"},"code":true,"children":[{"kind":"text","text":"HomeFinder.getHomeFolder()"}]},{"kind":"text","text":" which should be preferred."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":518}},{"id":"org.graalvm.polyglot.Engine#getCachedSources()","anchor":"getCachedSources()","kind":"method","name":"getCachedSources","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Set","ref":"java.util.Set","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Set.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"},{"kind":"punct","text":"> "},{"kind":"name","text":"getCachedSources"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Set","ref":"java.util.Set","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Set.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"},{"kind":"punct","text":">"}]},"doc":{"summary":[{"kind":"text","text":"Returns the sources previously cached by this engine."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the sources previously cached by this engine. Only sources may be returned that allow "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#cached(boolean)"},"code":true,"children":[{"kind":"text","text":"caching"}]},{"kind":"text","text":" (default on). The source cache of the engine is using weak references to refer to the source objects. Calling this method will result in a strong reference to all cached sources of this engine until the returned set is no longer referenced. This method is useful to find out which sources very already evaluated by this engine. This method only returns sources that were evaluated using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#eval(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"Context.eval(Source)"}]},{"kind":"text","text":". Sources evaluated by the guest application will not be returned. The return set is never "},{"kind":"code","text":"null"},{"kind":"text","text":" and not modifiable."}]}]},"since":"20.3","source":{"path":"org/graalvm/polyglot/Engine.java","line":534}},{"id":"org.graalvm.polyglot.Engine#copyResources(java.nio.file.Path,java.lang.String...)","anchor":"copyResources(java.nio.file.Path,java.lang.String...)","kind":"method","name":"copyResources","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"copyResources"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"targetFolder"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"... "},{"kind":"param","text":"components"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"targetFolder","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the folder to unpack resources into"}]}]},{"name":"components","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"..."}],"varargs":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"names of languages or instruments whose resources should be unpacked. If no languages or instruments are provided, then all installed languages and instruments are used"}]}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" if at least one of the "},{"kind":"code","text":"components"},{"kind":"text","text":" has associated resources that were unpacked into "},{"kind":"code","text":"targetFolder"}]}]},"throws":[{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the "},{"kind":"code","text":"components"},{"kind":"text","text":" list contains an id of a language or instrument that is not installed"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case of an IO error"}]}]}],"doc":{"summary":[{"kind":"text","text":"Unpacks the language or instrument internal resources specified by the "},{"kind":"code","text":"components"},{"kind":"text","text":" into the "},{"kind":"code","text":"targetFolder"},{"kind":"text","text":" directory."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Unpacks the language or instrument internal resources specified by the "},{"kind":"code","text":"components"},{"kind":"text","text":" into the "},{"kind":"code","text":"targetFolder"},{"kind":"text","text":" directory."}]},{"kind":"paragraph","children":[{"kind":"text","text":"During execution, the internal resource cache location can be overridden by the following system properties:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"code","text":"polyglot.engine.resourcePath"},{"kind":"text","text":": Sets the cache location to the given path. The expected folder structure is the structure generated by this method."}]}],[{"kind":"paragraph","children":[{"kind":"code","text":"polyglot.engine.resourcePath.<component>"},{"kind":"text","text":": Retains the default cache folder but overrides caches for the specified component with the given path. The expected folder structure is "},{"kind":"code","text":"targetFolder/<component>"},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"code","text":"polyglot.engine.resourcePath.<component>.<resource-id>"},{"kind":"text","text":" : Retains the default cache folder but overrides caches for the specified resource within the component with the given path. The expected folder structure is "},{"kind":"code","text":"targetFolder/<component>/<resource-id>"},{"kind":"text","text":"."}]}]]}]},"since":"23.1","source":{"path":"org/graalvm/polyglot/Engine.java","line":572}},{"id":"org.graalvm.polyglot.Engine#supportsCompilation()","anchor":"supportsCompilation()","kind":"method","name":"supportsCompilation","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"supportsCompilation"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" if guest language execution can be optimized at run time; "},{"kind":"code","text":"false"},{"kind":"text","text":" if only the fallback runtime is available"}]}]},"doc":{"summary":[{"kind":"text","text":"Returns whether the current runtime supports optimizing guest language execution."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns whether the current runtime supports optimizing guest language execution."}]},{"kind":"paragraph","children":[{"kind":"text","text":"When this method returns "},{"kind":"code","text":"false"},{"kind":"text","text":", guest code runs on the fallback runtime unless a polyglot isolate is used. Embedders can use this method to decide whether to enable isolate execution, for example with "},{"kind":"code","text":"Context.newBuilder().spawnIsolate(!Engine.supportsCompilation())"},{"kind":"text","text":"."}]}]},"since":"25.1","source":{"path":"org/graalvm/polyglot/Engine.java","line":588}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"An execution engine for Graal "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language"},"children":[{"kind":"text","text":"guest languages"}]},{"kind":"text","text":" that allows to inspect the the installed "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#getLanguages()"},"code":true,"children":[{"kind":"text","text":"guest languages"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#getInstruments()"},"code":true,"children":[{"kind":"text","text":"instruments"}]},{"kind":"text","text":" and their available options."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"An execution engine for Graal "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language"},"children":[{"kind":"text","text":"guest languages"}]},{"kind":"text","text":" that allows to inspect the the installed "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#getLanguages()"},"code":true,"children":[{"kind":"text","text":"guest languages"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#getInstruments()"},"code":true,"children":[{"kind":"text","text":"instruments"}]},{"kind":"text","text":" and their available options."}]},{"kind":"paragraph","children":[{"kind":"text","text":"By default every context creates its own "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":" instance implicitly when "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#build()"},"code":true,"children":[{"kind":"text","text":"instantiated"}]},{"kind":"text","text":". Multiple contexts can use an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#engine(org.graalvm.polyglot.Engine)"},"code":true,"children":[{"kind":"text","text":"explicit engine"}]},{"kind":"text","text":" when using a context builder. If contexts share the same engine instance then they share instruments and their configuration."}]},{"kind":"paragraph","children":[{"kind":"text","text":"It can be useful to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#create()"},"code":true,"children":[{"kind":"text","text":"create"}]},{"kind":"text","text":" an engine instance without a context to only access meta-data for installed languages, instruments and their available options."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":144}},{"id":"org.graalvm.polyglot.Engine$Builder","name":"Engine.Builder","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"Engine.Builder"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"enclosing":"org.graalvm.polyglot.Engine","members":[{"id":"org.graalvm.polyglot.Engine$Builder#out(java.io.OutputStream)","anchor":"out(java.io.OutputStream)","kind":"method","name":"out","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"out"},{"kind":"punct","text":"("},{"kind":"type","text":"OutputStream","ref":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"},{"kind":"punct","text":" "},{"kind":"param","text":"out"},{"kind":"punct","text":")"}],"params":[{"name":"out","type":[{"kind":"type","text":"OutputStream","ref":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"}]}],"returns":{"type":[{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Sets the standard output stream to be used for this engine."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets the standard output stream to be used for this engine. Every context that uses this engine will inherit the configured output stream if it is not specified in the context. If not set then the system output stream will be used."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":795}},{"id":"org.graalvm.polyglot.Engine$Builder#err(java.io.OutputStream)","anchor":"err(java.io.OutputStream)","kind":"method","name":"err","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"err"},{"kind":"punct","text":"("},{"kind":"type","text":"OutputStream","ref":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"},{"kind":"punct","text":" "},{"kind":"param","text":"err"},{"kind":"punct","text":")"}],"params":[{"name":"err","type":[{"kind":"type","text":"OutputStream","ref":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"}]}],"returns":{"type":[{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Sets the standard error stream to be used for this engine."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets the standard error stream to be used for this engine. Every context that uses this engine will inherit the configured error stream if it is not specified in the context. If not set then the system error stream will be used."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":808}},{"id":"org.graalvm.polyglot.Engine$Builder#in(java.io.InputStream)","anchor":"in(java.io.InputStream)","kind":"method","name":"in","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"in"},{"kind":"punct","text":"("},{"kind":"type","text":"InputStream","ref":"java.io.InputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/InputStream.html"},{"kind":"punct","text":" "},{"kind":"param","text":"in"},{"kind":"punct","text":")"}],"params":[{"name":"in","type":[{"kind":"type","text":"InputStream","ref":"java.io.InputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/InputStream.html"}]}],"returns":{"type":[{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Sets the standard input stream to be used for this engine."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets the standard input stream to be used for this engine. Every context that uses this engine will inherit the configured input stream if it is not specified in the context. If not set then the system input stream will be used."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":821}},{"id":"org.graalvm.polyglot.Engine$Builder#allowExperimentalOptions(boolean)","anchor":"allowExperimentalOptions(boolean)","kind":"method","name":"allowExperimentalOptions","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowExperimentalOptions"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"enabled"},{"kind":"punct","text":")"}],"params":[{"name":"enabled","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allow experimental options to be used for instruments and engine options."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allow experimental options to be used for instruments and engine options. Do not use experimental options in production environments. If set to "},{"kind":"code","text":"false"},{"kind":"text","text":" (the default), then passing an experimental option results in an "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" when the context is built."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":835}},{"id":"org.graalvm.polyglot.Engine$Builder#useSystemProperties(boolean)","anchor":"useSystemProperties(boolean)","kind":"method","name":"useSystemProperties","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"useSystemProperties"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"enabled"},{"kind":"punct","text":")"}],"params":[{"name":"enabled","type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"true"},{"kind":"text","text":" system properties will be used as options."}]}]}],"returns":{"type":[{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Specifies whether the engine should use "},{"kind":"link","target":{"id":"java.lang.System#getProperty(java.lang.String)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/System.html#getProperty(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"system properties"}]},{"kind":"text","text":" if no explicit option is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"set"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Specifies whether the engine should use "},{"kind":"link","target":{"id":"java.lang.System#getProperty(java.lang.String)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/System.html#getProperty(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"system properties"}]},{"kind":"text","text":" if no explicit option is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"set"}]},{"kind":"text","text":". The default value is "},{"kind":"code","text":"true"},{"kind":"text","text":" indicating that the system properties should be used. System properties are looked up with the prefix "},{"kind":"emphasis","children":[{"kind":"text","text":"\"polyglot\""}]},{"kind":"text","text":" in order to disambiguate existing system properties. For example, for the option with the key "},{"kind":"code","text":"\"js.ECMACompatibility\""},{"kind":"text","text":", the system property "},{"kind":"code","text":"\"polyglot.js.ECMACompatibility\""},{"kind":"text","text":" is read. Invalid options specified using system properties will cause the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#build()"},"code":true,"children":[{"kind":"text","text":"build"}]},{"kind":"text","text":" method to fail using an "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":". System properties are read once when the engine is built and are never updated after that."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"To specify option values directly."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#build()"},"code":true,"children":[{"kind":"text","text":"To build the engine instance."}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":857}},{"id":"org.graalvm.polyglot.Engine$Builder#option(java.lang.String,java.lang.String)","anchor":"option(java.lang.String,java.lang.String)","kind":"method","name":"option","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"option"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"key"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":")"}],"params":[{"name":"key","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},{"name":"value","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Sets an option for an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#getOptions()"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getOptions()"},"code":true,"children":[{"kind":"text","text":"language"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Instrument#getOptions()"},"code":true,"children":[{"kind":"text","text":"instrument"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets an option for an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#getOptions()"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getOptions()"},"code":true,"children":[{"kind":"text","text":"language"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Instrument#getOptions()"},"code":true,"children":[{"kind":"text","text":"instrument"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If one of the set option keys or values is invalid then an "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" is thrown when the engine is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#build()"},"code":true,"children":[{"kind":"text","text":"built"}]},{"kind":"text","text":". The given key and value must not be "},{"kind":"code","text":"null"},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"See "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#getOptions()"},"code":true,"children":[{"kind":"text","text":"Engine.getOptions()"}]},{"kind":"text","text":" to list all available options for engines."}]},{"kind":"paragraph","children":[{"kind":"text","text":"See "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getOptions()"},"code":true,"children":[{"kind":"text","text":"Language.getOptions()"}]},{"kind":"text","text":" to list all available options for a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language"},"code":true,"children":[{"kind":"text","text":"language"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"See "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Instrument#getOptions()"},"code":true,"children":[{"kind":"text","text":"Instrument.getOptions()"}]},{"kind":"text","text":" to list all available options for an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Instrument"},"code":true,"children":[{"kind":"text","text":"instrument"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":880}},{"id":"org.graalvm.polyglot.Engine$Builder#sandbox(org.graalvm.polyglot.SandboxPolicy)","anchor":"sandbox(org.graalvm.polyglot.SandboxPolicy)","kind":"method","name":"sandbox","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"sandbox"},{"kind":"punct","text":"("},{"kind":"type","text":"SandboxPolicy","ref":"org.graalvm.polyglot.SandboxPolicy"},{"kind":"punct","text":" "},{"kind":"param","text":"policy"},{"kind":"punct","text":")"}],"params":[{"name":"policy","type":[{"kind":"type","text":"SandboxPolicy","ref":"org.graalvm.polyglot.SandboxPolicy"}]}],"returns":{"type":[{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Sets a code sandbox policy to an engine."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets a code sandbox policy to an engine. By default, the engine's sandbox policy is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#TRUSTED"},"code":true,"children":[{"kind":"text","text":"SandboxPolicy.TRUSTED"}]},{"kind":"text","text":", there are no restrictions to the engine configuration."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy"},"code":true,"children":[{"kind":"text","text":"SandboxPolicy"}]}]]},"since":"23.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":894}},{"id":"org.graalvm.polyglot.Engine$Builder#options(java.util.Map)","anchor":"options(java.util.Map)","kind":"method","name":"options","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"options"},{"kind":"punct","text":"("},{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"options"},{"kind":"punct","text":")"}],"params":[{"name":"options","type":[{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a map options."}]}]}],"returns":{"type":[{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Shortcut for setting multiple "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"options"}]},{"kind":"text","text":" using a map."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Shortcut for setting multiple "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"options"}]},{"kind":"text","text":" using a map. All values of the provided map must be non-null."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"To set a single option."}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":908}},{"id":"org.graalvm.polyglot.Engine$Builder#serverTransport(org.graalvm.polyglot.io.MessageTransport)","anchor":"serverTransport(org.graalvm.polyglot.io.MessageTransport)","kind":"method","name":"serverTransport","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"serverTransport"},{"kind":"punct","text":"("},{"kind":"type","text":"MessageTransport","ref":"org.graalvm.polyglot.io.MessageTransport"},{"kind":"punct","text":" "},{"kind":"param","text":"serverTransport"},{"kind":"punct","text":")"}],"params":[{"name":"serverTransport","type":[{"kind":"type","text":"MessageTransport","ref":"org.graalvm.polyglot.io.MessageTransport"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"an implementation of message transport interceptor"}]}]}],"returns":{"type":[{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Take over transport of message communication with a server peer."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Take over transport of message communication with a server peer. Provide an implementation of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.MessageTransport"},"code":true,"children":[{"kind":"text","text":"MessageTransport"}]},{"kind":"text","text":" to virtualize a transport of messages to a server endpoint. "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.MessageTransport#open(java.net.URI,org.graalvm.polyglot.io.MessageEndpoint)"},"code":true,"children":[{"kind":"text","text":"MessageTransport.open(java.net.URI, org.graalvm.polyglot.io.MessageEndpoint)"}]},{"kind":"text","text":" corresponds to accept of a server socket."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.io.MessageTransport"},"code":true,"children":[{"kind":"text","text":"MessageTransport"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":927}},{"id":"org.graalvm.polyglot.Engine$Builder#exceptionHandler(java.util.function.Consumer)","anchor":"exceptionHandler(java.util.function.Consumer)","kind":"method","name":"exceptionHandler","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"exceptionHandler"},{"kind":"punct","text":"("},{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"},{"kind":"punct","text":"> "},{"kind":"param","text":"handler"},{"kind":"punct","text":")"}],"params":[{"name":"handler","type":[{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the handler to invoke before a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" is thrown to the host, or "},{"kind":"code","text":"null"},{"kind":"text","text":" to disable custom handling"}]}]}],"returns":{"type":[{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Sets an exception handler that is invoked whenever a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" is about to be thrown from a engine bound value back to the host."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets an exception handler that is invoked whenever a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" is about to be thrown from a engine bound value back to the host. The configured custom exception handler gets inherited by all contexts created with this engine."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The handler is called on the host thread that performs the polyglot operation, for example when invoking "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"Value"}]},{"kind":"text","text":" methods, executing guest code, or initializing a language. It receives the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" that would normally be thrown to the caller."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The handler can inspect the exception, perform additional logging or metrics, or translate the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" into a different exception type. If the handler throws an exception, that exception is propagated to the caller instead of the original "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":". If the handler returns normally, the original "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" is thrown as usual."}]},{"kind":"paragraph","children":[{"kind":"text","text":"A common use case is to unwrap and rethrow host runtime exceptions so that calling code can handle them directly:"}]},{"kind":"code","text":"static void rethrowHostRuntimeException(PolyglotException e) {\n    if (e.isHostException()) {\n        Throwable t = e.asHostException();\n        if (t instanceof RuntimeException rt) {\n            // rethrow the original host runtime exception\n            throw rt;\n        }\n    }\n    // fall through, the PolyglotException will be thrown\n}\n\ntry (Context c = Context.newBuilder()\n                .exceptionHandler(MyHost::rethrowHostRuntimeException)\n                .build()) {\n    try {\n        // Without an exception handler, this would throw a PolyglotException\n        // wrapping the IllegalStateException as a host exception.\n        c.asValue(new IllegalStateException(\"test\")).throwException();\n    } catch (IllegalStateException e) {\n        // The handler rethrew the original host exception.\n        assert \"test\".equals(e.getMessage());\n    }\n}"},{"kind":"paragraph","children":[{"kind":"text","text":"In this example, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#throwException()"},"code":true,"children":[{"kind":"text","text":"Value.throwException()"}]},{"kind":"text","text":" would normally throw a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":". Because the handler rethrows the underlying host "},{"kind":"link","target":{"id":"java.lang.RuntimeException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/RuntimeException.html"},"code":true,"children":[{"kind":"text","text":"RuntimeException"}]},{"kind":"text","text":", the caller observes "},{"kind":"code","text":"IllegalStateException"},{"kind":"text","text":" directly instead of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Handlers should be written carefully, because any host call into the context can then appear to throw additional exception types. In particular, translating guest exceptions into unrelated runtime exceptions can make APIs harder to reason about and should only be done with care."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#exceptionHandler(java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"Context.Builder.exceptionHandler(Consumer)"}]}]]},"since":"25.1","source":{"path":"org/graalvm/polyglot/Engine.java","line":994}},{"id":"org.graalvm.polyglot.Engine$Builder#logHandler(java.util.logging.Handler)","anchor":"logHandler(java.util.logging.Handler)","kind":"method","name":"logHandler","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"logHandler"},{"kind":"punct","text":"("},{"kind":"type","text":"Handler","ref":"java.util.logging.Handler","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Handler.html"},{"kind":"punct","text":" "},{"kind":"param","text":"logHandler"},{"kind":"punct","text":")"}],"params":[{"name":"logHandler","type":[{"kind":"type","text":"Handler","ref":"java.util.logging.Handler","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Handler.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"java.util.logging.Handler","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Handler.html"},"code":true,"children":[{"kind":"text","text":"Handler"}]},{"kind":"text","text":" to use for logging in engine's "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]},{"kind":"text","text":"s. The passed "},{"kind":"code","text":"logHandler"},{"kind":"text","text":" is closed when the engine is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#close()"},"code":true,"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":"."}]}]}],"returns":{"type":[{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder"},"code":true,"children":[{"kind":"text","text":"Builder"}]}]}]},"doc":{"summary":[{"kind":"text","text":"Installs a new logging "},{"kind":"link","target":{"id":"java.util.logging.Handler","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Handler.html"},"code":true,"children":[{"kind":"text","text":"Handler"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Installs a new logging "},{"kind":"link","target":{"id":"java.util.logging.Handler","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Handler.html"},"code":true,"children":[{"kind":"text","text":"Handler"}]},{"kind":"text","text":". The logger's "},{"kind":"link","target":{"id":"java.util.logging.Level","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html"},"code":true,"children":[{"kind":"text","text":"Level"}]},{"kind":"text","text":" configuration is done using the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#options(java.util.Map)"},"code":true,"children":[{"kind":"text","text":"Engine's options"}]},{"kind":"text","text":". The level option key has the following format: "},{"kind":"code","text":"log.languageId.loggerName.level"},{"kind":"text","text":" or "},{"kind":"code","text":"log.instrumentId.loggerName.level"},{"kind":"text","text":". The value is either the name of pre-defined "},{"kind":"link","target":{"id":"java.util.logging.Level","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html"},"code":true,"children":[{"kind":"text","text":"Level"}]},{"kind":"text","text":" constant or a numeric "},{"kind":"link","target":{"id":"java.util.logging.Level","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html"},"code":true,"children":[{"kind":"text","text":"Level"}]},{"kind":"text","text":" value. If not explicitly set in options the level is inherited from the parent logger."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Examples"}]},{"kind":"text","text":" of setting log level options:"},{"kind":"break"},{"kind":"text","text":" "},{"kind":"code","text":"builder.option(\"log.level\",\"FINE\");"},{"kind":"text","text":" sets the "},{"kind":"link","target":{"id":"java.util.logging.Level#FINE","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html#FINE"},"code":true,"children":[{"kind":"text","text":"FINE level"}]},{"kind":"text","text":" to all "},{"kind":"code","text":"TruffleLogger"},{"kind":"text","text":"s."},{"kind":"break"},{"kind":"text","text":" "},{"kind":"code","text":"builder.option(\"log.js.level\",\"FINE\");"},{"kind":"text","text":" sets the "},{"kind":"link","target":{"id":"java.util.logging.Level#FINE","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html#FINE"},"code":true,"children":[{"kind":"text","text":"FINE level"}]},{"kind":"text","text":" to JavaScript "},{"kind":"code","text":"TruffleLogger"},{"kind":"text","text":"s."},{"kind":"break"},{"kind":"text","text":" "},{"kind":"code","text":"builder.option(\"log.js.com.oracle.truffle.js.parser.JavaScriptLanguage.level\",\"FINE\");"},{"kind":"text","text":" sets the "},{"kind":"link","target":{"id":"java.util.logging.Level#FINE","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html#FINE"},"code":true,"children":[{"kind":"text","text":"FINE level"}]},{"kind":"text","text":" to "},{"kind":"code","text":"TruffleLogger"},{"kind":"text","text":" for the "},{"kind":"code","text":"JavaScriptLanguage"},{"kind":"text","text":" class."},{"kind":"break"}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":1022}},{"id":"org.graalvm.polyglot.Engine$Builder#logHandler(java.io.OutputStream)","anchor":"logHandler(java.io.OutputStream)","kind":"method","name":"logHandler","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"logHandler"},{"kind":"punct","text":"("},{"kind":"type","text":"OutputStream","ref":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"},{"kind":"punct","text":" "},{"kind":"param","text":"logOut"},{"kind":"punct","text":")"}],"params":[{"name":"logOut","type":[{"kind":"type","text":"OutputStream","ref":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"},"code":true,"children":[{"kind":"text","text":"OutputStream"}]},{"kind":"text","text":" to use for logging in engine's "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]},{"kind":"text","text":"s. The passed "},{"kind":"code","text":"logOut"},{"kind":"text","text":" stream is closed when the engine is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#close()"},"code":true,"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":"."}]}]}],"returns":{"type":[{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder"},"code":true,"children":[{"kind":"text","text":"Builder"}]}]}]},"doc":{"summary":[{"kind":"text","text":"Installs a new logging "},{"kind":"link","target":{"id":"java.util.logging.Handler","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Handler.html"},"code":true,"children":[{"kind":"text","text":"Handler"}]},{"kind":"text","text":" using given "},{"kind":"link","target":{"id":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"},"code":true,"children":[{"kind":"text","text":"OutputStream"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Installs a new logging "},{"kind":"link","target":{"id":"java.util.logging.Handler","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Handler.html"},"code":true,"children":[{"kind":"text","text":"Handler"}]},{"kind":"text","text":" using given "},{"kind":"link","target":{"id":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"},"code":true,"children":[{"kind":"text","text":"OutputStream"}]},{"kind":"text","text":". The logger's "},{"kind":"link","target":{"id":"java.util.logging.Level","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html"},"code":true,"children":[{"kind":"text","text":"Level"}]},{"kind":"text","text":" configuration is done using the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#options(java.util.Map)"},"code":true,"children":[{"kind":"text","text":"Engine's options"}]},{"kind":"text","text":". The level option key has the following format: "},{"kind":"code","text":"log.languageId.loggerName.level"},{"kind":"text","text":" or "},{"kind":"code","text":"log.instrumentId.loggerName.level"},{"kind":"text","text":". The value is either the name of pre-defined "},{"kind":"link","target":{"id":"java.util.logging.Level","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html"},"code":true,"children":[{"kind":"text","text":"Level"}]},{"kind":"text","text":" constant or a numeric "},{"kind":"link","target":{"id":"java.util.logging.Level","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html"},"code":true,"children":[{"kind":"text","text":"Level"}]},{"kind":"text","text":" value. If not explicitly set in options the level is inherited from the parent logger."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Examples"}]},{"kind":"text","text":" of setting log level options:"},{"kind":"break"},{"kind":"text","text":" "},{"kind":"code","text":"builder.option(\"log.level\",\"FINE\");"},{"kind":"text","text":" sets the "},{"kind":"link","target":{"id":"java.util.logging.Level#FINE","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html#FINE"},"code":true,"children":[{"kind":"text","text":"FINE level"}]},{"kind":"text","text":" to all "},{"kind":"code","text":"TruffleLogger"},{"kind":"text","text":"s."},{"kind":"break"},{"kind":"text","text":" "},{"kind":"code","text":"builder.option(\"log.js.level\",\"FINE\");"},{"kind":"text","text":" sets the "},{"kind":"link","target":{"id":"java.util.logging.Level#FINE","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html#FINE"},"code":true,"children":[{"kind":"text","text":"FINE level"}]},{"kind":"text","text":" to JavaScript "},{"kind":"code","text":"TruffleLogger"},{"kind":"text","text":"s."},{"kind":"break"},{"kind":"text","text":" "},{"kind":"code","text":"builder.option(\"log.js.com.oracle.truffle.js.parser.JavaScriptLanguage.level\",\"FINE\");"},{"kind":"text","text":" sets the "},{"kind":"link","target":{"id":"java.util.logging.Level#FINE","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.logging/java/util/logging/Level.html#FINE"},"code":true,"children":[{"kind":"text","text":"FINE level"}]},{"kind":"text","text":" to "},{"kind":"code","text":"TruffleLogger"},{"kind":"text","text":" for the "},{"kind":"code","text":"JavaScriptLanguage"},{"kind":"text","text":" class."},{"kind":"break"}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":1051}},{"id":"org.graalvm.polyglot.Engine$Builder#spawnIsolate(boolean)","anchor":"spawnIsolate(boolean)","kind":"method","name":"spawnIsolate","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"spawnIsolate"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":")"}],"params":[{"name":"value","type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" to spawn a polyglot isolate"}]}]}],"returns":{"type":[{"kind":"type","text":"Engine.Builder","ref":"org.graalvm.polyglot.Engine$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Specifies whether this engine should run guest languages in a polyglot isolate."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Specifies whether this engine should run guest languages in a polyglot isolate."}]},{"kind":"paragraph","children":[{"kind":"text","text":"A polyglot isolate executes guest languages with an isolated heap. This can be useful for sandboxing and for running guest languages as native images when the current runtime does not support optimizing guest language execution. If enabled, all languages permitted by this engine are run in the isolate. If "},{"kind":"code","text":"value"},{"kind":"text","text":" is "},{"kind":"code","text":"true"},{"kind":"text","text":", this builder must have been created with an explicit permitted languages list, for example using "},{"kind":"code","text":"Engine.newBuilder(\"js\")"},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"This setting is equivalent to setting the "},{"kind":"code","text":"engine.SpawnIsolate"},{"kind":"text","text":" engine option to "},{"kind":"code","text":"true"},{"kind":"text","text":" or "},{"kind":"code","text":"false"},{"kind":"text","text":". If both are set to conflicting values, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#build()"},"code":true,"children":[{"kind":"text","text":"build()"}]},{"kind":"text","text":" fails with "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#spawnIsolate(boolean)"},"code":true,"children":[{"kind":"text","text":"Context.Builder.spawnIsolate(boolean)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#supportsCompilation()"},"code":true,"children":[{"kind":"text","text":"Engine.supportsCompilation()"}]}],[{"kind":"link","url":"https://www.graalvm.org/latest/reference-manual/embed-languages/#polyglot-isolates","children":[{"kind":"text","text":" Polyglot Isolates documentation"}]}]]},"since":"25.1","source":{"path":"org/graalvm/polyglot/Engine.java","line":1078}},{"id":"org.graalvm.polyglot.Engine$Builder#preinitialize(int,java.util.function.Consumer)","anchor":"preinitialize(int,java.util.function.Consumer)","kind":"method","name":"preinitialize","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine.Preinitialized","ref":"org.graalvm.polyglot.Engine$Preinitialized"},{"kind":"punct","text":" "},{"kind":"name","text":"preinitialize"},{"kind":"punct","text":"("},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"param","text":"contextCount"},{"kind":"punct","text":", "},{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Engine","ref":"org.graalvm.polyglot.Engine"},{"kind":"punct","text":"> "},{"kind":"param","text":"initializer"},{"kind":"punct","text":")"}],"params":[{"name":"contextCount","type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the number of clean contexts to preinitialize; zero prepares only engine state and cached code"}]}]},{"name":"initializer","type":[{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Engine","ref":"org.graalvm.polyglot.Engine"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"callback that prepares the temporary engine"}]}]}],"returns":{"type":[{"kind":"type","text":"Engine.Preinitialized","ref":"org.graalvm.polyglot.Engine$Preinitialized"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"one-shot prepared engine state"}]}]},"throws":[{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"contextCount"},{"kind":"text","text":" is negative or the configuration cannot be prepared"}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if callback contexts remain open, do not form exactly one compatible sharing layer, or retain unsupported instrument state"}]}]},{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"initializer"},{"kind":"text","text":" is "},{"kind":"code","text":"null"}]}]}],"doc":{"summary":[{"kind":"text","text":"Prepares engine state using this builder's configuration."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Prepares engine state using this builder's configuration. This is a terminal operation, like "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#build()"},"code":true,"children":[{"kind":"text","text":"build()"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"code","text":"initializer"},{"kind":"text","text":" is invoked once with a temporary explicit engine. It may create ordinary contexts using that engine to initialize languages and cache parsed or evaluated sources. All such contexts must be closed before the callback returns. The temporary engine must not be closed and must only be used during the callback. After the callback, context-specific state is discarded and "},{"kind":"code","text":"contextCount"},{"kind":"text","text":" clean contexts are preinitialized for later use by an engine built with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#newBuilder(org.graalvm.polyglot.Engine.Preinitialized)"},"code":true,"children":[{"kind":"text","text":"Engine.newBuilder(Preinitialized)"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Preparation requires exactly one sharing layer containing only languages that support context-independent code with "},{"kind":"code","text":"ContextPolicy.SHARED"},{"kind":"text","text":". All callback contexts must therefore use compatible language options. Custom file systems are not supported by callback contexts or contexts using the resulting engine. Files retained from callback contexts preserve their preparation-time IO permissions. Paths within language homes or internal resources are relocated when the prepared engine is consumed in a native image. Initialized instruments must explicitly support retaining their state in a preinitialized engine. Instruments that do not support preinitialization cause this operation to fail."}]},{"kind":"paragraph","children":[{"kind":"text","text":"This method is intended primarily for preparing state while building a native image. It can also be used on HotSpot to test the lifecycle and compatibility of prepared state, without providing native-image startup benefits. During a native-image build, unrelated Truffle execution must not run concurrently with this operation."}]},{"kind":"paragraph","children":[{"kind":"text","text":"To persist prepared state in a native image, store it in a static field of a class initialized at image build time. For example:"}]},{"kind":"code","text":"static final Engine.Preinitialized PREINITIALIZED =\n                Engine.newBuilder(\"js\").preinitialize(1, engine -> {\n                    try (Context context = Context.newBuilder(\"js\").engine(engine).build()) {\n                        context.eval(\"js\", \"42\");\n                    }\n                });\n\nEngine engine = Engine.newBuilder(PREINITIALIZED).build();"},{"kind":"paragraph","children":[{"kind":"text","text":"The holder class must be configured using "},{"kind":"code","text":"--initialize-at-build-time=<holder-class>"},{"kind":"text","text":". Preparing state at native-image run time is not supported."}]}]},"since":"25.5","source":{"path":"org/graalvm/polyglot/Engine.java","line":1138}},{"id":"org.graalvm.polyglot.Engine$Builder#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"25.3","source":{"path":"org/graalvm/polyglot/Engine.java","line":1160}},{"id":"org.graalvm.polyglot.Engine$Builder#build()","anchor":"build()","kind":"method","name":"build","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Engine","ref":"org.graalvm.polyglot.Engine"},{"kind":"punct","text":" "},{"kind":"name","text":"build"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Engine","ref":"org.graalvm.polyglot.Engine"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if configured prepared state is unavailable"}]}]}],"doc":{"summary":[{"kind":"text","text":"Creates a new engine instance from the configuration provided in the builder."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new engine instance from the configuration provided in the builder. The same engine builder can be used to create multiple engine instances unless it was created with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#newBuilder(org.graalvm.polyglot.Engine.Preinitialized)"},"code":true,"children":[{"kind":"text","text":"prepared state"}]},{"kind":"text","text":", which can be consumed only once."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":1219}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"since":"19.0","source":{"path":"org/graalvm/polyglot/Engine.java","line":743}},{"id":"org.graalvm.polyglot.Engine$CancellationCallback","name":"Engine.CancellationCallback","kind":"interface","language":"java","modifiers":["public"],"annotations":[[{"kind":"annotation","text":"@FunctionalInterface","ref":"java.lang.FunctionalInterface","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/FunctionalInterface.html"}]],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"Engine.CancellationCallback"}],"enclosing":"org.graalvm.polyglot.Engine","members":[{"id":"org.graalvm.polyglot.Engine$CancellationCallback#shouldCancel()","anchor":"shouldCancel()","kind":"method","name":"shouldCancel","signature":[{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"shouldCancel"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"whether auxiliary engine cache persistence should be cancelled."}]}]},"since":"25.1","source":{"path":"org/graalvm/polyglot/Engine.java","line":2488}}],"doc":{"summary":[{"kind":"text","text":"A callback that is invoked repeatedly while persisting the auxiliary engine cache."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"A callback that is invoked repeatedly while persisting the auxiliary engine cache."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The callback may be polled during compilation preparation. Some hosts may also support low-level auxiliary image persistence cancellation for host-specific callback implementations with additional runtime constraints."}]}]},"since":"25.1","source":{"path":"org/graalvm/polyglot/Engine.java","line":2481}},{"id":"org.graalvm.polyglot.Engine$Preinitialized","name":"Engine.Preinitialized","kind":"class","language":"java","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"Engine.Preinitialized"},{"kind":"punct","text":" "},{"kind":"keyword","text":"implements"},{"kind":"punct","text":" "},{"kind":"type","text":"AutoCloseable","ref":"java.lang.AutoCloseable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AutoCloseable.html"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"interfaces":[[{"kind":"type","text":"AutoCloseable","ref":"java.lang.AutoCloseable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AutoCloseable.html"}]],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"enclosing":"org.graalvm.polyglot.Engine","members":[{"id":"org.graalvm.polyglot.Engine$Preinitialized#getCachedSources()","anchor":"getCachedSources()","kind":"method","name":"getCachedSources","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Set","ref":"java.util.Set","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Set.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"},{"kind":"punct","text":"> "},{"kind":"name","text":"getCachedSources"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Set","ref":"java.util.Set","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Set.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"an immutable set of cached sources"}]}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this state has been consumed or closed"}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns an immutable snapshot of the sources cached in this prepared state."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns an immutable snapshot of the sources cached in this prepared state."}]}]},"since":"25.5","source":{"path":"org/graalvm/polyglot/Engine.java","line":702}},{"id":"org.graalvm.polyglot.Engine$Preinitialized#close()","anchor":"close()","kind":"method","name":"close","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"close"},{"kind":"punct","text":"()"}],"overrides":{"id":"java.lang.AutoCloseable#close()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AutoCloseable.html#close()"},"doc":{"summary":[{"kind":"text","text":"Releases this prepared state if it has not been consumed."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Releases this prepared state if it has not been consumed. This method is idempotent and has no effect if the state is already closed or consumed."}]}]},"since":"25.5","source":{"path":"org/graalvm/polyglot/Engine.java","line":713}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#toString()","text":"toString","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Prepared engine state that can be consumed by one "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#build()"},"code":true,"children":[{"kind":"text","text":"engine build"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Prepared engine state that can be consumed by one "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#build()"},"code":true,"children":[{"kind":"text","text":"engine build"}]},{"kind":"text","text":". Prepared state is useful for retaining initialized languages and cached code in a native image. It may also be used on HotSpot to test preparation and consumption behavior, but does not provide an image-startup benefit there."}]},{"kind":"paragraph","children":[{"kind":"text","text":"A prepared state is thread-safe and one-shot. A call to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#build()"},"code":true,"children":[{"kind":"text","text":"Builder.build()"}]},{"kind":"text","text":" consumes the state even if building the engine fails. An unused state should be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Preinitialized#close()"},"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":" to release its resources."}]},{"kind":"paragraph","children":[{"kind":"text","text":"To persist prepared state in a native image, store it in a static field of a class initialized at image build time. For example:"}]},{"kind":"code","text":"static final Engine.Preinitialized PREINITIALIZED =\n                Engine.newBuilder(\"js\").preinitialize(1, engine -> {\n                    try (Context context = Context.newBuilder(\"js\").engine(engine).build()) {\n                        context.eval(\"js\", \"42\");\n                    }\n                });\n\nEngine engine = Engine.newBuilder(PREINITIALIZED).build();"},{"kind":"paragraph","children":[{"kind":"text","text":"The holder class must be configured using "},{"kind":"code","text":"--initialize-at-build-time=<holder-class>"},{"kind":"text","text":". Preparing state at native-image run time is not supported."}]}]},"since":"25.5","source":{"path":"org/graalvm/polyglot/Engine.java","line":683}},{"id":"org.graalvm.polyglot.EnvironmentAccess","name":"EnvironmentAccess","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"EnvironmentAccess"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.polyglot.EnvironmentAccess#NONE","anchor":"NONE","kind":"field","name":"NONE","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"EnvironmentAccess","ref":"org.graalvm.polyglot.EnvironmentAccess"},{"kind":"punct","text":" "},{"kind":"name","text":"NONE"}],"type":[{"kind":"type","text":"EnvironmentAccess","ref":"org.graalvm.polyglot.EnvironmentAccess"}],"doc":{"summary":[{"kind":"text","text":"Provides guest languages no access to process environment."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Provides guest languages no access to process environment. No environment variables are visible for reading. The "},{"kind":"code","text":"NONE"},{"kind":"text","text":" is a default value for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]},{"kind":"text","text":"s created without "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"all access"}]},{"kind":"text","text":"."}]}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/EnvironmentAccess.java","line":59}},{"id":"org.graalvm.polyglot.EnvironmentAccess#INHERIT","anchor":"INHERIT","kind":"field","name":"INHERIT","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"EnvironmentAccess","ref":"org.graalvm.polyglot.EnvironmentAccess"},{"kind":"punct","text":" "},{"kind":"name","text":"INHERIT"}],"type":[{"kind":"type","text":"EnvironmentAccess","ref":"org.graalvm.polyglot.EnvironmentAccess"}],"doc":{"summary":[{"kind":"text","text":"Provides guest languages read access to process environment."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Provides guest languages read access to process environment. The "},{"kind":"code","text":"INHERIT"},{"kind":"text","text":" is a default value for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]},{"kind":"text","text":"s created with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"all access"}]},{"kind":"text","text":" set to "},{"kind":"code","text":"true"},{"kind":"text","text":"."}]}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/EnvironmentAccess.java","line":68}},{"id":"org.graalvm.polyglot.EnvironmentAccess#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"22.3","source":{"path":"org/graalvm/polyglot/EnvironmentAccess.java","line":81}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Represents an access policy to the process environment for the guest languages of a context."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Represents an access policy to the process environment for the guest languages of a context."}]}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/EnvironmentAccess.java","line":50}},{"id":"org.graalvm.polyglot.HostAccess","name":"HostAccess","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"HostAccess"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.polyglot.HostAccess#EXPLICIT","anchor":"EXPLICIT","kind":"field","name":"EXPLICIT","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"},{"kind":"punct","text":" "},{"kind":"name","text":"EXPLICIT"}],"type":[{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"}],"doc":{"summary":[{"kind":"text","text":"Predefined host access policy that allows access to public host methods or fields that were annotated with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Export"},"children":[{"kind":"text","text":"@Export"}]},{"kind":"text","text":" and were declared in public class."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Predefined host access policy that allows access to public host methods or fields that were annotated with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Export"},"children":[{"kind":"text","text":"@Export"}]},{"kind":"text","text":" and were declared in public class. This is the default configuration if "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"Context.Builder.allowAllAccess(boolean)"}]},{"kind":"text","text":" is "},{"kind":"code","text":"false"},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Equivalent of using the following builder configuration:"}]},{"kind":"code","text":"\nHostAccess.newBuilder().allowAccessAnnotatedBy(HostAccess.Export.class).\n               allowImplementationsAnnotatedBy(HostAccess.Implementable.class).\n               allowImplementationsAnnotatedBy(FunctionalInterface.class).\n               .build();"}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":152}},{"id":"org.graalvm.polyglot.HostAccess#SCOPED","anchor":"SCOPED","kind":"field","name":"SCOPED","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"},{"kind":"punct","text":" "},{"kind":"name","text":"SCOPED"}],"type":[{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"}],"doc":{"summary":[{"kind":"text","text":"Predefined host access policy that is the same as EXPLICIT and enables method scoping of callback parameter values on top."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Predefined host access policy that is the same as EXPLICIT and enables method scoping of callback parameter values on top. Methods that are annotated with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$DisableMethodScoping"},"code":true,"children":[{"kind":"text","text":"HostAccess.DisableMethodScoping"}]},{"kind":"text","text":" are exempt from scoping."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Equivalent of using the following builder configuration:"}]},{"kind":"code","text":"\nHostAccess.newBuilder().allowAccessAnnotatedBy(HostAccess.Export.class).\n                allowImplementationsAnnotatedBy(HostAccess.Implementable.class).\n                allowImplementationsAnnotatedBy(FunctionalInterface.class).\n                methodScoping(true).\n                disableMethodScopingAnnotatedBy(HostAccess.DisableMethodScoping.class)\n                .build();"}]},"since":"21.3","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":178}},{"id":"org.graalvm.polyglot.HostAccess#ALL","anchor":"ALL","kind":"field","name":"ALL","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"},{"kind":"punct","text":" "},{"kind":"name","text":"ALL"}],"type":[{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"}],"doc":{"summary":[{"kind":"text","text":"Predefined host access policy that allows full unrestricted access to public methods or fields of public host classes."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Predefined host access policy that allows full unrestricted access to public methods or fields of public host classes. Note that this policy allows unrestricted access to reflection. It is highly discouraged from using this policy in environments where the guest application is not fully trusted. This is the default configuration if "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"Context.Builder.allowAllAccess(boolean)"}]},{"kind":"text","text":" is "},{"kind":"code","text":"true"},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Equivalent of using the following builder configuration:"}]},{"kind":"code","text":"\nHostAccess.newBuilder()\n          allowPublicAccess(true).\n          allowAllImplementations(true).\n          allowAllClassImplementations(true).\n          allowArrayAccess(true).\n          allowListAccess(true).\n          allowBufferAccess(true).\n          allowIterableAccess(true).\n          allowIteratorAccess(true).\n          allowMapAccess(true).\n          allowAccessInheritance(true).\n          .build();"}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":214}},{"id":"org.graalvm.polyglot.HostAccess#NONE","anchor":"NONE","kind":"field","name":"NONE","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"},{"kind":"punct","text":" "},{"kind":"name","text":"NONE"}],"type":[{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"}],"doc":{"summary":[{"kind":"text","text":"Predefined host access policy that disallows any access to public host methods or fields."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Predefined host access policy that disallows any access to public host methods or fields."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Equivalent of using the following builder configuration:"}]},{"kind":"code","text":"HostAccess.newBuilder().build();"}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":234}},{"id":"org.graalvm.polyglot.HostAccess#CONSTRAINED","anchor":"CONSTRAINED","kind":"field","name":"CONSTRAINED","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"},{"kind":"punct","text":" "},{"kind":"name","text":"CONSTRAINED"}],"type":[{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"}],"doc":{"summary":[{"kind":"text","text":"Predefined host access policy used by Context with a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#CONSTRAINED"},"code":true,"children":[{"kind":"text","text":"SandboxPolicy.CONSTRAINED"}]},{"kind":"text","text":" sandbox policy when the host access policy is not explicitly specified by the embedder."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Predefined host access policy used by Context with a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#CONSTRAINED"},"code":true,"children":[{"kind":"text","text":"SandboxPolicy.CONSTRAINED"}]},{"kind":"text","text":" sandbox policy when the host access policy is not explicitly specified by the embedder."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Equivalent of using the following builder configuration:"}]},{"kind":"code","text":"\nHostAccess.newBuilder().\n          allowAccessAnnotatedBy(Export.class).\n          allowImplementationsAnnotatedBy(Implementable.class).\n          allowMutableTargetMappings().build();"}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":253}},{"id":"org.graalvm.polyglot.HostAccess#ISOLATED","anchor":"ISOLATED","kind":"field","name":"ISOLATED","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"},{"kind":"punct","text":" "},{"kind":"name","text":"ISOLATED"}],"type":[{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"}],"doc":{"summary":[{"kind":"text","text":"Predefined host access policy used by Context with an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#ISOLATED"},"code":true,"children":[{"kind":"text","text":"SandboxPolicy.ISOLATED"}]},{"kind":"text","text":" sandbox policy when the host access policy is not explicitly specified by the embedder."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Predefined host access policy used by Context with an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#ISOLATED"},"code":true,"children":[{"kind":"text","text":"SandboxPolicy.ISOLATED"}]},{"kind":"text","text":" sandbox policy when the host access policy is not explicitly specified by the embedder."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Equivalent of using the following builder configuration:"}]},{"kind":"code","text":"\nHostAccess.newBuilder(CONSTRAINED).\n          methodScoping(true).build();"}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":273}},{"id":"org.graalvm.polyglot.HostAccess#UNTRUSTED","anchor":"UNTRUSTED","kind":"field","name":"UNTRUSTED","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"},{"kind":"punct","text":" "},{"kind":"name","text":"UNTRUSTED"}],"type":[{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"}],"doc":{"summary":[{"kind":"text","text":"Predefined host access policy used by Context with an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#UNTRUSTED"},"code":true,"children":[{"kind":"text","text":"SandboxPolicy.UNTRUSTED"}]},{"kind":"text","text":" sandbox policy when the host access policy is not explicitly specified by the embedder."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Predefined host access policy used by Context with an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#UNTRUSTED"},"code":true,"children":[{"kind":"text","text":"SandboxPolicy.UNTRUSTED"}]},{"kind":"text","text":" sandbox policy when the host access policy is not explicitly specified by the embedder."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Equivalent of using the following builder configuration:"}]},{"kind":"code","text":"\nHostAccess.newBuilder().\n          allowAccessAnnotatedBy(Export.class).\n          allowMutableTargetMappings().\n          methodScoping(true).build();"}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":294}},{"id":"org.graalvm.polyglot.HostAccess#equals(java.lang.Object)","anchor":"equals(java.lang.Object)","kind":"method","name":"equals","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"equals"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"obj"},{"kind":"punct","text":")"}],"params":[{"name":"obj","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"overrides":{"id":"java.lang.Object#equals(java.lang.Object)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},"since":"20.3","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":380}},{"id":"org.graalvm.polyglot.HostAccess#hashCode()","anchor":"hashCode()","kind":"method","name":"hashCode","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"hashCode"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"overrides":{"id":"java.lang.Object#hashCode()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},"since":"20.3","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":409}},{"id":"org.graalvm.polyglot.HostAccess#newBuilder()","anchor":"newBuilder()","kind":"method","name":"newBuilder","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"newBuilder"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Creates a new builder that allows to create a custom host access policy."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new builder that allows to create a custom host access policy. The builder configuration needs to be completed using the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#build()"},"code":true,"children":[{"kind":"text","text":"method"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":511}},{"id":"org.graalvm.polyglot.HostAccess#newBuilder(org.graalvm.polyglot.HostAccess)","anchor":"newBuilder(org.graalvm.polyglot.HostAccess)","kind":"method","name":"newBuilder","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"newBuilder"},{"kind":"punct","text":"("},{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"},{"kind":"punct","text":" "},{"kind":"param","text":"conf"},{"kind":"punct","text":")"}],"params":[{"name":"conf","type":[{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Creates a new builder that allows to create a custom host access policy based of a preset configuration."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new builder that allows to create a custom host access policy based of a preset configuration. The preset configuration is copied and used as a template for the returned buidler. The builder configuration needs to be completed using the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#build()"},"code":true,"children":[{"kind":"text","text":"method"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":523}},{"id":"org.graalvm.polyglot.HostAccess#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":642}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Represents the host access policy of a polyglot context."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Represents the host access policy of a polyglot context. The host access policy specifies which methods and fields are accessible to the guest application, whenever Java host objects are accessed."}]},{"kind":"paragraph","children":[{"kind":"text","text":"There are three predefined instances of host access policies:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#EXPLICIT"},"code":true,"children":[{"kind":"text","text":"EXPLICIT"}]},{"kind":"text","text":" - Java host methods or fields, must be public and be annotated with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Export"},"code":true,"children":[{"kind":"text","text":"@Export"}]},{"kind":"text","text":" to make them accessible to the guest language."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#SCOPED"},"code":true,"children":[{"kind":"text","text":"SCOPED"}]},{"kind":"text","text":" - Java host methods or fields, must be public and be annotated with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Export"},"code":true,"children":[{"kind":"text","text":"@Export"}]},{"kind":"text","text":" to make them accessible to the guest language. Guest-to-host callback parameter validity is scoped to the duration of the callback by default."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#NONE"},"code":true,"children":[{"kind":"text","text":"NONE"}]},{"kind":"text","text":" - Does not allow any access to methods or fields of host objects. Java host objects may still be passed into a context, but they cannot be accessed."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#ALL"},"code":true,"children":[{"kind":"text","text":"ALL"}]},{"kind":"text","text":" - Does allow full unrestricted access to public methods or fields of host objects. Note that this policy allows unrestricted access to reflection. It is highly discouraged from using this policy in environments where the guest application is not fully trusted."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#CONSTRAINED"},"code":true,"children":[{"kind":"text","text":"CONSTRAINED"}]},{"kind":"text","text":" host access policy suitable for a context with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#CONSTRAINED"},"code":true,"children":[{"kind":"text","text":"CONSTRAINED"}]},{"kind":"text","text":" sandbox policy."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#ISOLATED"},"code":true,"children":[{"kind":"text","text":"ISOLATED"}]},{"kind":"text","text":" host access policy suitable for a context with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#ISOLATED"},"code":true,"children":[{"kind":"text","text":"ISOLATED"}]},{"kind":"text","text":" sandbox policy."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#UNTRUSTED"},"code":true,"children":[{"kind":"text","text":"UNTRUSTED"}]},{"kind":"text","text":" host access policy suitable for a context with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#UNTRUSTED"},"code":true,"children":[{"kind":"text","text":"UNTRUSTED"}]},{"kind":"text","text":" sandbox policy."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"Custom host access policies can be created using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#newBuilder()"},"code":true,"children":[{"kind":"text","text":"newBuilder()"}]},{"kind":"text","text":". The builder allows to specify a custom export annotation and allowed and denied methods or fields."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":101}},{"id":"org.graalvm.polyglot.HostAccess$Builder","name":"HostAccess.Builder","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"HostAccess.Builder"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"enclosing":"org.graalvm.polyglot.HostAccess","members":[{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAccessAnnotatedBy(java.lang.Class)","anchor":"allowAccessAnnotatedBy(java.lang.Class)","kind":"method","name":"allowAccessAnnotatedBy","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowAccessAnnotatedBy"},{"kind":"punct","text":"("},{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<? "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"Annotation","ref":"java.lang.annotation.Annotation","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/annotation/Annotation.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"annotation"},{"kind":"punct","text":")"}],"params":[{"name":"annotation","type":[{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<? "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"Annotation","ref":"java.lang.annotation.Annotation","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/annotation/Annotation.html"},{"kind":"punct","text":">"}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allows access to public constructors, methods or fields of public classes that were annotated by the given annotation class."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows access to public constructors, methods or fields of public classes that were annotated by the given annotation class."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":927}},{"id":"org.graalvm.polyglot.HostAccess$Builder#allowPublicAccess(boolean)","anchor":"allowPublicAccess(boolean)","kind":"method","name":"allowPublicAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowPublicAccess"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"allow"},{"kind":"punct","text":")"}],"params":[{"name":"allow","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allows unrestricted access to all public constructors, methods or fields of public classes."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows unrestricted access to all public constructors, methods or fields of public classes. Note that this policy allows unrestricted access to reflection. It is highly discouraged from using this option in environments where the guest application is not fully trusted. This setting replaces selected public access configured using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowPublicAccess(java.util.function.Predicate)"},"code":true,"children":[{"kind":"text","text":"allowPublicAccess(Predicate)"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":945}},{"id":"org.graalvm.polyglot.HostAccess$Builder#allowPublicAccess(java.util.function.Predicate)","anchor":"allowPublicAccess(java.util.function.Predicate)","kind":"method","name":"allowPublicAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowPublicAccess"},{"kind":"punct","text":"("},{"kind":"type","text":"Predicate","ref":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Member","ref":"java.lang.reflect.Member","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/reflect/Member.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"predicate"},{"kind":"punct","text":")"}],"params":[{"name":"predicate","type":[{"kind":"type","text":"Predicate","ref":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Member","ref":"java.lang.reflect.Member","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/reflect/Member.html"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the predicate that selects public host members to expose"}]}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"this builder"}]}]},"throws":[{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"predicate"},{"kind":"text","text":" is "},{"kind":"code","text":"null"}]}]}],"doc":{"summary":[{"kind":"text","text":"Allows access to public constructors, methods or fields of public classes for which the given predicate returns "},{"kind":"code","text":"true"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows access to public constructors, methods or fields of public classes for which the given predicate returns "},{"kind":"code","text":"true"},{"kind":"text","text":". Only public members are passed to the predicate. A predicate that returns "},{"kind":"code","text":"true"},{"kind":"text","text":" for every member exposes the same host members as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowPublicAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"allowPublicAccess(true)"}]},{"kind":"text","text":". This setting replaces previously configured public access. The predicate does not restrict access granted by "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAccess(java.lang.reflect.Executable)"},"code":true,"children":[{"kind":"text","text":"allowAccess(Executable)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAccess(java.lang.reflect.Field)"},"code":true,"children":[{"kind":"text","text":"allowAccess(Field)"}]},{"kind":"text","text":", or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAccessAnnotatedBy(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"allowAccessAnnotatedBy(Class)"}]},{"kind":"text","text":". For example, a method annotated with an annotation configured using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAccessAnnotatedBy(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"allowAccessAnnotatedBy(Class)"}]},{"kind":"text","text":" remains accessible even if the predicate returns "},{"kind":"code","text":"false"},{"kind":"text","text":" for that method. Access denied with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#denyAccess(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"denyAccess(Class)"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#denyAccess(java.lang.Class,boolean)"},"code":true,"children":[{"kind":"text","text":"denyAccess(Class, boolean)"}]},{"kind":"text","text":" takes precedence."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Predicate-selected public access is only supported with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#TRUSTED"},"code":true,"children":[{"kind":"text","text":"SandboxPolicy.TRUSTED"}]},{"kind":"text","text":" and cannot be used with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#CONSTRAINED"},"code":true,"children":[{"kind":"text","text":"SandboxPolicy.CONSTRAINED"}]},{"kind":"text","text":" or stricter sandbox policies. For a sandboxed context, each required member should instead be granted explicitly using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAccess(java.lang.reflect.Executable)"},"code":true,"children":[{"kind":"text","text":"allowAccess(Executable)"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAccess(java.lang.reflect.Field)"},"code":true,"children":[{"kind":"text","text":"allowAccess(Field)"}]},{"kind":"text","text":" after reviewing it for security implications."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Member visibility is determined when host class metadata is initialized and retained for the lifetime of this policy. The predicate may be invoked multiple times and concurrently, and therefore must be stable, thread-safe, and free of side effects. Errors thrown by the predicate are propagated as host exceptions."}]}]},"since":"25.4","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":978}},{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAccess(java.lang.reflect.Executable)","anchor":"allowAccess(java.lang.reflect.Executable)","kind":"method","name":"allowAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowAccess"},{"kind":"punct","text":"("},{"kind":"type","text":"Executable","ref":"java.lang.reflect.Executable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/reflect/Executable.html"},{"kind":"punct","text":" "},{"kind":"param","text":"element"},{"kind":"punct","text":")"}],"params":[{"name":"element","type":[{"kind":"type","text":"Executable","ref":"java.lang.reflect.Executable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/reflect/Executable.html"}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allows access to a given constructor or method."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows access to a given constructor or method. Note that the method or constructor must be public in order to have any effect."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":989}},{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAccess(java.lang.reflect.Field)","anchor":"allowAccess(java.lang.reflect.Field)","kind":"method","name":"allowAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowAccess"},{"kind":"punct","text":"("},{"kind":"type","text":"Field","ref":"java.lang.reflect.Field","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/reflect/Field.html"},{"kind":"punct","text":" "},{"kind":"param","text":"element"},{"kind":"punct","text":")"}],"params":[{"name":"element","type":[{"kind":"type","text":"Field","ref":"java.lang.reflect.Field","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/reflect/Field.html"}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allows access to a given field."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows access to a given field. Note that the field must be public in order to have any effect."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1004}},{"id":"org.graalvm.polyglot.HostAccess$Builder#denyAccess(java.lang.Class)","anchor":"denyAccess(java.lang.Class)","kind":"method","name":"denyAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"denyAccess"},{"kind":"punct","text":"("},{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<?> "},{"kind":"param","text":"clazz"},{"kind":"punct","text":")"}],"params":[{"name":"clazz","type":[{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<?>"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the class to deny access to"}]}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"this builder"}]}]},"doc":{"summary":[{"kind":"text","text":"Prevents access to members of given class and its subclasses."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Prevents access to members of given class and its subclasses."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1020}},{"id":"org.graalvm.polyglot.HostAccess$Builder#denyAccess(java.lang.Class,boolean)","anchor":"denyAccess(java.lang.Class,boolean)","kind":"method","name":"denyAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"denyAccess"},{"kind":"punct","text":"("},{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<?> "},{"kind":"param","text":"clazz"},{"kind":"punct","text":", "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"includeSubclasses"},{"kind":"punct","text":")"}],"params":[{"name":"clazz","type":[{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<?>"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the class to deny access to"}]}]},{"name":"includeSubclasses","type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"should subclasses be excuded as well?"}]}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"this builder"}]}]},"doc":{"summary":[{"kind":"text","text":"Prevents access to members of given class."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Prevents access to members of given class."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1032}},{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAllImplementations(boolean)","anchor":"allowAllImplementations(boolean)","kind":"method","name":"allowAllImplementations","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowAllImplementations"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"allow"},{"kind":"punct","text":")"}],"params":[{"name":"allow","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allow guest languages to implement any Java interface."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allow guest languages to implement any Java interface."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Note that implementations implicitly export all their methods, i.e., allowing implementations of a type implies allowing access its methods via its implementations, regardless of whether the methods have been explicitly exported."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#ALL"},"code":true,"children":[{"kind":"text","text":"HostAccess.ALL"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowImplementations(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"allowImplementations(Class)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowImplementationsAnnotatedBy(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"allowImplementationsAnnotatedBy(Class)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1053}},{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAllClassImplementations(boolean)","anchor":"allowAllClassImplementations(boolean)","kind":"method","name":"allowAllClassImplementations","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowAllClassImplementations"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"allow"},{"kind":"punct","text":")"}],"params":[{"name":"allow","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allow guest languages to implement (extend) any Java class."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allow guest languages to implement (extend) any Java class. Note that the default host type mappings and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"Value.as(Class)"}]},{"kind":"text","text":" only implement abstract classes."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Note that implementations implicitly export all their methods, i.e., allowing implementations of a type implies allowing access its methods via its implementations, regardless of whether the methods have been explicitly exported."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#ALL"},"code":true,"children":[{"kind":"text","text":"HostAccess.ALL"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowImplementations(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"allowImplementations(Class)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowImplementationsAnnotatedBy(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"allowImplementationsAnnotatedBy(Class)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAllImplementations(boolean)"},"code":true,"children":[{"kind":"text","text":"allowAllImplementations(boolean)"}]}]]},"since":"20.3.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1072}},{"id":"org.graalvm.polyglot.HostAccess$Builder#allowImplementationsAnnotatedBy(java.lang.Class)","anchor":"allowImplementationsAnnotatedBy(java.lang.Class)","kind":"method","name":"allowImplementationsAnnotatedBy","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowImplementationsAnnotatedBy"},{"kind":"punct","text":"("},{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<? "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"Annotation","ref":"java.lang.annotation.Annotation","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/annotation/Annotation.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"annotation"},{"kind":"punct","text":")"}],"params":[{"name":"annotation","type":[{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<? "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"Annotation","ref":"java.lang.annotation.Annotation","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/annotation/Annotation.html"},{"kind":"punct","text":">"}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allow implementations of types annotated with the given annotation."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allow implementations of types annotated with the given annotation. For the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#EXPLICIT"},"code":true,"children":[{"kind":"text","text":"explicit"}]},{"kind":"text","text":" host access present the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Implementable"},"code":true,"children":[{"kind":"text","text":"Implementable"}]},{"kind":"text","text":" annotation is configured for this purpose. Applies to interfaces and classes."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Note that implementations implicitly export all their methods, i.e., allowing implementations of a type implies allowing access its methods via its implementations, regardless of whether the methods have been explicitly exported."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Implementable"},"code":true,"children":[{"kind":"text","text":"HostAccess.Implementable"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowImplementations(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"allowImplementations(Class)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"Value.as(Class)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1091}},{"id":"org.graalvm.polyglot.HostAccess$Builder#allowImplementations(java.lang.Class)","anchor":"allowImplementations(java.lang.Class)","kind":"method","name":"allowImplementations","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowImplementations"},{"kind":"punct","text":"("},{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<?> "},{"kind":"param","text":"type"},{"kind":"punct","text":")"}],"params":[{"name":"type","type":[{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<?>"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"an interface that may be implemented or a class that may be extended."}]}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allow implementations of this type by the guest language."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allow implementations of this type by the guest language."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Note that implementations implicitly export all their methods, i.e., allowing implementations of a type implies allowing access its methods via its implementations, regardless of whether the methods have been explicitly exported."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowImplementationsAnnotatedBy(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"allowImplementationsAnnotatedBy(Class)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"Value.as(Class)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1112}},{"id":"org.graalvm.polyglot.HostAccess$Builder#allowArrayAccess(boolean)","anchor":"allowArrayAccess(boolean)","kind":"method","name":"allowArrayAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowArrayAccess"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"arrayAccess"},{"kind":"punct","text":")"}],"params":[{"name":"arrayAccess","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allows the guest application to access arrays as values with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasArrayElements()"},"code":true,"children":[{"kind":"text","text":"array elements"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows the guest application to access arrays as values with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasArrayElements()"},"code":true,"children":[{"kind":"text","text":"array elements"}]},{"kind":"text","text":". By default no array access is allowed."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasArrayElements()"},"code":true,"children":[{"kind":"text","text":"Value.hasArrayElements()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1128}},{"id":"org.graalvm.polyglot.HostAccess$Builder#allowListAccess(boolean)","anchor":"allowListAccess(boolean)","kind":"method","name":"allowListAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowListAccess"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"listAccess"},{"kind":"punct","text":")"}],"params":[{"name":"listAccess","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allows the guest application to access lists as values with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasArrayElements()"},"code":true,"children":[{"kind":"text","text":"array elements"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasIterator()"},"code":true,"children":[{"kind":"text","text":"iterators"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows the guest application to access lists as values with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasArrayElements()"},"code":true,"children":[{"kind":"text","text":"array elements"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasIterator()"},"code":true,"children":[{"kind":"text","text":"iterators"}]},{"kind":"text","text":". By default no array access is allowed. Allowing list access implies also allowing of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowIterableAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"iterables"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowIteratorAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"iterators"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasArrayElements()"},"code":true,"children":[{"kind":"text","text":"Value.hasArrayElements()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasIterator()"},"code":true,"children":[{"kind":"text","text":"Value.hasIterator()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1144}},{"id":"org.graalvm.polyglot.HostAccess$Builder#allowIterableAccess(boolean)","anchor":"allowIterableAccess(boolean)","kind":"method","name":"allowIterableAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowIterableAccess"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"iterableAccess"},{"kind":"punct","text":")"}],"params":[{"name":"iterableAccess","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allows the guest application to access "},{"kind":"link","target":{"id":"java.lang.Iterable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html"},"code":true,"children":[{"kind":"text","text":"iterables"}]},{"kind":"text","text":" as values with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasIterator()"},"code":true,"children":[{"kind":"text","text":"iterators"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows the guest application to access "},{"kind":"link","target":{"id":"java.lang.Iterable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html"},"code":true,"children":[{"kind":"text","text":"iterables"}]},{"kind":"text","text":" as values with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasIterator()"},"code":true,"children":[{"kind":"text","text":"iterators"}]},{"kind":"text","text":". By default no iterable access is allowed. Allowing iterable access implies also allowing of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowIteratorAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"iterators"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasIterator()"},"code":true,"children":[{"kind":"text","text":"Value.hasIterator()"}]}]]},"since":"21.1","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1157}},{"id":"org.graalvm.polyglot.HostAccess$Builder#allowIteratorAccess(boolean)","anchor":"allowIteratorAccess(boolean)","kind":"method","name":"allowIteratorAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowIteratorAccess"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"iteratorAccess"},{"kind":"punct","text":")"}],"params":[{"name":"iteratorAccess","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allows the guest application to access "},{"kind":"link","target":{"id":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},"code":true,"children":[{"kind":"text","text":"iterators"}]},{"kind":"text","text":" as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isIterator()"},"code":true,"children":[{"kind":"text","text":"iterator"}]},{"kind":"text","text":" values."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows the guest application to access "},{"kind":"link","target":{"id":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},"code":true,"children":[{"kind":"text","text":"iterators"}]},{"kind":"text","text":" as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isIterator()"},"code":true,"children":[{"kind":"text","text":"iterator"}]},{"kind":"text","text":" values. By default no iterator access is allowed."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isIterator()"},"code":true,"children":[{"kind":"text","text":"Value.isIterator()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasIteratorNextElement()"},"code":true,"children":[{"kind":"text","text":"Value.hasIteratorNextElement()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getIteratorNextElement()"},"code":true,"children":[{"kind":"text","text":"Value.getIteratorNextElement()"}]}]]},"since":"21.1","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1171}},{"id":"org.graalvm.polyglot.HostAccess$Builder#allowMapAccess(boolean)","anchor":"allowMapAccess(boolean)","kind":"method","name":"allowMapAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowMapAccess"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"mapAccess"},{"kind":"punct","text":")"}],"params":[{"name":"mapAccess","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allows the guest application to access "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"map"}]},{"kind":"text","text":" as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasHashEntries()"},"code":true,"children":[{"kind":"text","text":"hash"}]},{"kind":"text","text":" values."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows the guest application to access "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"map"}]},{"kind":"text","text":" as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasHashEntries()"},"code":true,"children":[{"kind":"text","text":"hash"}]},{"kind":"text","text":" values. By default no map access is allowed. Allowing map access implies also allowing of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowIteratorAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"iterators"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasHashEntries()"},"code":true,"children":[{"kind":"text","text":"Value.hasHashEntries()"}]}]]},"since":"21.1","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1184}},{"id":"org.graalvm.polyglot.HostAccess$Builder#allowBigIntegerNumberAccess(boolean)","anchor":"allowBigIntegerNumberAccess(boolean)","kind":"method","name":"allowBigIntegerNumberAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowBigIntegerNumberAccess"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"bigIntegerNumberAccess"},{"kind":"punct","text":")"}],"params":[{"name":"bigIntegerNumberAccess","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allows the guest application to access "},{"kind":"link","target":{"id":"java.math.BigInteger","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/math/BigInteger.html"},"code":true,"children":[{"kind":"text","text":"BigInteger"}]},{"kind":"text","text":" as a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows the guest application to access "},{"kind":"link","target":{"id":"java.math.BigInteger","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/math/BigInteger.html"},"code":true,"children":[{"kind":"text","text":"BigInteger"}]},{"kind":"text","text":" as a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":". By default BigInteger number access is allowed."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"Value.isNumber()"}]}]]},"since":"23.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1196}},{"id":"org.graalvm.polyglot.HostAccess$Builder#allowBufferAccess(boolean)","anchor":"allowBufferAccess(boolean)","kind":"method","name":"allowBufferAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowBufferAccess"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"bufferAccess"},{"kind":"punct","text":")"}],"params":[{"name":"bufferAccess","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allows the guest application to access "},{"kind":"link","target":{"id":"java.nio.ByteBuffer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteBuffer.html"},"code":true,"children":[{"kind":"text","text":"java.nio.ByteBuffer"}]},{"kind":"text","text":"s as values with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"buffer elements"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows the guest application to access "},{"kind":"link","target":{"id":"java.nio.ByteBuffer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteBuffer.html"},"code":true,"children":[{"kind":"text","text":"java.nio.ByteBuffer"}]},{"kind":"text","text":"s as values with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"buffer elements"}]},{"kind":"text","text":". By default no buffer access is allowed."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"Value.hasBufferElements()"}]}]]},"since":"21.1","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1209}},{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAccessInheritance(boolean)","anchor":"allowAccessInheritance(boolean)","kind":"method","name":"allowAccessInheritance","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowAccessInheritance"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"inheritAccess"},{"kind":"punct","text":")"}],"params":[{"name":"inheritAccess","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allows the guest application to inherit access to allowed methods, i.e."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows the guest application to inherit access to allowed methods, i.e. implementations of allowed abstract and interface methods and overrides of allowed concrete methods. If access inheritance is disabled, all method implementations need to be explicitly allowed (either by "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAccessAnnotatedBy(java.lang.Class)"},"children":[{"kind":"text","text":"an annotation"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAccess(java.lang.reflect.Executable)"},"children":[{"kind":"text","text":"using reflection"}]},{"kind":"text","text":") to be available. Consequently, attempting to allow abstract methods has no effect in this access mode. Rationale: Requiring explicit vetting of all method implementations prevents unintentional exporting of newly added or overridden methods. When a user annotates an abstract (or concrete) method as exported, they might still know what that means when they write the code and know of all its implementations; but they might forget it later and other contributors to the codebase might not be aware of what is exported through an interface or superclass. So when someone introduces a new implementation or overrides the method in a subclass, perhaps a few levels down, they could be accidentally exporting it to the guest application."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAccessAnnotatedBy(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"allowAccessAnnotatedBy(Class)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAccess(java.lang.reflect.Executable)"},"code":true,"children":[{"kind":"text","text":"allowAccess(Executable)"}]}]]},"since":"22.2","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1239}},{"id":"org.graalvm.polyglot.HostAccess$Builder#allowMutableTargetMappings(org.graalvm.polyglot.HostAccess.MutableTargetMapping...)","anchor":"allowMutableTargetMappings(org.graalvm.polyglot.HostAccess.MutableTargetMapping...)","kind":"method","name":"allowMutableTargetMappings","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowMutableTargetMappings"},{"kind":"punct","text":"("},{"kind":"type","text":"HostAccess.MutableTargetMapping","ref":"org.graalvm.polyglot.HostAccess$MutableTargetMapping"},{"kind":"punct","text":"... "},{"kind":"param","text":"mapping"},{"kind":"punct","text":")"}],"params":[{"name":"mapping","type":[{"kind":"type","text":"HostAccess.MutableTargetMapping","ref":"org.graalvm.polyglot.HostAccess$MutableTargetMapping"},{"kind":"punct","text":"..."}],"varargs":true}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allows host object mappings of mutable target types, such as "},{"kind":"link","target":{"id":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},"code":true,"children":[{"kind":"text","text":"java.util.List"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"java.util.Map"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},"code":true,"children":[{"kind":"text","text":"java.util.Iterator"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"java.lang.Iterable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html"},"code":true,"children":[{"kind":"text","text":"java.lang.Iterable"}]},{"kind":"text","text":" based on the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$MutableTargetMapping"},"code":true,"children":[{"kind":"text","text":"MutableTargetMapping"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows host object mappings of mutable target types, such as "},{"kind":"link","target":{"id":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},"code":true,"children":[{"kind":"text","text":"java.util.List"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"java.util.Map"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},"code":true,"children":[{"kind":"text","text":"java.util.Iterator"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"java.lang.Iterable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html"},"code":true,"children":[{"kind":"text","text":"java.lang.Iterable"}]},{"kind":"text","text":" based on the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$MutableTargetMapping"},"code":true,"children":[{"kind":"text","text":"MutableTargetMapping"}]},{"kind":"text","text":". Mapping guest objects to well-known host object types such as "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"java.util.Map"}]},{"kind":"text","text":" is convenient on one hand. On the other hand it can lead to bugs as the guest code is free to provide an arbitrary backing implementation of such objects, which may not behave as expected of a "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"java.util.Map"}]},{"kind":"text","text":"."}]}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1256}},{"id":"org.graalvm.polyglot.HostAccess$Builder#targetTypeMapping(java.lang.Class,java.lang.Class,java.util.function.Predicate,java.util.function.Function)","anchor":"targetTypeMapping(java.lang.Class,java.lang.Class,java.util.function.Predicate,java.util.function.Function)","kind":"method","name":"targetTypeMapping","modifiers":["public"],"typeParams":[{"name":"S"},{"name":"T"}],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" <"},{"kind":"typeParam","text":"S"},{"kind":"punct","text":", "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"targetTypeMapping"},{"kind":"punct","text":"("},{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"S"},{"kind":"punct","text":"> "},{"kind":"param","text":"sourceType"},{"kind":"punct","text":", "},{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"param","text":"targetType"},{"kind":"punct","text":", "},{"kind":"type","text":"Predicate","ref":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"S"},{"kind":"punct","text":"> "},{"kind":"param","text":"accepts"},{"kind":"punct","text":", "},{"kind":"type","text":"Function","ref":"java.util.function.Function","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Function.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"S"},{"kind":"punct","text":", "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"param","text":"converter"},{"kind":"punct","text":")"}],"params":[{"name":"sourceType","type":[{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"S"},{"kind":"punct","text":">"}]},{"name":"targetType","type":[{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}]},{"name":"accepts","type":[{"kind":"type","text":"Predicate","ref":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"S"},{"kind":"punct","text":">"}]},{"name":"converter","type":[{"kind":"type","text":"Function","ref":"java.util.function.Function","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Function.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"S"},{"kind":"punct","text":", "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Adds a custom source to target type mapping for Java host calls, host field assignments and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"explicit value conversions"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Adds a custom source to target type mapping for Java host calls, host field assignments and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"explicit value conversions"}]},{"kind":"text","text":". Method is equivalent to calling the targetTypeMapping method with precedence "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#HIGH"},"code":true,"children":[{"kind":"text","text":"TargetMappingPrecedence.HIGH"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1269}},{"id":"org.graalvm.polyglot.HostAccess$Builder#targetTypeMapping(java.lang.Class,java.lang.Class,java.util.function.Predicate,java.util.function.Function,org.graalvm.polyglot.HostAccess.TargetMappingPrecedence)","anchor":"targetTypeMapping(java.lang.Class,java.lang.Class,java.util.function.Predicate,java.util.function.Function,org.graalvm.polyglot.HostAccess.TargetMappingPrecedence)","kind":"method","name":"targetTypeMapping","modifiers":["public"],"typeParams":[{"name":"S"},{"name":"T"}],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" <"},{"kind":"typeParam","text":"S"},{"kind":"punct","text":", "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"targetTypeMapping"},{"kind":"punct","text":"("},{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"S"},{"kind":"punct","text":"> "},{"kind":"param","text":"sourceType"},{"kind":"punct","text":", "},{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"param","text":"targetType"},{"kind":"punct","text":", "},{"kind":"type","text":"Predicate","ref":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"S"},{"kind":"punct","text":"> "},{"kind":"param","text":"accepts"},{"kind":"punct","text":", "},{"kind":"type","text":"Function","ref":"java.util.function.Function","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Function.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"S"},{"kind":"punct","text":", "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"param","text":"converter"},{"kind":"punct","text":", "},{"kind":"type","text":"HostAccess.TargetMappingPrecedence","ref":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence"},{"kind":"punct","text":" "},{"kind":"param","text":"precedence"},{"kind":"punct","text":")"}],"params":[{"name":"sourceType","type":[{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"S"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the static source type to convert from with this mapping. The source type must be applicable for a mapping to be accepted."}]}]},{"name":"targetType","type":[{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the exact and static target type to convert to with this mapping."}]}]},{"name":"accepts","type":[{"kind":"type","text":"Predicate","ref":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"S"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the predicate to check whether a mapping is applicable. Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the mapping is applicable else false. If set to "},{"kind":"code","text":"null"},{"kind":"text","text":" then all values of a given source type are applicable."}]}]},{"name":"converter","type":[{"kind":"type","text":"Function","ref":"java.util.function.Function","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Function.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"S"},{"kind":"punct","text":", "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a function that produces the converted value of the mapping. May return "},{"kind":"code","text":"null"},{"kind":"text","text":" for reference target types. Returning "},{"kind":"code","text":"null"},{"kind":"text","text":" for a primitive conversion causes a "},{"kind":"link","target":{"id":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"},"code":true,"children":[{"kind":"text","text":"NullPointerException"}]},{"kind":"text","text":". May throw "},{"kind":"link","target":{"id":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"},"code":true,"children":[{"kind":"text","text":"ClassCastException"}]},{"kind":"text","text":" if the source value is not convertible."}]}]},{"name":"precedence","type":[{"kind":"type","text":"HostAccess.TargetMappingPrecedence","ref":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the precedence of the defined mapping which influences conversion order and precedence with default mappings and other target type mappings."}]}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"throws":[{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"for primitive target types."}]}]}],"doc":{"summary":[{"kind":"text","text":"Adds a custom source to target type mapping for Java host calls, host field assignments and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"explicit value conversions"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Adds a custom source to target type mapping for Java host calls, host field assignments and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"explicit value conversions"}]},{"kind":"text","text":". The source type specifies the static source type for the conversion. The target type specifies the exact and static target type of the mapping. Sub or base target types won't trigger the mapping. Custom target type mappings always have precedence over default mappings specified in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"Value.as(Class)"}]},{"kind":"text","text":", therefore allow to customize their behavior. The provided converter takes a value of the source type and converts it to the target type. If the mapping is only conditionally applicable then an accepts predicate may be specified. If the mapping is applicable for all source values with the specified source type then a "},{"kind":"code","text":"null"},{"kind":"text","text":" accepts predicate should be specified. The converter may throw a "},{"kind":"link","target":{"id":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"},"code":true,"children":[{"kind":"text","text":"ClassCastException"}]},{"kind":"text","text":" if the mapping is not applicable. It is recommended to return "},{"kind":"code","text":"false"},{"kind":"text","text":" in the accepts predicate if the mapping is not applicable instead of throwing an exception. Implementing the accepts predicate instead of throwing an exception also allows the implementation to perform better overload selection when a method with multiple overloads is invoked."}]},{"kind":"paragraph","children":[{"kind":"text","text":"All type mappings are applied recursively to generic types. A type mapping with the target type "},{"kind":"code","text":"String.class"},{"kind":"text","text":" will also be applied to the elements of a "},{"kind":"code","text":"List"},{"kind":"raw","html":"<string></string>","text":""},{"kind":"text","text":" mapping. This works for lists, maps, arrays and varargs parameters."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The source type uses the semantics of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"Value.as(Class)"}]},{"kind":"text","text":" to convert to the source value. Custom type mappings are not applied there. If the source type is not applicable to a value then the mapping will not be applied. For conversions that may accept any value the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"Value"}]},{"kind":"text","text":" should be used as source type."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Multiple mappings may be added for a source or target class. Multiple mappings are applied in the order they were added, grouped by the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence"},"code":true,"children":[{"kind":"text","text":"priority"}]},{"kind":"text","text":" where the highest priority group is applied first. See "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"Value.as(Class)"}]},{"kind":"text","text":" for a detailed ordered list of the conversion order used. The first mapping that accepts the source value will be used. If the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#HIGH"},"code":true,"children":[{"kind":"text","text":"default priority"}]},{"kind":"text","text":" is used then all custom target type mappings use the same precedence when an overloaded method is selected. This means that if two methods with a custom target type mapping are applicable for a set of arguments, an "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" is thrown at runtime. Using a non-default priority for the mapping allows to configure whether the method will be prioritized or deprioritized depending on the precedence."}]},{"kind":"paragraph","children":[{"kind":"text","text":"For example take a configured target mapping from "},{"kind":"code","text":"String"},{"kind":"text","text":" to "},{"kind":"code","text":"int"},{"kind":"text","text":" and two overloaded methods that takes an int or a "},{"kind":"link","target":{"id":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":" parameter. If this method is invoked with a "},{"kind":"code","text":"String"},{"kind":"text","text":" value then there are three possible outcomes depending on the precedence that was used for the custom mapping:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#HIGHEST"},"code":true,"children":[{"kind":"text","text":"TargetMappingPrecedence.HIGHEST"}]},{"kind":"text","text":": The int method overload will be selected and invoked as the target mapping has a higher precedence than default."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#HIGH"},"code":true,"children":[{"kind":"text","text":"TargetMappingPrecedence.HIGH"}]},{"kind":"text","text":": The execution fails with an error as all overloads have equivalent precedence."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#LOW"},"code":true,"children":[{"kind":"text","text":"TargetMappingPrecedence.LOW"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#LOWEST"},"code":true,"children":[{"kind":"text","text":"TargetMappingPrecedence.LOWEST"}]},{"kind":"text","text":": The String method overload will be selected and invoked as the target mapping has a lower precedence than default."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"In this example the outcome of low and lowest are equivalent. There are differences between low and lowest. See "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence"},"code":true,"children":[{"kind":"text","text":"TargetMappingPrecedence"}]},{"kind":"text","text":" for details."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"Primitive boxed target types will be applied to the primitive and boxed values. It is therefore enough to specify a target mapping to "},{"kind":"link","target":{"id":"java.lang.Integer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Integer.html"},"code":true,"children":[{"kind":"text","text":"Integer"}]},{"kind":"text","text":" to also map to the target type "},{"kind":"code","text":"int.class"},{"kind":"text","text":". If the converter returns "},{"kind":"code","text":"null"},{"kind":"text","text":" when converting to a primitive type, the conversion throws a "},{"kind":"link","target":{"id":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"},"code":true,"children":[{"kind":"text","text":"NullPointerException"}]},{"kind":"text","text":". Primitive target types can not be used as target types. They throw an "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" if used."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If the converter function or the accepts predicate calls "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"Value.as(Class)"}]},{"kind":"text","text":" recursively then custom target mappings are applied. Special care must be taken in order to not trigger stack overflow errors. It is recommended to use a restricted source type instead of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"Value.as(Class)"}]},{"kind":"text","text":" where possible. It is strongly discouraged that accept predicates or converter cause any side-effects or escape values for permanent storage."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Usage example:"}]},{"kind":"code","text":"public static class MyClass {\n\n    @HostAccess.Export\n    public void json(JsonObject c) {\n    }\n\n    @HostAccess.Export\n    public String intToString(String c) {\n        return c;\n    }\n}\n\npublic static class JsonObject {\n    JsonObject(Value v) {\n    }\n}\n\npublic static void main(String[] args) {\n    HostAccess.Builder builder = HostAccess.newBuilder();\n    builder.allowAccessAnnotatedBy(HostAccess.Export.class);\n    builder.targetTypeMapping(Value.class, JsonObject.class,\n                    (v) -> v.hasMembers() || v.hasArrayElements(),\n                    (v) -> new JsonObject(v)).build();\n\n    builder.targetTypeMapping(Integer.class, String.class, null,\n                    (v) -> v.toString());\n\n    HostAccess access = builder.build();\n    try (Context c = Context.newBuilder().allowHostAccess(access).build()) {\n        c.getBindings(\"js\").putMember(\"javaObject\", new MyClass());\n        c.eval(\"js\", \"javaObject.json({})\"); // works!\n        c.eval(\"js\", \"javaObject.json([])\"); // works!\n        try {\n            c.eval(\"js\", \"javaObject.json(42)\"); // fails!\n        } catch (PolyglotException e) {\n        }\n\n        c.eval(\"js\", \"javaObject.intToString(42)\"); // returns \"42\"\n    }\n}"}]},"since":"20.3","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1401}},{"id":"org.graalvm.polyglot.HostAccess$Builder#methodScoping(boolean)","anchor":"methodScoping(boolean)","kind":"method","name":"methodScoping","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"methodScoping"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"scopingDefault"},{"kind":"punct","text":")"}],"params":[{"name":"scopingDefault","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Sets the default scoping of callback function parameters."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets the default scoping of callback function parameters. Parameters escape from the scope of a function, if a reference to them is kept after the function returns. To use a value beyond the method scope "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#pin()"},"code":true,"children":[{"kind":"text","text":"Value.pin()"}]},{"kind":"text","text":" may be used."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#pin()"},"code":true,"children":[{"kind":"text","text":"Value.pin()"}]}]]},"since":"21.3","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1430}},{"id":"org.graalvm.polyglot.HostAccess$Builder#disableMethodScopingAnnotatedBy(java.lang.Class)","anchor":"disableMethodScopingAnnotatedBy(java.lang.Class)","kind":"method","name":"disableMethodScopingAnnotatedBy","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"disableMethodScopingAnnotatedBy"},{"kind":"punct","text":"("},{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<? "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"Annotation","ref":"java.lang.annotation.Annotation","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/annotation/Annotation.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"annotation"},{"kind":"punct","text":")"}],"params":[{"name":"annotation","type":[{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<? "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"Annotation","ref":"java.lang.annotation.Annotation","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/annotation/Annotation.html"},{"kind":"punct","text":">"}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Function parameters of a method annotated with the specified annotation are not scoped."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Function parameters of a method annotated with the specified annotation are not scoped."}]}]},"since":"21.3","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1440}},{"id":"org.graalvm.polyglot.HostAccess$Builder#disableMethodScoping(java.lang.reflect.Executable)","anchor":"disableMethodScoping(java.lang.reflect.Executable)","kind":"method","name":"disableMethodScoping","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"disableMethodScoping"},{"kind":"punct","text":"("},{"kind":"type","text":"Executable","ref":"java.lang.reflect.Executable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/reflect/Executable.html"},{"kind":"punct","text":" "},{"kind":"param","text":"e"},{"kind":"punct","text":")"}],"params":[{"name":"e","type":[{"kind":"type","text":"Executable","ref":"java.lang.reflect.Executable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/reflect/Executable.html"}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Function parameters of the specified executable escape the executable's scope."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Function parameters of the specified executable escape the executable's scope."}]}]},"since":"21.3","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1454}},{"id":"org.graalvm.polyglot.HostAccess$Builder#useModuleLookup(java.lang.invoke.MethodHandles.Lookup)","anchor":"useModuleLookup(java.lang.invoke.MethodHandles.Lookup)","kind":"method","name":"useModuleLookup","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"useModuleLookup"},{"kind":"punct","text":"("},{"kind":"type","text":"MethodHandles.Lookup","ref":"java.lang.invoke.MethodHandles$Lookup","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/invoke/MethodHandles.Lookup.html"},{"kind":"punct","text":" "},{"kind":"param","text":"lookup"},{"kind":"punct","text":")"}],"params":[{"name":"lookup","type":[{"kind":"type","text":"MethodHandles.Lookup","ref":"java.lang.invoke.MethodHandles$Lookup","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/invoke/MethodHandles.Lookup.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"lookup from a named module to be used for host access."}]}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.Builder","ref":"org.graalvm.polyglot.HostAccess$Builder"}]},"throws":[{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the passed lookup is not from a named module."}]}]}],"doc":{"summary":[{"kind":"text","text":"Sets the "},{"kind":"link","target":{"id":"java.lang.invoke.MethodHandles$Lookup","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/invoke/MethodHandles.Lookup.html"},"code":true,"children":[{"kind":"text","text":"lookup"}]},{"kind":"text","text":" the guest application should use to find and access classes on the host side in "},{"kind":"link","target":{"id":"java.lang.Module","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Module.html"},"code":true,"children":[{"kind":"text","text":"modularized"}]},{"kind":"text","text":" host applications."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets the "},{"kind":"link","target":{"id":"java.lang.invoke.MethodHandles$Lookup","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/invoke/MethodHandles.Lookup.html"},"code":true,"children":[{"kind":"text","text":"lookup"}]},{"kind":"text","text":" the guest application should use to find and access classes on the host side in "},{"kind":"link","target":{"id":"java.lang.Module","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Module.html"},"code":true,"children":[{"kind":"text","text":"modularized"}]},{"kind":"text","text":" host applications. This allows guest applications to find and access public classes that are not directly exported by the lookup module, or public classes that are exported to the module only through qualified exports. Access to classes in the unnamed module is not affected by the use of this method."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Pass "},{"kind":"code","text":"MethodHandles.lookup()"},{"kind":"text","text":" from a named module to export its access privileges to the guest application."}]},{"kind":"paragraph","children":[{"kind":"text","text":"It is requited that the lookup module is a named module, i.e., "},{"kind":"code","text":"lookup.lookupClass().getModule().isNamed()"},{"kind":"text","text":" must be "},{"kind":"code","text":"true"},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Note that even though the provided lookup may provide access to non-public classes or members, the access will be restricted to classes or members with public visibility."}]},{"kind":"paragraph","children":[{"kind":"text","text":"By default, "},{"kind":"link","target":{"id":"java.lang.invoke.MethodHandles#publicLookup()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/invoke/MethodHandles.html#publicLookup()"},"code":true,"children":[{"kind":"text","text":"MethodHandles.publicLookup()"}]},{"kind":"text","text":" is used to access host classes which can only access classes from the unnamed module and classes exported to the unnamed module."}]},{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.lang.invoke.MethodHandles#publicLookup()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/invoke/MethodHandles.html#publicLookup()"},"code":true,"children":[{"kind":"text","text":"MethodHandles.publicLookup()"}]},{"kind":"text","text":" is also used for classes from the unnamed module even if another lookup is specified by this method. Therefore, the guest application can still add classes to the classpath and access them even though a custom lookup from a named module is specified."}]}]},"since":"23.1","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1492}},{"id":"org.graalvm.polyglot.HostAccess$Builder#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"25.3","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1506}},{"id":"org.graalvm.polyglot.HostAccess$Builder#build()","anchor":"build()","kind":"method","name":"build","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"},{"kind":"punct","text":" "},{"kind":"name","text":"build"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"HostAccess","ref":"org.graalvm.polyglot.HostAccess"}]},"doc":{"summary":[{"kind":"text","text":"Creates an instance of the custom host access configuration."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates an instance of the custom host access configuration."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":1612}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Builder to create a custom "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"host access policy"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Builder to create a custom "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"host access policy"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":868}},{"id":"org.graalvm.polyglot.HostAccess$DisableMethodScoping","name":"HostAccess.DisableMethodScoping","kind":"annotation","language":"java","modifiers":["public"],"annotations":[[{"kind":"annotation","text":"@Retention","ref":"java.lang.annotation.Retention","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/annotation/Retention.html"},{"kind":"punct","text":"("},{"kind":"literal","text":"RUNTIME"},{"kind":"punct","text":")"}],[{"kind":"annotation","text":"@Target","ref":"java.lang.annotation.Target","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/annotation/Target.html"},{"kind":"punct","text":"("},{"kind":"literal","text":"{CONSTRUCTOR, METHOD}"},{"kind":"punct","text":")"}]],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"@interface"},{"kind":"punct","text":" "},{"kind":"name","text":"HostAccess.DisableMethodScoping"}],"enclosing":"org.graalvm.polyglot.HostAccess","doc":{"summary":[{"kind":"text","text":"If "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#SCOPED"},"code":true,"children":[{"kind":"text","text":"HostAccess.SCOPED"}]},{"kind":"text","text":" is used, placing this annotation on an exported host function excludes it from parameter scoping, i.e."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"If "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#SCOPED"},"code":true,"children":[{"kind":"text","text":"HostAccess.SCOPED"}]},{"kind":"text","text":" is used, placing this annotation on an exported host function excludes it from parameter scoping, i.e. parameters will not be released after invocation of a callback."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#SCOPED"},"code":true,"children":[{"kind":"text","text":"HostAccess.SCOPED"}]}]]},"since":"21.3","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":801}},{"id":"org.graalvm.polyglot.HostAccess$Export","name":"HostAccess.Export","kind":"annotation","language":"java","modifiers":["public"],"annotations":[[{"kind":"annotation","text":"@Target","ref":"java.lang.annotation.Target","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/annotation/Target.html"},{"kind":"punct","text":"("},{"kind":"literal","text":"{CONSTRUCTOR, FIELD, METHOD}"},{"kind":"punct","text":")"}],[{"kind":"annotation","text":"@Retention","ref":"java.lang.annotation.Retention","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/annotation/Retention.html"},{"kind":"punct","text":"("},{"kind":"literal","text":"RUNTIME"},{"kind":"punct","text":")"}]],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"@interface"},{"kind":"punct","text":" "},{"kind":"name","text":"HostAccess.Export"}],"enclosing":"org.graalvm.polyglot.HostAccess","doc":{"summary":[{"kind":"text","text":"Annotation used by the predefined "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#EXPLICIT"},"code":true,"children":[{"kind":"text","text":"EXPLICIT"}]},{"kind":"text","text":" access policy to mark public constructors, methods and fields in public classes that should be accessible by the guest application."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Annotation used by the predefined "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#EXPLICIT"},"code":true,"children":[{"kind":"text","text":"EXPLICIT"}]},{"kind":"text","text":" access policy to mark public constructors, methods and fields in public classes that should be accessible by the guest application."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Example"}]},{"kind":"text","text":" using a Java object from JavaScript:"}]},{"kind":"code","text":"public class JavaRecord {\n    @HostAccess.Export public int x;\n\n    @HostAccess.Export\n    public String name() {\n        return \"foo\";\n    }\n}\ntry (Context context = Context.create()) {\n    JavaRecord record = new JavaRecord();\n    context.getBindings(\"js\").putMember(\"javaRecord\", record);\n    context.eval(\"js\", \"javaRecord.x = 42\");\n    context.eval(\"js\", \"javaRecord.name()\").asString().equals(\"foo\");\n}"}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostAccess(org.graalvm.polyglot.HostAccess)"},"code":true,"children":[{"kind":"text","text":"Context.Builder.allowHostAccess(HostAccess)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#EXPLICIT"},"code":true,"children":[{"kind":"text","text":"HostAccess.EXPLICIT"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":733}},{"id":"org.graalvm.polyglot.HostAccess$Implementable","name":"HostAccess.Implementable","kind":"annotation","language":"java","modifiers":["public"],"annotations":[[{"kind":"annotation","text":"@Retention","ref":"java.lang.annotation.Retention","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/annotation/Retention.html"},{"kind":"punct","text":"("},{"kind":"literal","text":"RUNTIME"},{"kind":"punct","text":")"}],[{"kind":"annotation","text":"@Target","ref":"java.lang.annotation.Target","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/annotation/Target.html"},{"kind":"punct","text":"("},{"kind":"literal","text":"{TYPE}"},{"kind":"punct","text":")"}]],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"@interface"},{"kind":"punct","text":" "},{"kind":"name","text":"HostAccess.Implementable"}],"enclosing":"org.graalvm.polyglot.HostAccess","doc":{"summary":[{"kind":"text","text":"Allows guest language to implement a Java type."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows guest language to implement a Java type. Implementable is required if the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#EXPLICIT"},"code":true,"children":[{"kind":"text","text":"explicit"}]},{"kind":"text","text":" host access policy is set. The annotation to use for this purpose can be customized with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowImplementationsAnnotatedBy(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"Builder.allowImplementationsAnnotatedBy(Class)"}]},{"kind":"text","text":". Allowing implementations for all Java interfaces can be enabled with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAllImplementations(boolean)"},"code":true,"children":[{"kind":"text","text":"Builder.allowAllImplementations(boolean)"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostAccess(org.graalvm.polyglot.HostAccess)"},"code":true,"children":[{"kind":"text","text":"Context.Builder.allowHostAccess(HostAccess)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"Value.as(Class)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#EXPLICIT"},"code":true,"children":[{"kind":"text","text":"HostAccess.EXPLICIT"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":750}},{"id":"org.graalvm.polyglot.HostAccess$MutableTargetMapping","name":"HostAccess.MutableTargetMapping","kind":"enum","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"enum"},{"kind":"punct","text":" "},{"kind":"name","text":"HostAccess.MutableTargetMapping"}],"superclass":[{"kind":"type","text":"Enum","ref":"java.lang.Enum","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"HostAccess.MutableTargetMapping","ref":"org.graalvm.polyglot.HostAccess$MutableTargetMapping"},{"kind":"punct","text":">"}],"ancestors":[{"id":"java.lang.Enum","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html"},{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"enclosing":"org.graalvm.polyglot.HostAccess","members":[{"id":"org.graalvm.polyglot.HostAccess$MutableTargetMapping#values()","anchor":"values()","kind":"method","name":"values","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.MutableTargetMapping","ref":"org.graalvm.polyglot.HostAccess$MutableTargetMapping"},{"kind":"punct","text":"[] "},{"kind":"name","text":"values"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"HostAccess.MutableTargetMapping","ref":"org.graalvm.polyglot.HostAccess$MutableTargetMapping"},{"kind":"punct","text":"[]"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the enum constants in declaration order."}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the enum constants in declaration order."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the enum constants in declaration order."}]}]}},{"id":"org.graalvm.polyglot.HostAccess$MutableTargetMapping#valueOf(java.lang.String)","anchor":"valueOf(java.lang.String)","kind":"method","name":"valueOf","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.MutableTargetMapping","ref":"org.graalvm.polyglot.HostAccess$MutableTargetMapping"},{"kind":"punct","text":" "},{"kind":"name","text":"valueOf"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"name"},{"kind":"punct","text":")"}],"params":[{"name":"name","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"The exact name of the enum constant."}]}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.MutableTargetMapping","ref":"org.graalvm.polyglot.HostAccess$MutableTargetMapping"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the enum constant with the given name."}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the enum constant with the given name."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the enum constant with the given name."}]}]}},{"id":"org.graalvm.polyglot.HostAccess$MutableTargetMapping#ARRAY_TO_JAVA_LIST","anchor":"ARRAY_TO_JAVA_LIST","kind":"enumConstant","name":"ARRAY_TO_JAVA_LIST","signature":[{"kind":"name","text":"ARRAY_TO_JAVA_LIST"}],"type":[{"kind":"type","text":"HostAccess.MutableTargetMapping","ref":"org.graalvm.polyglot.HostAccess$MutableTargetMapping"}],"doc":{"summary":[{"kind":"text","text":"Enables default mapping of guest object arrays to host object "},{"kind":"link","target":{"id":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},"code":true,"children":[{"kind":"text","text":"java.util.List"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Enables default mapping of guest object arrays to host object "},{"kind":"link","target":{"id":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},"code":true,"children":[{"kind":"text","text":"java.util.List"}]},{"kind":"text","text":". This mapping is also applied when the target host object is "},{"kind":"link","target":{"id":"java.util.Collection","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Collection.html"},"code":true,"children":[{"kind":"text","text":"java.util.Collection"}]},{"kind":"text","text":"."}]}]},"source":{"path":"org/graalvm/polyglot/HostAccess.java","line":311}},{"id":"org.graalvm.polyglot.HostAccess$MutableTargetMapping#ITERATOR_TO_JAVA_ITERATOR","anchor":"ITERATOR_TO_JAVA_ITERATOR","kind":"enumConstant","name":"ITERATOR_TO_JAVA_ITERATOR","signature":[{"kind":"name","text":"ITERATOR_TO_JAVA_ITERATOR"}],"type":[{"kind":"type","text":"HostAccess.MutableTargetMapping","ref":"org.graalvm.polyglot.HostAccess$MutableTargetMapping"}],"doc":{"summary":[{"kind":"text","text":"Enables default mapping of guest object iterators to host object "},{"kind":"link","target":{"id":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},"code":true,"children":[{"kind":"text","text":"java.util.Iterator"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Enables default mapping of guest object iterators to host object "},{"kind":"link","target":{"id":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},"code":true,"children":[{"kind":"text","text":"java.util.Iterator"}]},{"kind":"text","text":"."}]}]},"source":{"path":"org/graalvm/polyglot/HostAccess.java","line":316}},{"id":"org.graalvm.polyglot.HostAccess$MutableTargetMapping#ITERABLE_TO_JAVA_ITERABLE","anchor":"ITERABLE_TO_JAVA_ITERABLE","kind":"enumConstant","name":"ITERABLE_TO_JAVA_ITERABLE","signature":[{"kind":"name","text":"ITERABLE_TO_JAVA_ITERABLE"}],"type":[{"kind":"type","text":"HostAccess.MutableTargetMapping","ref":"org.graalvm.polyglot.HostAccess$MutableTargetMapping"}],"doc":{"summary":[{"kind":"text","text":"Enables default mapping of guest object iterables to host object "},{"kind":"link","target":{"id":"java.lang.Iterable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html"},"code":true,"children":[{"kind":"text","text":"java.lang.Iterable"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Enables default mapping of guest object iterables to host object "},{"kind":"link","target":{"id":"java.lang.Iterable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html"},"code":true,"children":[{"kind":"text","text":"java.lang.Iterable"}]},{"kind":"text","text":"."}]}]},"source":{"path":"org/graalvm/polyglot/HostAccess.java","line":321}},{"id":"org.graalvm.polyglot.HostAccess$MutableTargetMapping#HASH_TO_JAVA_MAP","anchor":"HASH_TO_JAVA_MAP","kind":"enumConstant","name":"HASH_TO_JAVA_MAP","signature":[{"kind":"name","text":"HASH_TO_JAVA_MAP"}],"type":[{"kind":"type","text":"HostAccess.MutableTargetMapping","ref":"org.graalvm.polyglot.HostAccess$MutableTargetMapping"}],"doc":{"summary":[{"kind":"text","text":"Enables default mapping of guest object hashes to host object "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"java.util.Map"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Enables default mapping of guest object hashes to host object "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"java.util.Map"}]},{"kind":"text","text":"."}]}]},"source":{"path":"org/graalvm/polyglot/HostAccess.java","line":325}},{"id":"org.graalvm.polyglot.HostAccess$MutableTargetMapping#MEMBERS_TO_JAVA_MAP","anchor":"MEMBERS_TO_JAVA_MAP","kind":"enumConstant","name":"MEMBERS_TO_JAVA_MAP","signature":[{"kind":"name","text":"MEMBERS_TO_JAVA_MAP"}],"type":[{"kind":"type","text":"HostAccess.MutableTargetMapping","ref":"org.graalvm.polyglot.HostAccess$MutableTargetMapping"}],"doc":{"summary":[{"kind":"text","text":"Enables default mapping of guest objects with members to "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"java.util.Map"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Enables default mapping of guest objects with members to "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"java.util.Map"}]},{"kind":"text","text":"."}]}]},"source":{"path":"org/graalvm/polyglot/HostAccess.java","line":329}},{"id":"org.graalvm.polyglot.HostAccess$MutableTargetMapping#MEMBERS_TO_JAVA_INTERFACE","anchor":"MEMBERS_TO_JAVA_INTERFACE","kind":"enumConstant","name":"MEMBERS_TO_JAVA_INTERFACE","signature":[{"kind":"name","text":"MEMBERS_TO_JAVA_INTERFACE"}],"type":[{"kind":"type","text":"HostAccess.MutableTargetMapping","ref":"org.graalvm.polyglot.HostAccess$MutableTargetMapping"}],"doc":{"summary":[{"kind":"text","text":"Enables default mapping of guest objects with members to a Java interface."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Enables default mapping of guest objects with members to a Java interface."}]}]},"source":{"path":"org/graalvm/polyglot/HostAccess.java","line":333}},{"id":"org.graalvm.polyglot.HostAccess$MutableTargetMapping#EXECUTABLE_TO_JAVA_INTERFACE","anchor":"EXECUTABLE_TO_JAVA_INTERFACE","kind":"enumConstant","name":"EXECUTABLE_TO_JAVA_INTERFACE","signature":[{"kind":"name","text":"EXECUTABLE_TO_JAVA_INTERFACE"}],"type":[{"kind":"type","text":"HostAccess.MutableTargetMapping","ref":"org.graalvm.polyglot.HostAccess$MutableTargetMapping"}],"doc":{"summary":[{"kind":"text","text":"Enables default mapping of executable guest objects to a "},{"kind":"link","target":{"id":"java.lang.FunctionalInterface","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/FunctionalInterface.html"},"code":true,"children":[{"kind":"text","text":"java.lang.FunctionalInterface"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Enables default mapping of executable guest objects to a "},{"kind":"link","target":{"id":"java.lang.FunctionalInterface","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/FunctionalInterface.html"},"code":true,"children":[{"kind":"text","text":"java.lang.FunctionalInterface"}]},{"kind":"text","text":"."}]}]},"source":{"path":"org/graalvm/polyglot/HostAccess.java","line":338}}],"inherited":[{"from":{"id":"java.lang.Enum","text":"Enum","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html"},"kind":"class","members":[{"id":"java.lang.Enum#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#clone()"},{"id":"java.lang.Enum#compareTo(E)","text":"compareTo","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#compareTo(E)"},{"id":"java.lang.Enum#describeConstable()","text":"describeConstable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#describeConstable()"},{"id":"java.lang.Enum#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#equals(java.lang.Object)"},{"id":"java.lang.Enum#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#finalize()"},{"id":"java.lang.Enum#getDeclaringClass()","text":"getDeclaringClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#getDeclaringClass()"},{"id":"java.lang.Enum#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#hashCode()"},{"id":"java.lang.Enum#name()","text":"name","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#name()"},{"id":"java.lang.Enum#ordinal()","text":"ordinal","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#ordinal()"},{"id":"java.lang.Enum#toString()","text":"toString","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#toString()"},{"id":"java.lang.Enum#valueOf(java.lang.Class,java.lang.String)","text":"valueOf","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#valueOf(java.lang.Class,java.lang.String)"}]},{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"List of default host object mappings of mutable target types available in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"Value.as(Class)"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"List of default host object mappings of mutable target types available in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"Value.as(Class)"}]},{"kind":"text","text":". The mappings map guest object traits to host object types."}]}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":306}},{"id":"org.graalvm.polyglot.HostAccess$Optimized","name":"HostAccess.Optimized","kind":"annotation","language":"java","modifiers":["public"],"annotations":[[{"kind":"annotation","text":"@Documented","ref":"java.lang.annotation.Documented","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/annotation/Documented.html"}],[{"kind":"annotation","text":"@Retention","ref":"java.lang.annotation.Retention","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/annotation/Retention.html"},{"kind":"punct","text":"("},{"kind":"literal","text":"RUNTIME"},{"kind":"punct","text":")"}],[{"kind":"annotation","text":"@Target","ref":"java.lang.annotation.Target","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/annotation/Target.html"},{"kind":"punct","text":"("},{"kind":"literal","text":"{TYPE}"},{"kind":"punct","text":")"}]],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"@interface"},{"kind":"punct","text":" "},{"kind":"name","text":"HostAccess.Optimized"}],"enclosing":"org.graalvm.polyglot.HostAccess","doc":{"summary":[{"kind":"text","text":"Requests an implementation optimized for invocation speed when converting a guest value to this interface with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"Value.as(Class)"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Requests an implementation optimized for invocation speed when converting a guest value to this interface with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"Value.as(Class)"}]},{"kind":"text","text":". Use this annotation for interfaces whose methods are called frequently from Java."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Interfaces may declare multiple methods. In Native Image, annotated interfaces included in the image are available for conversion without additional proxy configuration."}]},{"kind":"code","text":"@HostAccess.Optimized\n@FunctionalInterface\npublic interface Adder {\n    int add(int left, int right);\n}\n\ntry (Context context = Context.newBuilder(\"js\")\n                .allowHostAccess(HostAccess.EXPLICIT)\n                .build()) {\n    Adder adder = context.eval(\"js\", \"(x, y) => x + y\").as(Adder.class);\n    assert adder.add(40, 2) == 42;\n}"},{"kind":"paragraph","children":[{"kind":"text","text":"This annotation does not authorize host access. Conversion remains subject to the configured "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"HostAccess"}]},{"kind":"text","text":" policy. It also does not guarantee allocation-free conversion or invocation. Only non-sealed interfaces are currently supported. The interface and reference types in its method signatures must be public and their packages must be exported to unnamed modules."}]}]},"since":"25.7","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":786}},{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence","name":"HostAccess.TargetMappingPrecedence","kind":"enum","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"enum"},{"kind":"punct","text":" "},{"kind":"name","text":"HostAccess.TargetMappingPrecedence"}],"superclass":[{"kind":"type","text":"Enum","ref":"java.lang.Enum","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"HostAccess.TargetMappingPrecedence","ref":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence"},{"kind":"punct","text":">"}],"ancestors":[{"id":"java.lang.Enum","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html"},{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"enclosing":"org.graalvm.polyglot.HostAccess","members":[{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#values()","anchor":"values()","kind":"method","name":"values","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.TargetMappingPrecedence","ref":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence"},{"kind":"punct","text":"[] "},{"kind":"name","text":"values"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"HostAccess.TargetMappingPrecedence","ref":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence"},{"kind":"punct","text":"[]"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the enum constants in declaration order."}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the enum constants in declaration order."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the enum constants in declaration order."}]}]}},{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#valueOf(java.lang.String)","anchor":"valueOf(java.lang.String)","kind":"method","name":"valueOf","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"HostAccess.TargetMappingPrecedence","ref":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence"},{"kind":"punct","text":" "},{"kind":"name","text":"valueOf"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"name"},{"kind":"punct","text":")"}],"params":[{"name":"name","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"The exact name of the enum constant."}]}]}],"returns":{"type":[{"kind":"type","text":"HostAccess.TargetMappingPrecedence","ref":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the enum constant with the given name."}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the enum constant with the given name."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the enum constant with the given name."}]}]}},{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#HIGHEST","anchor":"HIGHEST","kind":"enumConstant","name":"HIGHEST","signature":[{"kind":"name","text":"HIGHEST"}],"type":[{"kind":"type","text":"HostAccess.TargetMappingPrecedence","ref":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence"}],"doc":{"summary":[{"kind":"text","text":"Defines higher precedence and conversion order as all default mappings and target type mappings with lower precedence."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Defines higher precedence and conversion order as all default mappings and target type mappings with lower precedence."}]}]},"since":"20.3","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":832}},{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#HIGH","anchor":"HIGH","kind":"enumConstant","name":"HIGH","signature":[{"kind":"name","text":"HIGH"}],"type":[{"kind":"type","text":"HostAccess.TargetMappingPrecedence","ref":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence"}],"doc":{"summary":[{"kind":"text","text":"Defines high or default precedence and conversion order for a target type mapping."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Defines high or default precedence and conversion order for a target type mapping. This precedence makes mappings be used before all other default mappings and treated with equal overload precedence as default loss less mappings like primitive coercions."}]}]},"since":"20.3","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":841}},{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#LOW","anchor":"LOW","kind":"enumConstant","name":"LOW","signature":[{"kind":"name","text":"LOW"}],"type":[{"kind":"type","text":"HostAccess.TargetMappingPrecedence","ref":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence"}],"doc":{"summary":[{"kind":"text","text":"Defines low precedence and conversion order for a target type mapping."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Defines low precedence and conversion order for a target type mapping. This precedence makes mappings be used before all other default lossy mappings and treated with equal overload precedence as default lossy mappings, like mappings to Map."}]}]},"since":"20.3","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":850}},{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#LOWEST","anchor":"LOWEST","kind":"enumConstant","name":"LOWEST","signature":[{"kind":"name","text":"LOWEST"}],"type":[{"kind":"type","text":"HostAccess.TargetMappingPrecedence","ref":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence"}],"doc":{"summary":[{"kind":"text","text":"Defines lowest precedence and conversion order for a target type mapping."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Defines lowest precedence and conversion order for a target type mapping. This precedence makes mappings be used after all other default mappings and treated with lower overload precedence as all default mappings or other target type mappings."}]}]},"since":"20.3","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":859}}],"inherited":[{"from":{"id":"java.lang.Enum","text":"Enum","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html"},"kind":"class","members":[{"id":"java.lang.Enum#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#clone()"},{"id":"java.lang.Enum#compareTo(E)","text":"compareTo","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#compareTo(E)"},{"id":"java.lang.Enum#describeConstable()","text":"describeConstable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#describeConstable()"},{"id":"java.lang.Enum#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#equals(java.lang.Object)"},{"id":"java.lang.Enum#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#finalize()"},{"id":"java.lang.Enum#getDeclaringClass()","text":"getDeclaringClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#getDeclaringClass()"},{"id":"java.lang.Enum#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#hashCode()"},{"id":"java.lang.Enum#name()","text":"name","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#name()"},{"id":"java.lang.Enum#ordinal()","text":"ordinal","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#ordinal()"},{"id":"java.lang.Enum#toString()","text":"toString","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#toString()"},{"id":"java.lang.Enum#valueOf(java.lang.Class,java.lang.String)","text":"valueOf","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#valueOf(java.lang.Class,java.lang.String)"}]},{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Represents the precedence of a target type mapping."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Represents the precedence of a target type mapping. The precedence influences target type mappings in two ways:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"text","text":"The conversion order in which target mappings are performed. "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#HIGHEST"},"code":true,"children":[{"kind":"text","text":"Highest"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#HIGH"},"code":true,"children":[{"kind":"text","text":"high"}]},{"kind":"text","text":" precedences are invoked before all "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"default mappings"}]},{"kind":"text","text":". "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#LOW"},"code":true,"children":[{"kind":"text","text":"Low"}]},{"kind":"text","text":" after all loss less conversions and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#LOWEST"},"code":true,"children":[{"kind":"text","text":"lowest"}]},{"kind":"text","text":" after all other default mappings."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"To disambiguate multiple selected overloads on method invocation. The overload precedence defines which method has precedence over other applicable methods. "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#HIGHEST"},"code":true,"children":[{"kind":"text","text":"Highest"}]},{"kind":"text","text":" have higher and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#HIGH"},"code":true,"children":[{"kind":"text","text":"high"}]},{"kind":"text","text":" have the same precedence as the default loss-less mapping. The precedence "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#LOW"},"code":true,"children":[{"kind":"text","text":"low"}]},{"kind":"text","text":" declares equal precedence than all lossy coercions and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#LOWEST"},"code":true,"children":[{"kind":"text","text":"lowest"}]},{"kind":"text","text":" defines precedence lower than all default mappings."}]}]]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"for detailed information on conversion order."}]}]]},"since":"20.3","source":{"path":"org/graalvm/polyglot/HostAccess.java","line":824}},{"id":"org.graalvm.polyglot.Instrument","name":"Instrument","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"Instrument"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.polyglot.Instrument#getId()","anchor":"getId()","kind":"method","name":"getId","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getId"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the unique ID for this instrument."}]}]},"doc":{"summary":[{"kind":"text","text":"Gets the ID clients can use to acquire this instrument."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Gets the ID clients can use to acquire this instrument."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Instrument.java","line":81}},{"id":"org.graalvm.polyglot.Instrument#getName()","anchor":"getName()","kind":"method","name":"getName","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getName"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the user-friendly name for this instrument."}]}]},"doc":{"summary":[{"kind":"text","text":"Gets a human-readable name for this instrument."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Gets a human-readable name for this instrument."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Instrument.java","line":91}},{"id":"org.graalvm.polyglot.Instrument#getOptions()","anchor":"getOptions()","kind":"method","name":"getOptions","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionDescriptors","ref":"org.graalvm.options.OptionDescriptors"},{"kind":"punct","text":" "},{"kind":"name","text":"getOptions"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"OptionDescriptors","ref":"org.graalvm.options.OptionDescriptors"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the options as "},{"kind":"link","target":{"id":"org.graalvm.options.OptionDescriptors"},"code":true,"children":[{"kind":"text","text":"OptionDescriptors"}]},{"kind":"text","text":"."}]}]},"doc":{"summary":[{"kind":"text","text":"Gets the options available for this instrument."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Gets the options available for this instrument."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Instrument.java","line":101}},{"id":"org.graalvm.polyglot.Instrument#getSourceOptions()","anchor":"getSourceOptions()","kind":"method","name":"getSourceOptions","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionDescriptors","ref":"org.graalvm.options.OptionDescriptors"},{"kind":"punct","text":" "},{"kind":"name","text":"getSourceOptions"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"OptionDescriptors","ref":"org.graalvm.options.OptionDescriptors"}]},"doc":{"summary":[{"kind":"text","text":"Returns the source options descriptors available for sources of this instrument."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the source options descriptors available for sources of this instrument."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Instrument#getOptions()"},"code":true,"children":[{"kind":"text","text":"getOptions()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"Source.Builder.option(String, String)"}]}]]},"since":"25.0","source":{"path":"org/graalvm/polyglot/Instrument.java","line":112}},{"id":"org.graalvm.polyglot.Instrument#getVersion()","anchor":"getVersion()","kind":"method","name":"getVersion","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getVersion"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the version of this instrument."}]}]},"doc":{"summary":[{"kind":"text","text":"Gets the version of this instrument."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Gets the version of this instrument."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Instrument.java","line":122}},{"id":"org.graalvm.polyglot.Instrument#lookup(java.lang.Class)","anchor":"lookup(java.lang.Class)","kind":"method","name":"lookup","modifiers":["public"],"typeParams":[{"name":"T","doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the type of the internal service."}]}]}],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" <"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"name","text":"lookup"},{"kind":"punct","text":"("},{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"param","text":"type"},{"kind":"punct","text":")"}],"params":[{"name":"type","type":[{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"class of the service that is being requested."}]}]}],"returns":{"type":[{"kind":"typeParam","text":"T"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"instance of requested type, "},{"kind":"code","text":"null"},{"kind":"text","text":" if no such service is available."}]}]},"doc":{"summary":[{"kind":"text","text":"Looks up an additional internal service that is provided by this instrument using a Java type."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"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."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Instrument.java","line":136}},{"id":"org.graalvm.polyglot.Instrument#getWebsite()","anchor":"getWebsite()","kind":"method","name":"getWebsite","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getWebsite"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the website of this instrument."}]}]},"doc":{"summary":[{"kind":"text","text":"Gets the website of this instrument."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Gets the website of this instrument."}]}]},"since":"22.1.0","source":{"path":"org/graalvm/polyglot/Instrument.java","line":146}},{"id":"org.graalvm.polyglot.Instrument#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"25.3","source":{"path":"org/graalvm/polyglot/Instrument.java","line":155}},{"id":"org.graalvm.polyglot.Instrument#hashCode()","anchor":"hashCode()","kind":"method","name":"hashCode","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"hashCode"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"overrides":{"id":"java.lang.Object#hashCode()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},"since":"24.2","source":{"path":"org/graalvm/polyglot/Instrument.java","line":165}},{"id":"org.graalvm.polyglot.Instrument#equals(java.lang.Object)","anchor":"equals(java.lang.Object)","kind":"method","name":"equals","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"equals"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"obj"},{"kind":"punct","text":")"}],"params":[{"name":"obj","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"overrides":{"id":"java.lang.Object#equals(java.lang.Object)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},"since":"24.2","source":{"path":"org/graalvm/polyglot/Instrument.java","line":175}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"A handle for an "},{"kind":"emphasis","children":[{"kind":"text","text":"instrument"}]},{"kind":"text","text":" installed in an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"A handle for an "},{"kind":"emphasis","children":[{"kind":"text","text":"instrument"}]},{"kind":"text","text":" installed in an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":". The instrument is usable from other threads. The handle provides access to the metadata of the instrument and allows to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Instrument#lookup(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"lookup"}]},{"kind":"text","text":" instrument specific services."}]},{"kind":"paragraph","children":[{"kind":"text","text":"All methods here, as well as instrumentation services in general, can be used safely from any thread."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#getInstruments()"},"code":true,"children":[{"kind":"text","text":"Engine.getInstruments()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Instrument.java","line":59}},{"id":"org.graalvm.polyglot.Language","name":"Language","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"Language"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.polyglot.Language#getId()","anchor":"getId()","kind":"method","name":"getId","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getId"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a language ID string."}]}]},"doc":{"summary":[{"kind":"text","text":"Gets the primary identification string of this language."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Gets the primary identification string of this language. The language id is used as the primary way of identifying languages in the polyglot API. (eg. "},{"kind":"code","text":"js"},{"kind":"text","text":")"}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Language.java","line":81}},{"id":"org.graalvm.polyglot.Language#getName()","anchor":"getName()","kind":"method","name":"getName","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getName"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the user-friendly name for this language."}]}]},"doc":{"summary":[{"kind":"text","text":"Gets a human-readable name for the language (for example, \"JavaScript\")."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Gets a human-readable name for the language (for example, \"JavaScript\")."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Language.java","line":91}},{"id":"org.graalvm.polyglot.Language#getImplementationName()","anchor":"getImplementationName()","kind":"method","name":"getImplementationName","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getImplementationName"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"doc":{"summary":[{"kind":"text","text":"Gets a human-readable name of the language implementation (for example, \"Graal.JS\")."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Gets a human-readable name of the language implementation (for example, \"Graal.JS\"). Returns "},{"kind":"code","text":"null"},{"kind":"text","text":" if no implementation name was specified."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Language.java","line":101}},{"id":"org.graalvm.polyglot.Language#getVersion()","anchor":"getVersion()","kind":"method","name":"getVersion","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getVersion"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"doc":{"summary":[{"kind":"text","text":"Gets the version information of the language in an arbitrary language-specific format."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Gets the version information of the language in an arbitrary language-specific format."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Language.java","line":110}},{"id":"org.graalvm.polyglot.Language#isInteractive()","anchor":"isInteractive()","kind":"method","name":"isInteractive","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isInteractive"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if a the language is suitable for interactive evaluation of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"sources"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if a the language is suitable for interactive evaluation of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"sources"}]},{"kind":"text","text":". "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#isInteractive()"},"code":true,"children":[{"kind":"text","text":"Interactive"}]},{"kind":"text","text":" languages should be displayed in interactive environments and presented to the user."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Language.java","line":121}},{"id":"org.graalvm.polyglot.Language#getOptions()","anchor":"getOptions()","kind":"method","name":"getOptions","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionDescriptors","ref":"org.graalvm.options.OptionDescriptors"},{"kind":"punct","text":" "},{"kind":"name","text":"getOptions"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"OptionDescriptors","ref":"org.graalvm.options.OptionDescriptors"}]},"doc":{"summary":[{"kind":"text","text":"Returns the set of options provided by this language."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the set of options provided by this language. Option values for languages can either be provided while building an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":" or a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"context"}]},{"kind":"text","text":". The option descriptor "},{"kind":"link","target":{"id":"org.graalvm.options.OptionDescriptor#getName()"},"code":true,"children":[{"kind":"text","text":"name"}]},{"kind":"text","text":" must be used as the option name."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Language.java","line":133}},{"id":"org.graalvm.polyglot.Language#getSourceOptions()","anchor":"getSourceOptions()","kind":"method","name":"getSourceOptions","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"OptionDescriptors","ref":"org.graalvm.options.OptionDescriptors"},{"kind":"punct","text":" "},{"kind":"name","text":"getSourceOptions"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"OptionDescriptors","ref":"org.graalvm.options.OptionDescriptors"}]},"doc":{"summary":[{"kind":"text","text":"Returns the source options descriptors available for sources of this language."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the source options descriptors available for sources of this language."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getOptions()"},"code":true,"children":[{"kind":"text","text":"getOptions()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"Source.Builder.option(String, String)"}]}]]},"since":"25.0","source":{"path":"org/graalvm/polyglot/Language.java","line":144}},{"id":"org.graalvm.polyglot.Language#getDefaultMimeType()","anchor":"getDefaultMimeType()","kind":"method","name":"getDefaultMimeType","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getDefaultMimeType"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns the default MIME type that is in use by a language."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the default MIME type that is in use by a language. The default MIME type specifies whether a source is loaded as character or binary based source by default. Returns "},{"kind":"code","text":"null"},{"kind":"text","text":" if the language does not specify a default MIME type."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasBytes()"},"code":true,"children":[{"kind":"text","text":"Source.hasBytes()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getMimeType()"},"code":true,"children":[{"kind":"text","text":"Source.getMimeType()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Language.java","line":157}},{"id":"org.graalvm.polyglot.Language#getMimeTypes()","anchor":"getMimeTypes()","kind":"method","name":"getMimeTypes","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Set","ref":"java.util.Set","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Set.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"> "},{"kind":"name","text":"getMimeTypes"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Set","ref":"java.util.Set","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Set.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":">"}]},"doc":{"summary":[{"kind":"text","text":"Returns the MIME types supported by this language."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the MIME types supported by this language."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getMimeType()"},"code":true,"children":[{"kind":"text","text":"Source.getMimeType()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Language.java","line":167}},{"id":"org.graalvm.polyglot.Language#getWebsite()","anchor":"getWebsite()","kind":"method","name":"getWebsite","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getWebsite"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"doc":{"summary":[{"kind":"text","text":"Get the URL for the language website."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Get the URL for the language website."}]}]},"since":"21.1.0","source":{"path":"org/graalvm/polyglot/Language.java","line":176}},{"id":"org.graalvm.polyglot.Language#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"25.3","source":{"path":"org/graalvm/polyglot/Language.java","line":185}},{"id":"org.graalvm.polyglot.Language#hashCode()","anchor":"hashCode()","kind":"method","name":"hashCode","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"hashCode"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"overrides":{"id":"java.lang.Object#hashCode()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},"since":"24.2","source":{"path":"org/graalvm/polyglot/Language.java","line":196}},{"id":"org.graalvm.polyglot.Language#equals(java.lang.Object)","anchor":"equals(java.lang.Object)","kind":"method","name":"equals","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"equals"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"obj"},{"kind":"punct","text":")"}],"params":[{"name":"obj","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"overrides":{"id":"java.lang.Object#equals(java.lang.Object)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},"since":"24.2","source":{"path":"org/graalvm/polyglot/Language.java","line":206}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"A handle for a Graal language installed in an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"A handle for a Graal language installed in an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":". The handle provides access to the language's meta-data, including the language's "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getId()"},"code":true,"children":[{"kind":"text","text":"id"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getName()"},"code":true,"children":[{"kind":"text","text":"name"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getVersion()"},"code":true,"children":[{"kind":"text","text":"version"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getOptions()"},"code":true,"children":[{"kind":"text","text":"options"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#getLanguages()"},"code":true,"children":[{"kind":"text","text":"Engine.getLanguages()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Language.java","line":58}},{"id":"org.graalvm.polyglot.PolyglotAccess","name":"PolyglotAccess","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"PolyglotAccess"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.polyglot.PolyglotAccess#NONE","anchor":"NONE","kind":"field","name":"NONE","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"PolyglotAccess","ref":"org.graalvm.polyglot.PolyglotAccess"},{"kind":"punct","text":" "},{"kind":"name","text":"NONE"}],"type":[{"kind":"type","text":"PolyglotAccess","ref":"org.graalvm.polyglot.PolyglotAccess"}],"doc":{"summary":[{"kind":"text","text":"Provides guest languages no access to other languages using polyglot builtins evaluation and binding builtins."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Provides guest languages no access to other languages using polyglot builtins evaluation and binding builtins."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotAccess.java","line":209}},{"id":"org.graalvm.polyglot.PolyglotAccess#ALL","anchor":"ALL","kind":"field","name":"ALL","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"PolyglotAccess","ref":"org.graalvm.polyglot.PolyglotAccess"},{"kind":"punct","text":" "},{"kind":"name","text":"ALL"}],"type":[{"kind":"type","text":"PolyglotAccess","ref":"org.graalvm.polyglot.PolyglotAccess"}],"doc":{"summary":[{"kind":"text","text":"Provides guest languages full access to other languages using polyglot evaluation and binding builtins."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Provides guest languages full access to other languages using polyglot evaluation and binding builtins."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotAccess.java","line":217}},{"id":"org.graalvm.polyglot.PolyglotAccess#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"25.3","source":{"path":"org/graalvm/polyglot/PolyglotAccess.java","line":224}},{"id":"org.graalvm.polyglot.PolyglotAccess#newBuilder()","anchor":"newBuilder()","kind":"method","name":"newBuilder","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"PolyglotAccess.Builder","ref":"org.graalvm.polyglot.PolyglotAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"newBuilder"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"PolyglotAccess.Builder","ref":"org.graalvm.polyglot.PolyglotAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Creates a new custom polyglot access configuration builder."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new custom polyglot access configuration builder. A polyglot access builder starts with no access rights."}]}]},"since":"19.2","source":{"path":"org/graalvm/polyglot/PolyglotAccess.java","line":241}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Represents an access policy for polyglot builtins in the guest languages."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Represents an access policy for polyglot builtins in the guest languages."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If the two predefined access policies "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess#NONE"},"code":true,"children":[{"kind":"text","text":"NONE"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess#ALL"},"code":true,"children":[{"kind":"text","text":"ALL"}]},{"kind":"text","text":" are not sufficient then a custom access configuration may be created using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess#newBuilder()"},"code":true,"children":[{"kind":"text","text":"newBuilder()"}]},{"kind":"text","text":". This allows to grant individual access rights between the language."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The following access rights may be granted:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"text","text":"The ability to evaluate code "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#allowEvalBetween(java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"between"}]},{"kind":"text","text":" two or just for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#allowEval(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"one"}]},{"kind":"text","text":" 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 "},{"kind":"code","text":"Polyglot.eval"},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The ability to access members in the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#allowBindingsAccess(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"polyglot bindings"}]},{"kind":"text","text":". The names of the guest language builtins to access polyglot bindings are language specific. In JavaScript they are called "},{"kind":"code","text":"Polyglot.import"},{"kind":"text","text":" and "},{"kind":"code","text":"Polyglot.export"},{"kind":"text","text":"."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"Access to polyglot evaluation and bindings builtins are always enabled when access policy "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess#ALL"},"code":true,"children":[{"kind":"text","text":"ALL"}]},{"kind":"text","text":" is used. In this mode polyglot evaluation builtins are available even if there is just one "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#getLanguages()"},"code":true,"children":[{"kind":"text","text":"installed"}]},{"kind":"text","text":" language available."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotAccess.java","line":82}},{"id":"org.graalvm.polyglot.PolyglotAccess$Builder","name":"PolyglotAccess.Builder","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"PolyglotAccess.Builder"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"enclosing":"org.graalvm.polyglot.PolyglotAccess","members":[{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#allowEvalBetween(java.lang.String...)","anchor":"allowEvalBetween(java.lang.String...)","kind":"method","name":"allowEvalBetween","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"PolyglotAccess.Builder","ref":"org.graalvm.polyglot.PolyglotAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowEvalBetween"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"... "},{"kind":"param","text":"languages"},{"kind":"punct","text":")"}],"params":[{"name":"languages","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"..."}],"varargs":true}],"returns":{"type":[{"kind":"type","text":"PolyglotAccess.Builder","ref":"org.graalvm.polyglot.PolyglotAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allows bidirectional evaluation of code between the given languages."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows bidirectional evaluation of code between the given languages. When called with language "},{"kind":"code","text":"\"A\""},{"kind":"text","text":" and language "},{"kind":"code","text":"\"B\""},{"kind":"text","text":", this is equivalent to calling "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#allowEval(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"allowEval"}]},{"kind":"code","text":"(\"A\", \"B\")"},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#allowEval(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"allowEval"}]},{"kind":"code","text":"(\"B\", \"A\")"},{"kind":"text","text":". If called with more than two then all language evaluation combinations will be allowed. This method potentially overrides already configured access rights with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#allowEval(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"allowEval(String, String)"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#denyEval(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"denyEval(String, String)"}]},{"kind":"text","text":". The given language array must be non "},{"kind":"code","text":"null"},{"kind":"text","text":" and individual languages must not be "},{"kind":"code","text":"null"},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#allowEval(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"allowEval(String, String)"}]}]]},"since":"19.2","source":{"path":"org/graalvm/polyglot/PolyglotAccess.java","line":272}},{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#denyEvalBetween(java.lang.String...)","anchor":"denyEvalBetween(java.lang.String...)","kind":"method","name":"denyEvalBetween","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"PolyglotAccess.Builder","ref":"org.graalvm.polyglot.PolyglotAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"denyEvalBetween"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"... "},{"kind":"param","text":"languages"},{"kind":"punct","text":")"}],"params":[{"name":"languages","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"..."}],"varargs":true}],"returns":{"type":[{"kind":"type","text":"PolyglotAccess.Builder","ref":"org.graalvm.polyglot.PolyglotAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Denies bidirectional evaluation of code between the given languages."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Denies bidirectional evaluation of code between the given languages. When called with language "},{"kind":"code","text":"\"A\""},{"kind":"text","text":" and language "},{"kind":"code","text":"\"B\""},{"kind":"text","text":", this is equivalent to calling "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#denyEval(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"denyEval"}]},{"kind":"code","text":"(\"A\", \"B\")"},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#denyEval(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"denyEval"}]},{"kind":"code","text":"(\"B\", \"A\")"},{"kind":"text","text":". If called with more than two then all language access combinations will be denied. This method potentially overrides already configured access rights with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#allowEval(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"allowEval(String, String)"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#denyEval(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"denyEval(String, String)"}]},{"kind":"text","text":". The given language array must be non "},{"kind":"code","text":"null"},{"kind":"text","text":" and individual languages must not be "},{"kind":"code","text":"null"},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#denyEval(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"denyEval(String, String)"}]}]]},"since":"19.2","source":{"path":"org/graalvm/polyglot/PolyglotAccess.java","line":308}},{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#allowEval(java.lang.String,java.lang.String)","anchor":"allowEval(java.lang.String,java.lang.String)","kind":"method","name":"allowEval","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"PolyglotAccess.Builder","ref":"org.graalvm.polyglot.PolyglotAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowEval"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"from"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"to"},{"kind":"punct","text":")"}],"params":[{"name":"from","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},{"name":"to","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"type","text":"PolyglotAccess.Builder","ref":"org.graalvm.polyglot.PolyglotAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allows evaluation of code by one language of another."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows evaluation of code by one language of another. This method only allows one-way evaluation access. Every language always has implicitly access to itself. If a language has access to one ore more different languages then the guest application will have access to polyglot evaluation builtins. If a language has no access granted to another language then access to polyglot evaluation builtins is denied."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#allowEvalBetween(java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"allowEvalBetween(String...)"}]}]]},"since":"19.2","source":{"path":"org/graalvm/polyglot/PolyglotAccess.java","line":332}},{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#denyEval(java.lang.String,java.lang.String)","anchor":"denyEval(java.lang.String,java.lang.String)","kind":"method","name":"denyEval","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"PolyglotAccess.Builder","ref":"org.graalvm.polyglot.PolyglotAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"denyEval"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"from"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"to"},{"kind":"punct","text":")"}],"params":[{"name":"from","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},{"name":"to","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"type","text":"PolyglotAccess.Builder","ref":"org.graalvm.polyglot.PolyglotAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Denies evaluation of code by one language of another."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Denies evaluation of code by one language of another. This method only denies one-way evaluation. Every language has always evaluation access to itself. This access cannot be denied."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#denyEvalBetween(java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"denyEvalBetween(String...)"}]}]]},"since":"19.2","source":{"path":"org/graalvm/polyglot/PolyglotAccess.java","line":355}},{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#allowBindingsAccess(java.lang.String)","anchor":"allowBindingsAccess(java.lang.String)","kind":"method","name":"allowBindingsAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"PolyglotAccess.Builder","ref":"org.graalvm.polyglot.PolyglotAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowBindingsAccess"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"language"},{"kind":"punct","text":")"}],"params":[{"name":"language","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"type","text":"PolyglotAccess.Builder","ref":"org.graalvm.polyglot.PolyglotAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Allows access to polyglot bindings for a language."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows access to polyglot bindings for a language. The names of the guest language builtins to access polyglot bindings are language specific. In JavaScript they are called "},{"kind":"code","text":"Polyglot.import"},{"kind":"text","text":" and "},{"kind":"code","text":"Polyglot.export"},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#denyBindingsAccess(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"denyBindingsAccess(String)"}]}]]},"since":"19.2","source":{"path":"org/graalvm/polyglot/PolyglotAccess.java","line":375}},{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#denyBindingsAccess(java.lang.String)","anchor":"denyBindingsAccess(java.lang.String)","kind":"method","name":"denyBindingsAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"PolyglotAccess.Builder","ref":"org.graalvm.polyglot.PolyglotAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"denyBindingsAccess"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"language"},{"kind":"punct","text":")"}],"params":[{"name":"language","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"type","text":"PolyglotAccess.Builder","ref":"org.graalvm.polyglot.PolyglotAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Denies access to polyglot bindings for a language."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Denies access to polyglot bindings for a language. The provided language must not be "},{"kind":"code","text":"null"},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#allowBindingsAccess(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"allowBindingsAccess(String)"}]}]]},"since":"19.2","source":{"path":"org/graalvm/polyglot/PolyglotAccess.java","line":391}},{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"25.3","source":{"path":"org/graalvm/polyglot/PolyglotAccess.java","line":404}},{"id":"org.graalvm.polyglot.PolyglotAccess$Builder#build()","anchor":"build()","kind":"method","name":"build","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"PolyglotAccess","ref":"org.graalvm.polyglot.PolyglotAccess"},{"kind":"punct","text":" "},{"kind":"name","text":"build"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"PolyglotAccess","ref":"org.graalvm.polyglot.PolyglotAccess"}]},"doc":{"summary":[{"kind":"text","text":"Creates an instance of the custom polyglot access configuration."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates an instance of the custom polyglot access configuration. This method may be called multiple times to create more than one independent instances."}]}]},"since":"19.2","source":{"path":"org/graalvm/polyglot/PolyglotAccess.java","line":429}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"A builder for a polyglot access configuration."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"A builder for a polyglot access configuration. Builder instances are not thread-safe."}]}]},"since":"19.2","source":{"path":"org/graalvm/polyglot/PolyglotAccess.java","line":250}},{"id":"org.graalvm.polyglot.PolyglotException","name":"PolyglotException","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"PolyglotException"},{"kind":"punct","text":" "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"RuntimeException","ref":"java.lang.RuntimeException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/RuntimeException.html"}],"superclass":[{"kind":"type","text":"RuntimeException","ref":"java.lang.RuntimeException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/RuntimeException.html"}],"ancestors":[{"id":"java.lang.RuntimeException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/RuntimeException.html"},{"id":"java.lang.Exception","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Exception.html"},{"id":"java.lang.Throwable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html"},{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.polyglot.PolyglotException#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a string representation of this exception."}]}]},"overrides":{"id":"java.lang.Throwable#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#toString()"},"doc":{"summary":[{"kind":"text","text":"Returns a short description of this exception."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns a short description of this exception. The result is the concatenation of:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"text","text":"the qualified name of the metaobject of the guest exception, if this object represents one, and it has a metaobject. Otherwise, the "},{"kind":"link","target":{"id":"java.lang.Class#getName()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html#getName()"},"children":[{"kind":"text","text":"name"}]},{"kind":"text","text":" of the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" class."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"\": \" (a colon and a space)"}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"the result of invoking this object's "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#getMessage()"},"code":true,"children":[{"kind":"text","text":"getMessage"}]},{"kind":"text","text":" method"}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"If "},{"kind":"code","text":"getMessage"},{"kind":"text","text":" returns "},{"kind":"code","text":"null"},{"kind":"text","text":", then just the class name is returned."}]}]},"since":"25.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":146}},{"id":"org.graalvm.polyglot.PolyglotException#printStackTrace()","anchor":"printStackTrace()","kind":"method","name":"printStackTrace","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"printStackTrace"},{"kind":"punct","text":"()"}],"overrides":{"id":"java.lang.Throwable#printStackTrace()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#printStackTrace()"},"doc":{"summary":[{"kind":"text","text":"Prints host and guest language stack frames to the standard "},{"kind":"link","target":{"id":"java.lang.System#err","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/System.html#err"},"code":true,"children":[{"kind":"text","text":"error output"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Prints host and guest language stack frames to the standard "},{"kind":"link","target":{"id":"java.lang.System#err","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/System.html#err"},"code":true,"children":[{"kind":"text","text":"error output"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":156}},{"id":"org.graalvm.polyglot.PolyglotException#printStackTrace(java.io.PrintStream)","anchor":"printStackTrace(java.io.PrintStream)","kind":"method","name":"printStackTrace","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"printStackTrace"},{"kind":"punct","text":"("},{"kind":"type","text":"PrintStream","ref":"java.io.PrintStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/PrintStream.html"},{"kind":"punct","text":" "},{"kind":"param","text":"s"},{"kind":"punct","text":")"}],"params":[{"name":"s","type":[{"kind":"type","text":"PrintStream","ref":"java.io.PrintStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/PrintStream.html"}]}],"overrides":{"id":"java.lang.Throwable#printStackTrace(java.io.PrintStream)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#printStackTrace(java.io.PrintStream)"},"doc":{"summary":[{"kind":"text","text":"Prints host and guest language stack frames to specified print stream."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Prints host and guest language stack frames to specified print stream."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":167}},{"id":"org.graalvm.polyglot.PolyglotException#printStackTrace(java.io.PrintWriter)","anchor":"printStackTrace(java.io.PrintWriter)","kind":"method","name":"printStackTrace","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"printStackTrace"},{"kind":"punct","text":"("},{"kind":"type","text":"PrintWriter","ref":"java.io.PrintWriter","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/PrintWriter.html"},{"kind":"punct","text":" "},{"kind":"param","text":"s"},{"kind":"punct","text":")"}],"params":[{"name":"s","type":[{"kind":"type","text":"PrintWriter","ref":"java.io.PrintWriter","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/PrintWriter.html"}]}],"overrides":{"id":"java.lang.Throwable#printStackTrace(java.io.PrintWriter)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#printStackTrace(java.io.PrintWriter)"},"doc":{"summary":[{"kind":"text","text":"Prints host and guest language stack frames to specified print writer."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Prints host and guest language stack frames to specified print writer."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":177}},{"id":"org.graalvm.polyglot.PolyglotException#fillInStackTrace()","anchor":"fillInStackTrace()","kind":"method","name":"fillInStackTrace","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Throwable","ref":"java.lang.Throwable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html"},{"kind":"punct","text":" "},{"kind":"name","text":"fillInStackTrace"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Throwable","ref":"java.lang.Throwable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html"}]},"overrides":{"id":"java.lang.Throwable#fillInStackTrace()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#fillInStackTrace()"},"doc":{"summary":[{"kind":"text","text":"Unsupported, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" instances are not writable therefore filling the stack trace has no effect for them."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Unsupported, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" instances are not writable therefore filling the stack trace has no effect for them."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":188}},{"id":"org.graalvm.polyglot.PolyglotException#getStackTrace()","anchor":"getStackTrace()","kind":"method","name":"getStackTrace","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"StackTraceElement","ref":"java.lang.StackTraceElement","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/StackTraceElement.html"},{"kind":"punct","text":"[] "},{"kind":"name","text":"getStackTrace"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"StackTraceElement","ref":"java.lang.StackTraceElement","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/StackTraceElement.html"},{"kind":"punct","text":"[]"}]},"overrides":{"id":"java.lang.Throwable#getStackTrace()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#getStackTrace()"},"doc":{"summary":[{"kind":"text","text":"Gets stack trace elements for Java and guest languages."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Gets stack trace elements for Java and guest languages. For polyglot exceptions it recommended to use "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#getPolyglotStackTrace()"},"code":true,"children":[{"kind":"text","text":"getPolyglotStackTrace()"}]},{"kind":"text","text":" as the guest language stack elements do not always fit the Java format for stack trace elements."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":201}},{"id":"org.graalvm.polyglot.PolyglotException#getMessage()","anchor":"getMessage()","kind":"method","name":"getMessage","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getMessage"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Throwable#getMessage()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#getMessage()"},"doc":{"summary":[{"kind":"text","text":"Gets a user readable message for the polyglot exception."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Gets a user readable message for the polyglot exception. In case the exception is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isInternalError()"},"code":true,"children":[{"kind":"text","text":"internal"}]},{"kind":"text","text":" then the original java class name is included in the message. The message may return "},{"kind":"code","text":"null"},{"kind":"text","text":" if no message is available."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":213}},{"id":"org.graalvm.polyglot.PolyglotException#getSourceLocation()","anchor":"getSourceLocation()","kind":"method","name":"getSourceLocation","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"SourceSection","ref":"org.graalvm.polyglot.SourceSection"},{"kind":"punct","text":" "},{"kind":"name","text":"getSourceLocation"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"SourceSection","ref":"org.graalvm.polyglot.SourceSection"}]},"doc":{"summary":[{"kind":"text","text":"Gets a guest language source location of this error or "},{"kind":"code","text":"null"},{"kind":"text","text":" if no source location is available for this exception."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Gets a guest language source location of this error or "},{"kind":"code","text":"null"},{"kind":"text","text":" if no source location is available for this exception."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":224}},{"id":"org.graalvm.polyglot.PolyglotException#equals(java.lang.Object)","anchor":"equals(java.lang.Object)","kind":"method","name":"equals","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"equals"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"obj"},{"kind":"punct","text":")"}],"params":[{"name":"obj","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"overrides":{"id":"java.lang.Object#equals(java.lang.Object)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":233}},{"id":"org.graalvm.polyglot.PolyglotException#hashCode()","anchor":"hashCode()","kind":"method","name":"hashCode","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"hashCode"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"overrides":{"id":"java.lang.Object#hashCode()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":246}},{"id":"org.graalvm.polyglot.PolyglotException#setStackTrace(java.lang.StackTraceElement[])","anchor":"setStackTrace(java.lang.StackTraceElement[])","kind":"method","name":"setStackTrace","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"setStackTrace"},{"kind":"punct","text":"("},{"kind":"type","text":"StackTraceElement","ref":"java.lang.StackTraceElement","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/StackTraceElement.html"},{"kind":"punct","text":"[] "},{"kind":"param","text":"stackTrace"},{"kind":"punct","text":")"}],"params":[{"name":"stackTrace","type":[{"kind":"type","text":"StackTraceElement","ref":"java.lang.StackTraceElement","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/StackTraceElement.html"},{"kind":"punct","text":"[]"}]}],"overrides":{"id":"java.lang.Throwable#setStackTrace(java.lang.StackTraceElement[])","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#setStackTrace(java.lang.StackTraceElement[])"},"doc":{"summary":[{"kind":"text","text":"Unsupported, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" instances are not writable therefore setting the stack trace has no effect for them."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Unsupported, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" instances are not writable therefore setting the stack trace has no effect for them."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":257}},{"id":"org.graalvm.polyglot.PolyglotException#getPolyglotStackTrace()","anchor":"getPolyglotStackTrace()","kind":"method","name":"getPolyglotStackTrace","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Iterable","ref":"java.lang.Iterable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"PolyglotException.StackFrame","ref":"org.graalvm.polyglot.PolyglotException$StackFrame"},{"kind":"punct","text":"> "},{"kind":"name","text":"getPolyglotStackTrace"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Iterable","ref":"java.lang.Iterable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"PolyglotException.StackFrame","ref":"org.graalvm.polyglot.PolyglotException$StackFrame"},{"kind":"punct","text":">"}]},"doc":{"summary":[{"kind":"text","text":"Provides programmatic access to the polyglot stack trace information printed by "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#printStackTrace()"},"code":true,"children":[{"kind":"text","text":"printStackTrace()"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Provides programmatic access to the polyglot stack trace information printed by "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#printStackTrace()"},"code":true,"children":[{"kind":"text","text":"printStackTrace()"}]},{"kind":"text","text":". Returns an array of stack trace elements, each representing one stack frame. The zeroth element of the array (assuming the array's length is non-zero) represents the top of the stack, which is the last invocation in the sequence. Typically, this is the point at which this throwable was created and thrown. The last element of the array (assuming the array's length is non-zero) represents the bottom of the stack, which is the first method invocation in the sequence."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException$StackFrame"},"code":true,"children":[{"kind":"text","text":"StackFrame"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":279}},{"id":"org.graalvm.polyglot.PolyglotException#isHostException()","anchor":"isHostException()","kind":"method","name":"isHostException","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isHostException"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this exception originates from the Java host language."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this exception originates from the Java host language. In such a case the first "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#getPolyglotStackTrace()"},"code":true,"children":[{"kind":"text","text":"stack frame"}]},{"kind":"text","text":" returns a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException$StackFrame#isHostFrame()"},"code":true,"children":[{"kind":"text","text":"host frame"}]},{"kind":"text","text":" as zeroth element."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":291}},{"id":"org.graalvm.polyglot.PolyglotException#isGuestException()","anchor":"isGuestException()","kind":"method","name":"isGuestException","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isGuestException"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this exception originates from a Graal guest language."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this exception originates from a Graal guest language. In such a case the first "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#getPolyglotStackTrace()"},"code":true,"children":[{"kind":"text","text":"stack frame"}]},{"kind":"text","text":" returns a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException$StackFrame#isGuestFrame()"},"code":true,"children":[{"kind":"text","text":"guest frame"}]},{"kind":"text","text":" as zeroth element."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":302}},{"id":"org.graalvm.polyglot.PolyglotException#asHostException()","anchor":"asHostException()","kind":"method","name":"asHostException","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Throwable","ref":"java.lang.Throwable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html"},{"kind":"punct","text":" "},{"kind":"name","text":"asHostException"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Throwable","ref":"java.lang.Throwable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this exception is not a host exception. Call "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isHostException()"},"code":true,"children":[{"kind":"text","text":"isHostException()"}]},{"kind":"text","text":" to ensure its originating from the host language."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the original Java host exception that caused this exception."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the original Java host exception that caused this exception. The original host exception contains a stack trace that is hardly interpretable by users as it contains details of the language implementation. The polyglot exception provides information for user-friendly error reporting with the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#getPolyglotStackTrace()"},"code":true,"children":[{"kind":"text","text":"polyglot stack trace"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":316}},{"id":"org.graalvm.polyglot.PolyglotException#isInternalError()","anchor":"isInternalError()","kind":"method","name":"isInternalError","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isInternalError"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this exception was caused by an internal implementation error."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this exception was caused by an internal implementation error. These errors should be reported as bugs if observed. Internal error messages are typically hard to understand for guest language programmers and might contain implementation specific details that allows guest language implementers to debug the problem."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":328}},{"id":"org.graalvm.polyglot.PolyglotException#isResourceExhausted()","anchor":"isResourceExhausted()","kind":"method","name":"isResourceExhausted","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isResourceExhausted"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this exception indicates that a resource limit was exceeded, else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this exception indicates that a resource limit was exceeded, else "},{"kind":"code","text":"false"},{"kind":"text","text":". Resource limit exceeded errors may be raised for the following reasons:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"text","text":"The host runtime run out of memory or stack space. For example if host runtime throws "},{"kind":"link","target":{"id":"java.lang.OutOfMemoryError","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/OutOfMemoryError.html"},"code":true,"children":[{"kind":"text","text":"OutOfMemoryError"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"java.lang.StackOverflowError","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/StackOverflowError.html"},"code":true,"children":[{"kind":"text","text":"StackOverflowError"}]},{"kind":"text","text":", then they will be translated to a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" that return "},{"kind":"code","text":"true"},{"kind":"text","text":" for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isResourceExhausted()"},"code":true,"children":[{"kind":"text","text":"isResourceExhausted()"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"A configured "},{"kind":"link","target":{"id":"org.graalvm.polyglot.ResourceLimits"},"code":true,"children":[{"kind":"text","text":"resource limit"}]},{"kind":"text","text":" was exceeded."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"A runtime specific per context resource limit was exceeded. Depending on the host runtime implementation additional options to restrict the resource usage of a context may be specified using options."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"Resource limit exceptions may be originating from the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isHostException()"},"code":true,"children":[{"kind":"text","text":"host"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isGuestException()"},"code":true,"children":[{"kind":"text","text":"guest"}]},{"kind":"text","text":". Resource limit exceeded errors are never "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isInternalError()"},"code":true,"children":[{"kind":"text","text":"internal"}]},{"kind":"text","text":", but may have caused the context to be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isCancelled()"},"code":true,"children":[{"kind":"text","text":"cancelled"}]},{"kind":"text","text":" such that it is no longer usable."}]}]},"since":"20.2","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":353}},{"id":"org.graalvm.polyglot.PolyglotException#isCancelled()","anchor":"isCancelled()","kind":"method","name":"isCancelled","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isCancelled"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the execution was cancelled."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the execution was cancelled. The execution can be cancelled by "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close(boolean)"},"code":true,"children":[{"kind":"text","text":"closing"}]},{"kind":"text","text":" a context, if an instrument such as a debugger decides to cancel the current execution or if a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.ResourceLimits"},"code":true,"children":[{"kind":"text","text":"resource limit"}]},{"kind":"text","text":" was exceeded. The context that caused a cancel event becomes unusable, i.e. closed."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":365}},{"id":"org.graalvm.polyglot.PolyglotException#isInterrupted()","anchor":"isInterrupted()","kind":"method","name":"isInterrupted","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isInterrupted"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the current application thread was interrupted by an "},{"kind":"link","target":{"id":"java.lang.InterruptedException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/InterruptedException.html"},"code":true,"children":[{"kind":"text","text":"InterruptedException"}]},{"kind":"text","text":", or by calling "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#interrupt(java.time.Duration)"},"code":true,"children":[{"kind":"text","text":"Context.interrupt(Duration)"}]},{"kind":"text","text":" from the host."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the current application thread was interrupted by an "},{"kind":"link","target":{"id":"java.lang.InterruptedException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/InterruptedException.html"},"code":true,"children":[{"kind":"text","text":"InterruptedException"}]},{"kind":"text","text":", or by calling "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#interrupt(java.time.Duration)"},"code":true,"children":[{"kind":"text","text":"Context.interrupt(Duration)"}]},{"kind":"text","text":" from the host."}]}]},"since":"20.3","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":376}},{"id":"org.graalvm.polyglot.PolyglotException#isExit()","anchor":"isExit()","kind":"method","name":"isExit","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isExit"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this exception is caused by an attempt of a guest language program to exit the application."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this exception is caused by an attempt of a guest language program to exit the application. The provided exit code can be accessed using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#getExitStatus()"},"code":true,"children":[{"kind":"text","text":"getExitStatus()"}]},{"kind":"text","text":". This can be the result of either the soft or the hard exit."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":388}},{"id":"org.graalvm.polyglot.PolyglotException#isSyntaxError()","anchor":"isSyntaxError()","kind":"method","name":"isSyntaxError","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isSyntaxError"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this exception indicates a parser or syntax error."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this exception indicates a parser or syntax error. In such a case #get"}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":398}},{"id":"org.graalvm.polyglot.PolyglotException#isIncompleteSource()","anchor":"isIncompleteSource()","kind":"method","name":"isIncompleteSource","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isIncompleteSource"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this exception indicates a syntax error that is indicating that the syntax is incomplete."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this exception indicates a syntax error that is indicating that the syntax is incomplete. This allows guest language programmers to find out if more code is expected from a given source. For example, an incomplete JavaScript program could look like this:"}]},{"kind":"code","text":"function incompleteFunction(arg) {"},{"kind":"paragraph","children":[{"kind":"text","text":"A shell might react to this exception and prompt for additional source code, if this method returns "},{"kind":"code","text":"true"},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":417}},{"id":"org.graalvm.polyglot.PolyglotException#getGuestObject()","anchor":"getGuestObject()","kind":"method","name":"getGuestObject","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"getGuestObject"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"doc":{"summary":[{"kind":"text","text":"Returns an additional guest language object."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns an additional guest language object. Returns "},{"kind":"code","text":"null"},{"kind":"text","text":" if no exception object is available."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":427}},{"id":"org.graalvm.polyglot.PolyglotException#getExitStatus()","anchor":"getExitStatus()","kind":"method","name":"getExitStatus","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"getExitStatus"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"doc":{"summary":[{"kind":"text","text":"Returns the exit status if this exception indicates that the application was "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isExit()"},"code":true,"children":[{"kind":"text","text":"exited"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the exit status if this exception indicates that the application was "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isExit()"},"code":true,"children":[{"kind":"text","text":"exited"}]},{"kind":"text","text":". The exit status is intended to be passed to "},{"kind":"link","target":{"id":"java.lang.System#exit(int)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/System.html#exit(int)"},"code":true,"children":[{"kind":"text","text":"System.exit(int)"}]},{"kind":"text","text":". In case of hard exit the application can be configured to call "},{"kind":"link","target":{"id":"java.lang.System#exit(int)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/System.html#exit(int)"},"code":true,"children":[{"kind":"text","text":"System.exit(int)"}]},{"kind":"text","text":" directly using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#useSystemExit(boolean)"},"code":true,"children":[{"kind":"text","text":"Context.Builder.useSystemExit(boolean)"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":440}}],"inherited":[{"from":{"id":"java.lang.Throwable","text":"Throwable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html"},"kind":"class","members":[{"id":"java.lang.Throwable#addSuppressed(java.lang.Throwable)","text":"addSuppressed","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#addSuppressed(java.lang.Throwable)"},{"id":"java.lang.Throwable#getCause()","text":"getCause","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#getCause()"},{"id":"java.lang.Throwable#getLocalizedMessage()","text":"getLocalizedMessage","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#getLocalizedMessage()"},{"id":"java.lang.Throwable#getSuppressed()","text":"getSuppressed","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#getSuppressed()"},{"id":"java.lang.Throwable#initCause(java.lang.Throwable)","text":"initCause","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#initCause(java.lang.Throwable)"}]},{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"A polyglot exception represents errors that contain Graal guest languages on the stack trace."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"A polyglot exception represents errors that contain Graal guest languages on the stack trace. In addition to the Java stack trace it also returns a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#getPolyglotStackTrace()"},"code":true,"children":[{"kind":"text","text":"polyglot stack trace"}]},{"kind":"text","text":". Methods like "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#printStackTrace()"},"code":true,"children":[{"kind":"text","text":"printStackTrace()"}]},{"kind":"text","text":" are implemented such that host and guest language stack traces are printed nicely."}]},{"kind":"paragraph","children":[{"kind":"text","text":"A polyglot exception may have the following properties:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isGuestException()"},"code":true,"children":[{"kind":"text","text":"Guest Exception"}]},{"kind":"text","text":": Is "},{"kind":"code","text":"true"},{"kind":"text","text":" if the exception was raised in guest language code."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isHostException()"},"code":true,"children":[{"kind":"text","text":"Host Exception"}]},{"kind":"text","text":": Is "},{"kind":"code","text":"true"},{"kind":"text","text":" if this exception was raised in host runtime code. This may happen if the polyglot runtime host runtime methods that throw an exception. The original host exception can be accessed using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#asHostException()"},"code":true,"children":[{"kind":"text","text":"asHostException()"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isCancelled()"},"code":true,"children":[{"kind":"text","text":"Cancelled"}]},{"kind":"text","text":": Is "},{"kind":"code","text":"true"},{"kind":"text","text":" if the execution got cancelled. The execution may be cancelled when "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"code":true,"children":[{"kind":"text","text":"closing"}]},{"kind":"text","text":" a context, by a guest language intrinsic or by a tool, like the debugger."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isExit()"},"code":true,"children":[{"kind":"text","text":"Exit"}]},{"kind":"text","text":": Is "},{"kind":"code","text":"true"},{"kind":"text","text":" if the execution exited. The guest language triggers exit events if the guest language code request to exit the VM. The exit status can be accessed using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#getExitStatus()"},"code":true,"children":[{"kind":"text","text":"getExitStatus()"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isSyntaxError()"},"code":true,"children":[{"kind":"text","text":"Syntax Error"}]},{"kind":"text","text":": Is "},{"kind":"code","text":"true"},{"kind":"text","text":" if the error represents a syntax error. For syntax errors a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#getSourceLocation()"},"code":true,"children":[{"kind":"text","text":"location"}]},{"kind":"text","text":" may be available."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isIncompleteSource()"},"code":true,"children":[{"kind":"text","text":"Incomplete Source"}]},{"kind":"text","text":": Is "},{"kind":"code","text":"true"},{"kind":"text","text":" if this returns a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isSyntaxError()"},"code":true,"children":[{"kind":"text","text":"syntax error"}]},{"kind":"text","text":" that indicates that the source is incomplete."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isResourceExhausted()"},"code":true,"children":[{"kind":"text","text":"Resource exhausted"}]},{"kind":"text","text":": Is "},{"kind":"code","text":"true"},{"kind":"text","text":" if a resource limit e.g. the maximum memory was exhausted."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isInternalError()"},"code":true,"children":[{"kind":"text","text":"Internal Error"}]},{"kind":"text","text":": Is "},{"kind":"code","text":"true"},{"kind":"text","text":" if an internal implementation error occurred in the polyglot runtime, the guest language or an instrument. It is not recommended to show such errors to the user in production. Please consider filing issues for internal implementation errors."}]}]]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"Value"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":88}},{"id":"org.graalvm.polyglot.PolyglotException$StackFrame","name":"PolyglotException.StackFrame","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"PolyglotException.StackFrame"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"enclosing":"org.graalvm.polyglot.PolyglotException","members":[{"id":"org.graalvm.polyglot.PolyglotException$StackFrame#isHostFrame()","anchor":"isHostFrame()","kind":"method","name":"isHostFrame","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isHostFrame"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns true if the stack frame originates from the host language."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns true if the stack frame originates from the host language. Host frames do not provide a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException$StackFrame#getSourceLocation()"},"code":true,"children":[{"kind":"text","text":"source location"}]},{"kind":"text","text":". Instead the Java stack frame can be accessed using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException$StackFrame#toHostFrame()"},"code":true,"children":[{"kind":"text","text":"toHostFrame()"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":470}},{"id":"org.graalvm.polyglot.PolyglotException$StackFrame#isGuestFrame()","anchor":"isGuestFrame()","kind":"method","name":"isGuestFrame","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isGuestFrame"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns true if the stack frame originates from the guest language."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns true if the stack frame originates from the guest language."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":479}},{"id":"org.graalvm.polyglot.PolyglotException$StackFrame#toHostFrame()","anchor":"toHostFrame()","kind":"method","name":"toHostFrame","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"StackTraceElement","ref":"java.lang.StackTraceElement","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/StackTraceElement.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toHostFrame"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"StackTraceElement","ref":"java.lang.StackTraceElement","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/StackTraceElement.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns a Java stack trace element representation of the polyglot stack trace element."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns a Java stack trace element representation of the polyglot stack trace element. This is supported for host stack frames as well as guest language stack frames. A conversion to the host frame format can be useful for interoperability."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":490}},{"id":"org.graalvm.polyglot.PolyglotException$StackFrame#getSourceLocation()","anchor":"getSourceLocation()","kind":"method","name":"getSourceLocation","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"SourceSection","ref":"org.graalvm.polyglot.SourceSection"},{"kind":"punct","text":" "},{"kind":"name","text":"getSourceLocation"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"SourceSection","ref":"org.graalvm.polyglot.SourceSection"}]},"doc":{"summary":[{"kind":"text","text":"Returns the source location of the stack frame or "},{"kind":"code","text":"null"},{"kind":"text","text":" if no source location is available."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the source location of the stack frame or "},{"kind":"code","text":"null"},{"kind":"text","text":" if no source location is available. Host frames do never provide a source location."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":500}},{"id":"org.graalvm.polyglot.PolyglotException$StackFrame#getBytecodeIndex()","anchor":"getBytecodeIndex()","kind":"method","name":"getBytecodeIndex","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"getBytecodeIndex"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"doc":{"summary":[{"kind":"text","text":"Returns the bytecode index of this frame if available, or a negative number if no bytecode index is available."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the bytecode index of this frame if available, or a negative number if no bytecode index is available. The bytecode index is an internal identifier of the current execution location. The bytecode index is typically only provided by languages that are internally implemented as bytecode interpreter. This information is exposed for debugging or testing purposes and should not be relied upon for anything else."}]}]},"since":"24.1","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":513}},{"id":"org.graalvm.polyglot.PolyglotException$StackFrame#getRootName()","anchor":"getRootName()","kind":"method","name":"getRootName","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getRootName"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns the root name of this stack frame."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the root name of this stack frame. In case of the host language the Java method name is returned. In guest languages it returns a useful identifier for code. For example, in JavaScript this can be the function name."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":524}},{"id":"org.graalvm.polyglot.PolyglotException$StackFrame#getLanguage()","anchor":"getLanguage()","kind":"method","name":"getLanguage","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Language","ref":"org.graalvm.polyglot.Language"},{"kind":"punct","text":" "},{"kind":"name","text":"getLanguage"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Language","ref":"org.graalvm.polyglot.Language"}]},"doc":{"summary":[{"kind":"text","text":"Returns the language of this stack frame."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the language of this stack frame. In case of the host language a synthetic Java language object is returned."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":534}},{"id":"org.graalvm.polyglot.PolyglotException$StackFrame#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"doc":{"summary":[{"kind":"text","text":"Returns a string representation of this stack frame."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns a string representation of this stack frame. The format is inspired by the Java stack frame format."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":544}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Represents a polyglot stack frame originating from a guest language or the host language Java."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Represents a polyglot stack frame originating from a guest language or the host language Java."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/PolyglotException.java","line":455}},{"id":"org.graalvm.polyglot.PreinitializedSources","name":"PreinitializedSources","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"PreinitializedSources"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.polyglot.PreinitializedSources#register(org.graalvm.polyglot.Source...)","anchor":"register(org.graalvm.polyglot.Source...)","kind":"method","name":"register","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"register"},{"kind":"punct","text":"("},{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"},{"kind":"punct","text":"... "},{"kind":"param","text":"sources"},{"kind":"punct","text":")"}],"params":[{"name":"sources","type":[{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"},{"kind":"punct","text":"..."}],"varargs":true}],"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the contexts were already pre-initialized, or if called in a native image at run time"}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if no polyglot implementation that supports context pre-initialization is installed"}]}]}],"doc":{"summary":[{"kind":"text","text":"Registers "},{"kind":"code","text":"sources"},{"kind":"text","text":" to be parsed by context pre-initialization: all of them, or none if this method throws."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Registers "},{"kind":"code","text":"sources"},{"kind":"text","text":" to be parsed by context pre-initialization: all of them, or none if this method throws."}]}]},"since":"25.4","source":{"path":"org/graalvm/polyglot/PreinitializedSources.java","line":108}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#toString()","text":"toString","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Registers sources that context pre-initialization parses when a native image is built."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Registers sources that context pre-initialization parses when a native image is built. Context pre-initialization is enabled with the image build time system property "},{"kind":"code","text":"polyglot.image-build-time.PreinitializeContexts"},{"kind":"text","text":", see "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Pre-initialization parses each registered source with its language in the pre-initialized context, and never executes it. A source that a context of the image parses later and that is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#equals(java.lang.Object)"},"children":[{"kind":"text","text":"equal"}]},{"kind":"text","text":" to a registered source then uses the call target parsed at build time, provided that the context uses the pre-initialized context. Two sources are equal only if everything the source builder can set is equal, e.g., the characters, name, MIME type, path and URI, so a source registered here should be built exactly as the image will build it at run time."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Sources are registered while the image is built, before the contexts are pre-initialized, e.g., from "},{"kind":"code","text":"Feature.duringSetup"},{"kind":"text","text":" of a "},{"kind":"code","text":"org.graalvm.nativeimage.hosted.Feature"},{"kind":"text","text":". The system property "},{"kind":"code","text":"polyglot.image-build-time.PreinitializeSources"},{"kind":"text","text":" is a shorthand for registering sources read from files, with a name and no MIME type."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Registering is a hint: a registered source is parsed only if the image pre-initializes its language, i.e., the language is listed in "},{"kind":"code","text":"polyglot.image-build-time.PreinitializeContexts"},{"kind":"text","text":". Otherwise the source is skipped, so a library can register its sources from its own feature without failing the builds of images that do not pre-initialize its language. If the language is pre-initialized but does not support context patching, the image build fails."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Only sources that the embedder parses, e.g., with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#eval(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"Context.eval(Source)"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#parse(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"Context.parse(Source)"}]},{"kind":"text","text":", can use a registered source. A source that a language creates itself, e.g., a module that its module loader loads for an "},{"kind":"code","text":"import"},{"kind":"text","text":", is never equal to a registered source. A source built from a "},{"kind":"link","target":{"id":"java.io.File","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/File.html"},"code":true,"children":[{"kind":"text","text":"java.io.File"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"java.net.URL","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URL.html"},"code":true,"children":[{"kind":"text","text":"java.net.URL"}]},{"kind":"text","text":" has the path or URI of the build machine, so it is equal to a source of the image only if the image builds it from the same path or URI; prefer a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#newBuilder(java.lang.String,java.lang.CharSequence,java.lang.String)"},"children":[{"kind":"text","text":"literal source"}]},{"kind":"text","text":" with a name and a MIME type."}]},{"kind":"paragraph","children":[{"kind":"text","text":"On a JVM, context pre-initialization can be debugged by setting the system property "},{"kind":"code","text":"polyglot.image-build-time.PreinitializeContexts"},{"kind":"text","text":": the contexts are then pre-initialized when the polyglot implementation is loaded, before any source can be registered, so sources cannot be registered in this mode."}]},{"kind":"code","text":"public final class MyFeature implements Feature {\n    @Override\n    public void duringSetup(DuringSetupAccess access) {\n        PreinitializedSources.register(Source.newBuilder(\"js\", moduleCode, \"main.mjs\").mimeType(\"application/javascript+module\").buildLiteral());\n    }\n}"}]},"since":"25.4","source":{"path":"org/graalvm/polyglot/PreinitializedSources.java","line":93}},{"id":"org.graalvm.polyglot.ResourceLimitEvent","name":"ResourceLimitEvent","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"ResourceLimitEvent"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.polyglot.ResourceLimitEvent#getContext()","anchor":"getContext()","kind":"method","name":"getContext","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context","ref":"org.graalvm.polyglot.Context"},{"kind":"punct","text":" "},{"kind":"name","text":"getContext"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Context","ref":"org.graalvm.polyglot.Context"}]},"doc":{"summary":[{"kind":"text","text":"The context for which the limit was exceeded."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"The context for which the limit was exceeded. Never "},{"kind":"code","text":"null"},{"kind":"text","text":"."}]}]},"since":"19.3","source":{"path":"org/graalvm/polyglot/ResourceLimitEvent.java","line":63}},{"id":"org.graalvm.polyglot.ResourceLimitEvent#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"19.3","source":{"path":"org/graalvm/polyglot/ResourceLimitEvent.java","line":72}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Event triggered by a resource limit for a context."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Event triggered by a resource limit for a context. Event objects are short-lived and should not be stored. Their use should be limited to the duration of the event."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.ResourceLimits"},"code":true,"children":[{"kind":"text","text":"ResourceLimits"}]}]]},"since":"19.3","source":{"path":"org/graalvm/polyglot/ResourceLimitEvent.java","line":50}},{"id":"org.graalvm.polyglot.ResourceLimits","name":"ResourceLimits","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"ResourceLimits"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.polyglot.ResourceLimits#newBuilder()","anchor":"newBuilder()","kind":"method","name":"newBuilder","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"ResourceLimits.Builder","ref":"org.graalvm.polyglot.ResourceLimits$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"newBuilder"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"ResourceLimits.Builder","ref":"org.graalvm.polyglot.ResourceLimits$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Creates a new builder to construct "},{"kind":"link","target":{"id":"org.graalvm.polyglot.ResourceLimits"},"code":true,"children":[{"kind":"text","text":"ResourceLimits"}]},{"kind":"text","text":" instances."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new builder to construct "},{"kind":"link","target":{"id":"org.graalvm.polyglot.ResourceLimits"},"code":true,"children":[{"kind":"text","text":"ResourceLimits"}]},{"kind":"text","text":" instances."}]}]},"since":"19.3","source":{"path":"org/graalvm/polyglot/ResourceLimits.java","line":101}},{"id":"org.graalvm.polyglot.ResourceLimits#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"25.3","source":{"path":"org/graalvm/polyglot/ResourceLimits.java","line":110}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Represents resource limits configuration that is used to configure contexts."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Represents resource limits configuration that is used to configure contexts. Resource limit instances are created using the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.ResourceLimits#newBuilder()"},"code":true,"children":[{"kind":"text","text":"builder"}]},{"kind":"text","text":" and activated by "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#resourceLimits(org.graalvm.polyglot.ResourceLimits)"},"code":true,"children":[{"kind":"text","text":"enabling"}]},{"kind":"text","text":" them for a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"context"}]},{"kind":"text","text":". All configured limits are applied per context instance. Resource limits may be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#resetLimits()"},"code":true,"children":[{"kind":"text","text":"reset"}]},{"kind":"text","text":". If a resource limit is triggered the context that triggered the limit will automatically be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close(boolean)"},"code":true,"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":" and can no longer be used to evaluate code."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The following resource limits are supported:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.ResourceLimits$Builder#statementLimit(long,java.util.function.Predicate)"},"code":true,"children":[{"kind":"text","text":"Statement count"}]},{"kind":"text","text":" limit per context. Allows to limit the amount of statements executed per context."}]}]]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Statement Limit Example"}]},{"kind":"paragraph","children":[{"kind":"code","text":"\n"},{"kind":"code","text":"\nResourceLimits limits = ResourceLimits.newBuilder()\n                      .statementLimit(500, null)\n                  .build();\ntry (Context context = Context.newBuilder(\"js\")\n                           .resourceLimits(limits)\n                       .build();) {\n    try {\n        context.eval(\"js\", \"while(true);\");\n        assert false;\n    } catch (PolyglotException e) {\n        // triggered after 500 iterations of while(true);\n        // context is closed and can no longer be used\n        assert e.isCancelled();\n    }\n}\n"},{"kind":"code","text":"\n"}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.ResourceLimits#newBuilder()"},"code":true,"children":[{"kind":"text","text":"newBuilder()"}]}]]},"since":"19.3","source":{"path":"org/graalvm/polyglot/ResourceLimits.java","line":86}},{"id":"org.graalvm.polyglot.ResourceLimits$Builder","name":"ResourceLimits.Builder","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"ResourceLimits.Builder"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"enclosing":"org.graalvm.polyglot.ResourceLimits","members":[{"id":"org.graalvm.polyglot.ResourceLimits$Builder#statementLimit(long,java.util.function.Predicate)","anchor":"statementLimit(long,java.util.function.Predicate)","kind":"method","name":"statementLimit","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"ResourceLimits.Builder","ref":"org.graalvm.polyglot.ResourceLimits$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"statementLimit"},{"kind":"punct","text":"("},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"limit"},{"kind":"punct","text":", "},{"kind":"type","text":"Predicate","ref":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"},{"kind":"punct","text":"> "},{"kind":"param","text":"sourceFilter"},{"kind":"punct","text":")"}],"params":[{"name":"limit","type":[{"kind":"keyword","text":"long"}]},{"name":"sourceFilter","type":[{"kind":"type","text":"Predicate","ref":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"},{"kind":"punct","text":">"}]}],"returns":{"type":[{"kind":"type","text":"ResourceLimits.Builder","ref":"org.graalvm.polyglot.ResourceLimits$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Specifies the maximum number of statements a context may execute until the onLimit event is notified and the context will be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"code":true,"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Specifies the maximum number of statements a context may execute until the onLimit event is notified and the context will be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"code":true,"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":". After the statement limit was triggered for a context, it is no longer usable and every use of the context will throw a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" that returns "},{"kind":"code","text":"true"},{"kind":"text","text":" for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#isCancelled()"},"code":true,"children":[{"kind":"text","text":"PolyglotException.isCancelled()"}]},{"kind":"text","text":". The statement limit is independent of the number of threads executing and is applied per context. Invoking this method multiple times overwrites previous statement limit configurations. If the statement limit is exceeded then the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.ResourceLimits$Builder#onLimit(java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"onLimit"}]},{"kind":"text","text":" listener is notified."}]},{"kind":"paragraph","children":[{"kind":"text","text":"By default there is no statement limit applied. The limit may be set to 0 to disable it. In addition to the limit a source filter may be set to indicate for which sources the limit should be applied. If the source filter is "},{"kind":"code","text":"null"},{"kind":"text","text":" then it will be applied to all "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#isInternal()"},"code":true,"children":[{"kind":"text","text":"internal"}]},{"kind":"text","text":" and public sources. The provided limit must not be negative otherwise an "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" is thrown. If a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#engine(org.graalvm.polyglot.Engine)"},"code":true,"children":[{"kind":"text","text":"shared engine"}]},{"kind":"text","text":" is used then the same source filter instance must be used for all contexts of an engine. Otherwise an "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" is thrown when the context is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#build()"},"code":true,"children":[{"kind":"text","text":"built"}]},{"kind":"text","text":". The limit itself may vary between contexts."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The statement limit is applied to the context and all inner contexts it spawns. Therefore, new inner contexts cannot be used to exceed the statement limit."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Note that attaching a statement limit to a context reduces the throughput of all guest applications with the same engine. The statement counter needs to be updated with every statement that is executed. It is recommended to benchmark the use of the statement limit before it is used in production."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Note that the complexity of a single statement may not be constant time depending on the guest language. For example, statements that execute JavaScript builtins, like "},{"kind":"code","text":"Array.sort"},{"kind":"text","text":", may account for a single statement, but its execution time is dependent on the size of the array. The statement count limit is therefore not suitable to perform time boxing and must be combined with other more reliable measures."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.ResourceLimits"},"code":true,"children":[{"kind":"text","text":"Example Usage"}]}]]},"since":"19.3","source":{"path":"org/graalvm/polyglot/ResourceLimits.java","line":167}},{"id":"org.graalvm.polyglot.ResourceLimits$Builder#onLimit(java.util.function.Consumer)","anchor":"onLimit(java.util.function.Consumer)","kind":"method","name":"onLimit","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"ResourceLimits.Builder","ref":"org.graalvm.polyglot.ResourceLimits$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"onLimit"},{"kind":"punct","text":"("},{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"ResourceLimitEvent","ref":"org.graalvm.polyglot.ResourceLimitEvent"},{"kind":"punct","text":"> "},{"kind":"param","text":"onLimit"},{"kind":"punct","text":")"}],"params":[{"name":"onLimit","type":[{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"ResourceLimitEvent","ref":"org.graalvm.polyglot.ResourceLimitEvent"},{"kind":"punct","text":">"}]}],"returns":{"type":[{"kind":"type","text":"ResourceLimits.Builder","ref":"org.graalvm.polyglot.ResourceLimits$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Notified when a resource limit is reached."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Notified when a resource limit is reached. Default is "},{"kind":"code","text":"null"},{"kind":"text","text":". May be set to "},{"kind":"code","text":"null"},{"kind":"text","text":" to disable events."}]}]},"since":"19.3","source":{"path":"org/graalvm/polyglot/ResourceLimits.java","line":183}},{"id":"org.graalvm.polyglot.ResourceLimits$Builder#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"25.3","source":{"path":"org/graalvm/polyglot/ResourceLimits.java","line":193}},{"id":"org.graalvm.polyglot.ResourceLimits$Builder#build()","anchor":"build()","kind":"method","name":"build","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"ResourceLimits","ref":"org.graalvm.polyglot.ResourceLimits"},{"kind":"punct","text":" "},{"kind":"name","text":"build"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"ResourceLimits","ref":"org.graalvm.polyglot.ResourceLimits"}]},"doc":{"summary":[{"kind":"text","text":"Builds the limit configuration object."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Builds the limit configuration object."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.ResourceLimits"},"code":true,"children":[{"kind":"text","text":"Example Usage"}]}]]},"since":"19.3","source":{"path":"org/graalvm/polyglot/ResourceLimits.java","line":211}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"A builder used to construct resource limits."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"A builder used to construct resource limits. Builder instances are not thread-safe and may not be used from multiple threads at the same time."}]}]},"since":"19.3","source":{"path":"org/graalvm/polyglot/ResourceLimits.java","line":121}},{"id":"org.graalvm.polyglot.SandboxPolicy","name":"SandboxPolicy","kind":"enum","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"enum"},{"kind":"punct","text":" "},{"kind":"name","text":"SandboxPolicy"}],"superclass":[{"kind":"type","text":"Enum","ref":"java.lang.Enum","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"SandboxPolicy","ref":"org.graalvm.polyglot.SandboxPolicy"},{"kind":"punct","text":">"}],"ancestors":[{"id":"java.lang.Enum","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html"},{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.polyglot.SandboxPolicy#values()","anchor":"values()","kind":"method","name":"values","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"SandboxPolicy","ref":"org.graalvm.polyglot.SandboxPolicy"},{"kind":"punct","text":"[] "},{"kind":"name","text":"values"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"SandboxPolicy","ref":"org.graalvm.polyglot.SandboxPolicy"},{"kind":"punct","text":"[]"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the enum constants in declaration order."}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the enum constants in declaration order."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the enum constants in declaration order."}]}]}},{"id":"org.graalvm.polyglot.SandboxPolicy#valueOf(java.lang.String)","anchor":"valueOf(java.lang.String)","kind":"method","name":"valueOf","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"SandboxPolicy","ref":"org.graalvm.polyglot.SandboxPolicy"},{"kind":"punct","text":" "},{"kind":"name","text":"valueOf"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"name"},{"kind":"punct","text":")"}],"params":[{"name":"name","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"The exact name of the enum constant."}]}]}],"returns":{"type":[{"kind":"type","text":"SandboxPolicy","ref":"org.graalvm.polyglot.SandboxPolicy"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the enum constant with the given name."}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the enum constant with the given name."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the enum constant with the given name."}]}]}},{"id":"org.graalvm.polyglot.SandboxPolicy#TRUSTED","anchor":"TRUSTED","kind":"enumConstant","name":"TRUSTED","signature":[{"kind":"name","text":"TRUSTED"}],"type":[{"kind":"type","text":"SandboxPolicy","ref":"org.graalvm.polyglot.SandboxPolicy"}],"doc":{"summary":[{"kind":"text","text":"Policy intended for fully trusted applications."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Policy intended for fully trusted applications. In this mode, access to any resource of the host might be accessible to the guest application. This is the default mode, there are no restrictions to the context or engine configuration."}]}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/SandboxPolicy.java","line":107}},{"id":"org.graalvm.polyglot.SandboxPolicy#CONSTRAINED","anchor":"CONSTRAINED","kind":"enumConstant","name":"CONSTRAINED","signature":[{"kind":"name","text":"CONSTRAINED"}],"type":[{"kind":"type","text":"SandboxPolicy","ref":"org.graalvm.polyglot.SandboxPolicy"}],"doc":{"summary":[{"kind":"text","text":"Policy intended for trusted, but potentially buggy applications."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Policy intended for trusted, but potentially buggy applications. In this mode, any access to host resources is required to be as restrictive as possible. In this mode, the guest and host application share a heap and execute on the same underlying virtual machine."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"code","text":"CONSTRAINED"},{"kind":"text","text":" sandbox policy enforces the following context restriction:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"text","text":"The list of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#newBuilder(java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"permitted languages"}]},{"kind":"text","text":" must be explicitly set."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#in(java.io.InputStream)"},"code":true,"children":[{"kind":"text","text":"in"}]},{"kind":"text","text":" is not specified, the "},{"kind":"link","target":{"id":"java.io.InputStream#nullInputStream()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/InputStream.html#nullInputStream()"},"code":true,"children":[{"kind":"text","text":"InputStream.nullInputStream()"}]},{"kind":"text","text":" is used. Otherwise, it must be redirected elsewhere than to "},{"kind":"link","target":{"id":"java.lang.System#in","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/System.html#in"},"code":true,"children":[{"kind":"text","text":"System.in"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Standard "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#out(java.io.OutputStream)"},"code":true,"children":[{"kind":"text","text":"out"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#err(java.io.OutputStream)"},"code":true,"children":[{"kind":"text","text":"Context.Builder.err(OutputStream)"}]},{"kind":"text","text":" err} streams must be redirected."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"all access"}]},{"kind":"text","text":" must not be enabled."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowNativeAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"native access"}]},{"kind":"text","text":" must not be enabled."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowHostClassLoading(boolean)"},"code":true,"children":[{"kind":"text","text":"Context.Builder.allowHostClassLoading(boolean)"}]},{"kind":"text","text":" host class loading} must not be enabled."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowCreateProcess(boolean)"},"code":true,"children":[{"kind":"text","text":"external process execution"}]},{"kind":"text","text":" must not be enabled."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowEnvironmentAccess(org.graalvm.polyglot.EnvironmentAccess)"},"code":true,"children":[{"kind":"text","text":"environment access"}]},{"kind":"text","text":" must be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.EnvironmentAccess#NONE"},"code":true,"children":[{"kind":"text","text":"EnvironmentAccess.NONE"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#timeZone(java.time.ZoneId)"},"code":true,"children":[{"kind":"text","text":"time zone"}]},{"kind":"text","text":" is not specified, UTC is used instead of the host default time zone."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#useSystemExit(boolean)"},"code":true,"children":[{"kind":"text","text":"host System.exit"}]},{"kind":"text","text":" must not be used."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowIO(org.graalvm.polyglot.io.IOAccess)"},"code":true,"children":[{"kind":"text","text":"access to the host file system"}]},{"kind":"text","text":" must be disabled. IO can be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess#NONE"},"code":true,"children":[{"kind":"text","text":"disabled"}]},{"kind":"text","text":" or it can use a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess$Builder#fileSystem(org.graalvm.polyglot.io.FileSystem)"},"code":true,"children":[{"kind":"text","text":"custom file system"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"GraalVM trusts custom file systems supplied by the embedder. The embedder must ensure that a custom file system does not expose the host file system or other host resources prohibited by the selected sandbox policy to guest code. Sandbox validation rejects the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#newDefaultFileSystem()"},"code":true,"children":[{"kind":"text","text":"default file system"}]},{"kind":"text","text":" and GraalVM-provided file system decorators known to expose it, but it cannot determine the behavior of arbitrary custom "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" implementations."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Only languages with a sandbox policy of at least "},{"kind":"code","text":"CONSTRAINED"},{"kind":"text","text":" can be used."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Only instruments with a sandbox policy of at least "},{"kind":"code","text":"CONSTRAINED"},{"kind":"text","text":" can be used."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Only a subset of options that are safe with the sandbox policy can be used."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"HostAccess"}]},{"kind":"text","text":" is not specified, the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#CONSTRAINED"},"code":true,"children":[{"kind":"text","text":"HostAccess.CONSTRAINED"}]},{"kind":"text","text":" is used."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Otherwise, the specified"}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"HostAccess"}]}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"must not allow"}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowPublicAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"unrestricted public access"}]}]}],[{"kind":"paragraph","children":[{"kind":"text","text":","}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowPublicAccess(java.util.function.Predicate)"},"code":true,"children":[{"kind":"text","text":"predicate-selected public access"}]}]}],[{"kind":"paragraph","children":[{"kind":"text","text":","}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAccessInheritance(boolean)"},"code":true,"children":[{"kind":"text","text":"access inheritance"}]}]}],[{"kind":"paragraph","children":[{"kind":"text","text":","}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAllClassImplementations(boolean)"},"code":true,"children":[{"kind":"text","text":"all class implementations"}]}]}],[{"kind":"paragraph","children":[{"kind":"text","text":","}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowAllImplementations(boolean)"},"code":true,"children":[{"kind":"text","text":"all interface implementations"}]}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"and"}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowMutableTargetMappings(org.graalvm.polyglot.HostAccess.MutableTargetMapping...)"},"code":true,"children":[{"kind":"text","text":"mutable target type mappings"}]}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#attach(org.graalvm.polyglot.Engine)"},"code":true,"children":[{"kind":"text","text":"execution listeners"}]},{"kind":"text","text":" must not be attached."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#serverTransport(org.graalvm.polyglot.io.MessageTransport)"},"code":true,"children":[{"kind":"text","text":"message transport"}]},{"kind":"text","text":" must not be set."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"Constrained Context building example:"}]},{"kind":"code","text":"ByteArrayOutputStream output = new ByteArrayOutputStream();\nByteArrayOutputStream errorOutput = new ByteArrayOutputStream();\ntry (Context context = Context.newBuilder(\"js\") //\n                .sandbox(SandboxPolicy.CONSTRAINED) //\n                .out(output) //\n                .err(errorOutput) //\n                .build()) {\n    context.eval(source);\n}"}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/SandboxPolicy.java","line":182}},{"id":"org.graalvm.polyglot.SandboxPolicy#ISOLATED","anchor":"ISOLATED","kind":"enumConstant","name":"ISOLATED","signature":[{"kind":"name","text":"ISOLATED"}],"type":[{"kind":"type","text":"SandboxPolicy","ref":"org.graalvm.polyglot.SandboxPolicy"}],"doc":{"summary":[{"kind":"text","text":"Policy intended for trusted applications, but which might have security vulnerabilities and optionally that can be mitigated using this policy."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Policy intended for trusted applications, but which might have security vulnerabilities and optionally that can be mitigated using this policy. For example, a script that processes untrusted input. Security vulnerabilities may allow an attacker to compromise the guest application by providing malicious input. In this mode, guest and host application execute on separate virtual machine instances."}]},{"kind":"paragraph","children":[{"kind":"text","text":"In addition to the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#CONSTRAINED"},"code":true,"children":[{"kind":"text","text":"CONSTRAINED"}]},{"kind":"text","text":" restrictions, the "},{"kind":"code","text":"ISOLATED"},{"kind":"text","text":" sandbox policy adds the following constraints:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"code","text":"engine.SpawnIsolate"},{"kind":"text","text":" option is preset to "},{"kind":"code","text":"true"},{"kind":"text","text":" if it has not been explicitly set."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"code","text":"engine.MaxIsolateMemory"},{"kind":"text","text":" option must be set."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"code","text":"sandbox.MaxCPUTime"},{"kind":"text","text":" limits option must be set. Use "},{"kind":"code","text":"sandbox.TraceLimits"},{"kind":"text","text":" to estimate an application's optimal sandbox parameters."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"HostAccess"}]},{"kind":"text","text":" is not specified, the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#ISOLATED"},"code":true,"children":[{"kind":"text","text":"HostAccess.ISOLATED"}]},{"kind":"text","text":" is used."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Otherwise, the specified"}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"HostAccess"}]}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"must meet all the constraints of the"}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#CONSTRAINED"},"code":true,"children":[{"kind":"text","text":"CONSTRAINED"}]}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"sandbox policy and must in addition use"}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#methodScoping(boolean)"},"code":true,"children":[{"kind":"text","text":"scoped references"}]}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"Isolated Context building example:"}]},{"kind":"code","text":"ByteArrayOutputStream output = new ByteArrayOutputStream();\nByteArrayOutputStream errorOutput = new ByteArrayOutputStream();\ntry (Context context = Context.newBuilder(\"js\") //\n                .sandbox(SandboxPolicy.ISOLATED)  //\n                .out(output)  //\n                .err(errorOutput)  //\n                .option(\"engine.MaxIsolateMemory\", \"1GB\")  //\n                .option(\"sandbox.MaxCPUTime\", \"10s\") //\n                .build()) {\n    context.eval(source);\n}"}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/SandboxPolicy.java","line":225}},{"id":"org.graalvm.polyglot.SandboxPolicy#UNTRUSTED","anchor":"UNTRUSTED","kind":"enumConstant","name":"UNTRUSTED","signature":[{"kind":"name","text":"UNTRUSTED"}],"type":[{"kind":"type","text":"SandboxPolicy","ref":"org.graalvm.polyglot.SandboxPolicy"}],"doc":{"summary":[{"kind":"text","text":"Policy intended for untrusted applications."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Policy intended for untrusted applications. This assumes that a malicious actor is supplying the guest code itself that is being run. A strong adversarial scenario is the execution of client-side Javascript in the browser that is supplied by an untrusted website. In this mode, the sandbox employs additional hardening mechanisms at the compiler and runtime level to mitigate e.g. speculative execution attacks."}]},{"kind":"paragraph","children":[{"kind":"text","text":"In addition to the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#ISOLATED"},"code":true,"children":[{"kind":"text","text":"ISOLATED"}]},{"kind":"text","text":" constraints, the "},{"kind":"code","text":"UNTRUSTED"},{"kind":"text","text":" sandbox policy adds the following requirements:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"text","text":"If "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"HostAccess"}]},{"kind":"text","text":" is not explicitly specified, the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#UNTRUSTED"},"code":true,"children":[{"kind":"text","text":"HostAccess.UNTRUSTED"}]},{"kind":"text","text":" is utilized. In the case where a specific "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"HostAccess"}]},{"kind":"text","text":" is provided, it must strictly adhere to all the constraints outlined in the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#ISOLATED"},"code":true,"children":[{"kind":"text","text":"ISOLATED"}]},{"kind":"text","text":" sandbox policy. Additionally, for UNTRUSTED, the following "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"HostAccess"}]},{"kind":"text","text":" options are not allowed:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"text","text":"Setting "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowImplementationsAnnotatedBy(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"implementations of types annotated by an annotation"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Setting "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowArrayAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"array access"}]},{"kind":"text","text":" to "},{"kind":"code","text":"true"},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Setting "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowListAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"list access"}]},{"kind":"text","text":" to "},{"kind":"code","text":"true"},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Setting "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowMapAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"map access"}]},{"kind":"text","text":" to "},{"kind":"code","text":"true"},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Setting "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowBufferAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"buffer access"}]},{"kind":"text","text":" to "},{"kind":"code","text":"true"},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Setting "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowIterableAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"iterable access"}]},{"kind":"text","text":" to "},{"kind":"code","text":"true"},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Setting "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowIteratorAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"iterator access"}]},{"kind":"text","text":" to "},{"kind":"code","text":"true"},{"kind":"text","text":"."}]}]]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"code","text":"engine.UntrustedCodeMitigation"},{"kind":"text","text":" option is preset to "},{"kind":"code","text":"software"},{"kind":"text","text":" if it has not been explicitly set."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"code","text":"sandbox.MaxCPUTime"},{"kind":"text","text":", "},{"kind":"code","text":"sandbox.MaxHeapMemory"},{"kind":"text","text":", "},{"kind":"code","text":"sandbox.MaxASTDepth"},{"kind":"text","text":", "},{"kind":"code","text":"sandbox.MaxThreads"},{"kind":"text","text":", "},{"kind":"code","text":"sandbox.MaxOutputStreamSize"},{"kind":"text","text":", "},{"kind":"code","text":"sandbox.MaxErrorStreamSize"},{"kind":"text","text":" limits options must be set. Use "},{"kind":"code","text":"sandbox.TraceLimits"},{"kind":"text","text":" to estimate an application's optimal sandbox parameters."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"code","text":"sandbox.MaxStackFrames"},{"kind":"text","text":" limit option may be set to restrict the number of guest stack frames. If the option is not set, no explicit guest stack frame limit is enforced."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"Untrusted Context building example:"}]},{"kind":"code","text":"ByteArrayOutputStream output = new ByteArrayOutputStream();\nByteArrayOutputStream errorOutput = new ByteArrayOutputStream();\ntry (Context context = Context.newBuilder(\"js\") //\n                .sandbox(SandboxPolicy.UNTRUSTED) //\n                .out(output) //\n                .err(errorOutput) //\n                .option(\"engine.MaxIsolateMemory\", \"1GB\") //\n                .option(\"sandbox.MaxHeapMemory\", \"800MB\") //\n                .option(\"sandbox.MaxCPUTime\", \"10s\") //\n                .option(\"sandbox.MaxASTDepth\", \"100\") //\n                .option(\"sandbox.MaxThreads\", \"1\") //\n                .option(\"sandbox.MaxOutputStreamSize\", \"1MB\") //\n                .option(\"sandbox.MaxErrorStreamSize\", \"1MB\") //\n                .build()) {\n    context.eval(source);\n}"}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/SandboxPolicy.java","line":294}},{"id":"org.graalvm.polyglot.SandboxPolicy#isStricterThan(org.graalvm.polyglot.SandboxPolicy)","anchor":"isStricterThan(org.graalvm.polyglot.SandboxPolicy)","kind":"method","name":"isStricterThan","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isStricterThan"},{"kind":"punct","text":"("},{"kind":"type","text":"SandboxPolicy","ref":"org.graalvm.polyglot.SandboxPolicy"},{"kind":"punct","text":" "},{"kind":"param","text":"other"},{"kind":"punct","text":")"}],"params":[{"name":"other","type":[{"kind":"type","text":"SandboxPolicy","ref":"org.graalvm.polyglot.SandboxPolicy"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Tests whether this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy"},"code":true,"children":[{"kind":"text","text":"SandboxPolicy"}]},{"kind":"text","text":" is stricter than "},{"kind":"code","text":"other"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Tests whether this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy"},"code":true,"children":[{"kind":"text","text":"SandboxPolicy"}]},{"kind":"text","text":" is stricter than "},{"kind":"code","text":"other"},{"kind":"text","text":"."}]}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/SandboxPolicy.java","line":301}},{"id":"org.graalvm.polyglot.SandboxPolicy#isStricterOrEqual(org.graalvm.polyglot.SandboxPolicy)","anchor":"isStricterOrEqual(org.graalvm.polyglot.SandboxPolicy)","kind":"method","name":"isStricterOrEqual","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isStricterOrEqual"},{"kind":"punct","text":"("},{"kind":"type","text":"SandboxPolicy","ref":"org.graalvm.polyglot.SandboxPolicy"},{"kind":"punct","text":" "},{"kind":"param","text":"other"},{"kind":"punct","text":")"}],"params":[{"name":"other","type":[{"kind":"type","text":"SandboxPolicy","ref":"org.graalvm.polyglot.SandboxPolicy"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Tests whether this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy"},"code":true,"children":[{"kind":"text","text":"SandboxPolicy"}]},{"kind":"text","text":" is stricter or equal to "},{"kind":"code","text":"other"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Tests whether this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy"},"code":true,"children":[{"kind":"text","text":"SandboxPolicy"}]},{"kind":"text","text":" is stricter or equal to "},{"kind":"code","text":"other"},{"kind":"text","text":"."}]}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/SandboxPolicy.java","line":310}}],"inherited":[{"from":{"id":"java.lang.Enum","text":"Enum","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html"},"kind":"class","members":[{"id":"java.lang.Enum#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#clone()"},{"id":"java.lang.Enum#compareTo(E)","text":"compareTo","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#compareTo(E)"},{"id":"java.lang.Enum#describeConstable()","text":"describeConstable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#describeConstable()"},{"id":"java.lang.Enum#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#equals(java.lang.Object)"},{"id":"java.lang.Enum#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#finalize()"},{"id":"java.lang.Enum#getDeclaringClass()","text":"getDeclaringClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#getDeclaringClass()"},{"id":"java.lang.Enum#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#hashCode()"},{"id":"java.lang.Enum#name()","text":"name","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#name()"},{"id":"java.lang.Enum#ordinal()","text":"ordinal","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#ordinal()"},{"id":"java.lang.Enum#toString()","text":"toString","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#toString()"},{"id":"java.lang.Enum#valueOf(java.lang.Class,java.lang.String)","text":"valueOf","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Enum.html#valueOf(java.lang.Class,java.lang.String)"}]},{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"The sandbox policy presets and validates configurations of a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"context"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":" to be suitable as a code sandbox."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"The sandbox policy presets and validates configurations of a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"context"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":" to be suitable as a code sandbox. The policy is set by passing it to the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#sandbox(org.graalvm.polyglot.SandboxPolicy)"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#sandbox(org.graalvm.polyglot.SandboxPolicy)"},"code":true,"children":[{"kind":"text","text":"context"}]},{"kind":"text","text":" builder method."}]},{"kind":"paragraph","children":[{"kind":"text","text":"There are four policies to choose from that become strictly more strict:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#TRUSTED"},"code":true,"children":[{"kind":"text","text":"TRUSTED"}]},{"kind":"text","text":" policy intended for fully trusted applications. In this mode, access to any resource of the host might be accessible to the guest application. This is the default mode, there are no restrictions to the context or engine configuration."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#CONSTRAINED"},"code":true,"children":[{"kind":"text","text":"CONSTRAINED"}]},{"kind":"text","text":" policy intended for trusted, but potentially buggy applications. In this mode, any access to host resources is required to be as restrictive as possible. In this mode, the guest and host application share a heap and execute on the same underlying virtual machine."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#ISOLATED"},"code":true,"children":[{"kind":"text","text":"ISOLATED"}]},{"kind":"text","text":" policy intended for trusted applications, but which might have security vulnerabilities and optionally that can be mitigated using this policy. For example, a script that processes untrusted input. Security vulnerabilities would allow an attacker to compromise the guest application by providing malicious input. In this mode, guest and host application execute on separate virtual machine instances."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#UNTRUSTED"},"code":true,"children":[{"kind":"text","text":"UNTRUSTED"}]},{"kind":"text","text":" policy intended for fully untrusted applications. This assumes that a potentially malicious actor is supplying the guest code itself that is being run. A strong adversarial scenario is the execution of client-side Javascript in the browser that is supplied by an untrusted website. In this mode, the sandbox employs additional hardening mechanisms at the compiler and runtime level to mitigate e.g. JIT spraying or speculative execution attacks."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"It is unsupported to run untrusted code with any other policy than "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#UNTRUSTED"},"code":true,"children":[{"kind":"text","text":"UNTRUSTED"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":" Compatibility Notice:"}]},{"kind":"text","text":" The behavior of sandbox policies is subject to incompatible changes for new GraalVM major releases. New presets and validations may be added in new GraalVM releases that may let configurations valid in older versions fail for newer versions. Therefore, adopting a new GraalVM version with a set sandbox policy might require changes for the embedder. This applies to all policies other than "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy#TRUSTED"},"code":true,"children":[{"kind":"text","text":"TRUSTED"}]},{"kind":"text","text":". Changes to the policy are announced in the SDK "},{"kind":"link","url":"https://github.com/oracle/graal/blob/master/sdk/CHANGELOG.md","children":[{"kind":"text","text":"release changelog"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"For further information on Polyglot Sandboxing, please refer to the "},{"kind":"link","url":"https://www.graalvm.org/latest/security-guide/polyglot-sandbox/","children":[{"kind":"text","text":"security guide"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#sandbox(org.graalvm.polyglot.SandboxPolicy)"},"code":true,"children":[{"kind":"text","text":"Context.Builder.sandbox(SandboxPolicy)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#sandbox(org.graalvm.polyglot.SandboxPolicy)"},"code":true,"children":[{"kind":"text","text":"Engine.Builder.sandbox(SandboxPolicy)"}]}]]},"since":"23.0","source":{"path":"org/graalvm/polyglot/SandboxPolicy.java","line":98}},{"id":"org.graalvm.polyglot.Source","name":"Source","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"Source"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.polyglot.Source#getLanguage()","anchor":"getLanguage()","kind":"method","name":"getLanguage","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getLanguage"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns the language this source created with."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the language this source created with. The string returned matches the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getId()"},"code":true,"children":[{"kind":"text","text":"id"}]},{"kind":"text","text":" of the language."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":191}},{"id":"org.graalvm.polyglot.Source#getName()","anchor":"getName()","kind":"method","name":"getName","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getName"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the name of the guest language program"}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the name of this resource holding a guest language program."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the name of this resource holding a guest language program. An example would be the name of a guest language source code file. Name is supposed to be shorter than "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getPath()"},"code":true,"children":[{"kind":"text","text":"getPath()"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#name(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"Builder.name(String)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":204}},{"id":"org.graalvm.polyglot.Source#getPath()","anchor":"getPath()","kind":"method","name":"getPath","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getPath"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"doc":{"summary":[{"kind":"text","text":"The fully qualified name of the source."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"The fully qualified name of the source. In case this source originates from a "},{"kind":"link","target":{"id":"java.io.File","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/File.html"},"code":true,"children":[{"kind":"text","text":"File"}]},{"kind":"text","text":", then the path is the normalized, "},{"kind":"link","target":{"id":"java.io.File#getCanonicalPath()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/File.html#getCanonicalPath()"},"code":true,"children":[{"kind":"text","text":"canonical path"}]},{"kind":"text","text":" for absolute files, or the relative path otherwise. If the source originates from an "},{"kind":"link","target":{"id":"java.net.URL","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URL.html"},"code":true,"children":[{"kind":"text","text":"URL"}]},{"kind":"text","text":", then it's the path component of the URL."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":216}},{"id":"org.graalvm.polyglot.Source#getURL()","anchor":"getURL()","kind":"method","name":"getURL","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"URL","ref":"java.net.URL","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URL.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getURL"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"URL","ref":"java.net.URL","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URL.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"URL or "},{"kind":"code","text":"null"}]}]},"doc":{"summary":[{"kind":"text","text":"The URL if the source is retrieved via URL."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"The URL if the source is retrieved via URL."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":226}},{"id":"org.graalvm.polyglot.Source#getURI()","anchor":"getURI()","kind":"method","name":"getURI","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"URI","ref":"java.net.URI","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URI.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getURI"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"URI","ref":"java.net.URI","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URI.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a URI, never "},{"kind":"code","text":"null"}]}]},"doc":{"summary":[{"kind":"text","text":"Get the URI of the source."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Get the URI of the source. Every source has an associated "},{"kind":"link","target":{"id":"java.net.URI","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URI.html"},"code":true,"children":[{"kind":"text","text":"URI"}]},{"kind":"text","text":", which can be used as a persistent identification of the source. The "},{"kind":"link","target":{"id":"java.net.URI","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URI.html"},"code":true,"children":[{"kind":"text","text":"URI"}]},{"kind":"text","text":" returned by this method should be as unique as possible, yet it can happen that different "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"sources"}]},{"kind":"text","text":" return the same "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getURI()"},"code":true,"children":[{"kind":"text","text":"getURI"}]},{"kind":"text","text":" - for example when content of a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#newBuilder(java.lang.String,java.io.File)"},"code":true,"children":[{"kind":"text","text":"file on a disk"}]},{"kind":"text","text":" changes and is re-loaded."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":240}},{"id":"org.graalvm.polyglot.Source#isInteractive()","anchor":"isInteractive()","kind":"method","name":"isInteractive","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isInteractive"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"whether this source is marked as "},{"kind":"emphasis","children":[{"kind":"text","text":"interactive"}]}]}]},"doc":{"summary":[{"kind":"text","text":"Check whether this source has been marked as "},{"kind":"emphasis","children":[{"kind":"text","text":"interactive"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Check whether this source has been marked as "},{"kind":"emphasis","children":[{"kind":"text","text":"interactive"}]},{"kind":"text","text":". Interactive sources are provided by an entity which is able to interactively read output and provide an input during the source execution; that can be a user I/O through an interactive shell for instance."}]},{"kind":"paragraph","children":[{"kind":"text","text":"One can specify whether a source is interactive when "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#interactive(boolean)"},"code":true,"children":[{"kind":"text","text":"building it"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":255}},{"id":"org.graalvm.polyglot.Source#isInternal()","anchor":"isInternal()","kind":"method","name":"isInternal","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isInternal"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"whether this source is marked as "},{"kind":"emphasis","children":[{"kind":"text","text":"internal"}]}]}]},"doc":{"summary":[{"kind":"text","text":"Gets whether this source has been marked as "},{"kind":"emphasis","children":[{"kind":"text","text":"internal"}]},{"kind":"text","text":", meaning that it has been provided by the infrastructure, language implementation, or system library."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Gets whether this source has been marked as "},{"kind":"emphasis","children":[{"kind":"text","text":"internal"}]},{"kind":"text","text":", meaning that it has been provided by the infrastructure, language implementation, or system library. "},{"kind":"emphasis","children":[{"kind":"text","text":"Internal"}]},{"kind":"text","text":" sources are presumed to be irrelevant to guest language programmers, as well as possibly confusing and revealing of language implementation details."}]},{"kind":"paragraph","children":[{"kind":"text","text":"On the other hand, tools should be free to make "},{"kind":"emphasis","children":[{"kind":"text","text":"internal"}]},{"kind":"text","text":" sources visible in (possibly privileged) modes that are useful for language implementors."}]},{"kind":"paragraph","children":[{"kind":"text","text":"One can specify whether a source is internal when "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#internal(boolean)"},"code":true,"children":[{"kind":"text","text":"building it"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":274}},{"id":"org.graalvm.polyglot.Source#getReader()","anchor":"getReader()","kind":"method","name":"getReader","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Reader","ref":"java.io.Reader","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/Reader.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getReader"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Reader","ref":"java.io.Reader","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/Reader.html"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this source cannot contain "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasCharacters()"},"code":true,"children":[{"kind":"text","text":"characters"}]},{"kind":"text","text":"."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns a new reader that reads from the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getCharacters()"},"code":true,"children":[{"kind":"text","text":"characters"}]},{"kind":"text","text":" provided by this source."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns a new reader that reads from the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getCharacters()"},"code":true,"children":[{"kind":"text","text":"characters"}]},{"kind":"text","text":" provided by this source."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":286}},{"id":"org.graalvm.polyglot.Source#getInputStream()","anchor":"getInputStream()","kind":"method","name":"getInputStream","modifiers":["public"],"annotations":[[{"kind":"annotation","text":"@Deprecated","ref":"java.lang.Deprecated","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Deprecated.html"},{"kind":"punct","text":"("},{"kind":"param","text":"since"},{"kind":"punct","text":" = "},{"kind":"literal","text":"\"19.0\""},{"kind":"punct","text":")"}]],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"InputStream","ref":"java.io.InputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/InputStream.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getInputStream"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"InputStream","ref":"java.io.InputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/InputStream.html"}]},"deprecated":{"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"use "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getReader()"},"code":true,"children":[{"kind":"text","text":"getReader()"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getCharacters()"},"code":true,"children":[{"kind":"text","text":"getCharacters()"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getBytes()"},"code":true,"children":[{"kind":"text","text":"getBytes()"}]},{"kind":"text","text":" instead. The implementation is inefficient and can not distinguish byte and character based sources."}]}],"since":"19.0"},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":296}},{"id":"org.graalvm.polyglot.Source#getLength()","anchor":"getLength()","kind":"method","name":"getLength","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"getLength"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"doc":{"summary":[{"kind":"text","text":"Gets the number of characters or bytes of the source."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Gets the number of characters or bytes of the source."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":306}},{"id":"org.graalvm.polyglot.Source#getCharacters()","anchor":"getCharacters()","kind":"method","name":"getCharacters","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"CharSequence","ref":"java.lang.CharSequence","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getCharacters"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"CharSequence","ref":"java.lang.CharSequence","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this source cannot contain "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasCharacters()"},"code":true,"children":[{"kind":"text","text":"characters"}]},{"kind":"text","text":"."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns all characters of the source."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns all characters of the source."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":317}},{"id":"org.graalvm.polyglot.Source#getMimeType()","anchor":"getMimeType()","kind":"method","name":"getMimeType","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getMimeType"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"MIME type of this source or "},{"kind":"code","text":"null"},{"kind":"text","text":", if not explicitly set."}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the MIME type that is associated with this source."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the MIME type that is associated with this source. Sources have a "},{"kind":"code","text":"null"},{"kind":"text","text":" MIME type by default. If the MIME type is "},{"kind":"code","text":"null"},{"kind":"text","text":" then the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getDefaultMimeType()"},"code":true,"children":[{"kind":"text","text":"default MIME type"}]},{"kind":"text","text":" of the language will be used to interpret the source. If set explicitly then the language needs to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getMimeTypes()"},"code":true,"children":[{"kind":"text","text":"support"}]},{"kind":"text","text":" the MIME type in order to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#eval(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"evaluate"}]},{"kind":"text","text":" the source. If not "},{"kind":"code","text":"null"},{"kind":"text","text":" the MIME type is already verified containing no spaces and a '/' between group and sub-group. An example for a valid MIME type is: "},{"kind":"code","text":"text/javascript"},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The MIME type can be guessed by the system based on "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#findMimeType(java.io.File)"},"code":true,"children":[{"kind":"text","text":"files"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#findMimeType(java.net.URL)"},"code":true,"children":[{"kind":"text","text":"urls"}]}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getDefaultMimeType()"},"code":true,"children":[{"kind":"text","text":"Language.getDefaultMimeType()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getMimeTypes()"},"code":true,"children":[{"kind":"text","text":"Language.getMimeTypes()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#findMimeType(java.io.File)"},"code":true,"children":[{"kind":"text","text":"Source.findMimeType(File)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#findMimeType(java.net.URL)"},"code":true,"children":[{"kind":"text","text":"Source.findMimeType(URL)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":341}},{"id":"org.graalvm.polyglot.Source#getCharacters(int)","anchor":"getCharacters(int)","kind":"method","name":"getCharacters","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"CharSequence","ref":"java.lang.CharSequence","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getCharacters"},{"kind":"punct","text":"("},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"param","text":"lineNumber"},{"kind":"punct","text":")"}],"params":[{"name":"lineNumber","type":[{"kind":"keyword","text":"int"}]}],"returns":{"type":[{"kind":"type","text":"CharSequence","ref":"java.lang.CharSequence","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this source cannot contain "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasCharacters()"},"code":true,"children":[{"kind":"text","text":"characters"}]},{"kind":"text","text":"."}]}]}],"doc":{"summary":[{"kind":"text","text":"Gets the text (not including a possible terminating newline) in a (1-based) numbered line."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Gets the text (not including a possible terminating newline) in a (1-based) numbered line. Causes the contents of this source to be loaded if they are loaded lazily."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasCharacters()"},"code":true,"children":[{"kind":"text","text":"hasCharacters()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":354}},{"id":"org.graalvm.polyglot.Source#getBytes()","anchor":"getBytes()","kind":"method","name":"getBytes","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"ByteSequence","ref":"org.graalvm.polyglot.io.ByteSequence"},{"kind":"punct","text":" "},{"kind":"name","text":"getBytes"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"ByteSequence","ref":"org.graalvm.polyglot.io.ByteSequence"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this source cannot contain "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasBytes()"},"code":true,"children":[{"kind":"text","text":"bytes"}]},{"kind":"text","text":" ."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the bytes of the source if it is a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasBytes()"},"code":true,"children":[{"kind":"text","text":"byte based source"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the bytes of the source if it is a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasBytes()"},"code":true,"children":[{"kind":"text","text":"byte based source"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasBytes()"},"code":true,"children":[{"kind":"text","text":"hasBytes()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":366}},{"id":"org.graalvm.polyglot.Source#hasCharacters()","anchor":"hasCharacters()","kind":"method","name":"hasCharacters","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasCharacters"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this source represents a character based source, else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this source represents a character based source, else "},{"kind":"code","text":"false"},{"kind":"text","text":". A source is either a byte based, a character based, or with no content, but never both byte and character based at the same time."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The following methods are only supported if "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasCharacters()"},"code":true,"children":[{"kind":"text","text":"hasCharacters()"}]},{"kind":"text","text":" is "},{"kind":"code","text":"true"},{"kind":"text","text":":"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getReader()"},"code":true,"children":[{"kind":"text","text":"getReader()"}]}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getCharacters()"},"code":true,"children":[{"kind":"text","text":"getCharacters()"}]}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getLineCount()"},"code":true,"children":[{"kind":"text","text":"getLineCount()"}]}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getLineNumber(int)"},"code":true,"children":[{"kind":"text","text":"getLineNumber(int)"}]}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getColumnNumber(int)"},"code":true,"children":[{"kind":"text","text":"getColumnNumber(int)"}]}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getLineStartOffset(int)"},"code":true,"children":[{"kind":"text","text":"getLineStartOffset(int)"}]}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getLineLength(int)"},"code":true,"children":[{"kind":"text","text":"getLineLength(int)"}]}]}]]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":389}},{"id":"org.graalvm.polyglot.Source#hasBytes()","anchor":"hasBytes()","kind":"method","name":"hasBytes","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasBytes"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this source represents a byte based source, else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this source represents a byte based source, else "},{"kind":"code","text":"false"},{"kind":"text","text":". A source is either a byte based, a character based, or with no content, but never both byte and character based at the same time."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The method "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getBytes()"},"code":true,"children":[{"kind":"text","text":"getBytes()"}]},{"kind":"text","text":" is only supported if this method returns "},{"kind":"code","text":"true"},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getBytes()"},"code":true,"children":[{"kind":"text","text":"getBytes()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":403}},{"id":"org.graalvm.polyglot.Source#getLineCount()","anchor":"getLineCount()","kind":"method","name":"getLineCount","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"getLineCount"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this source cannot contain "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasCharacters()"},"code":true,"children":[{"kind":"text","text":"characters"}]},{"kind":"text","text":"."}]}]}],"doc":{"summary":[{"kind":"text","text":"The number of text lines of a character based source, including empty lines; characters at the end of the source without a terminating newline count as a line."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"The number of text lines of a character based source, including empty lines; characters at the end of the source without a terminating newline count as a line. Causes the contents of this source to be loaded if they are loaded lazily."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":416}},{"id":"org.graalvm.polyglot.Source#getLineNumber(int)","anchor":"getLineNumber(int)","kind":"method","name":"getLineNumber","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"getLineNumber"},{"kind":"punct","text":"("},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"param","text":"offset"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"params":[{"name":"offset","type":[{"kind":"keyword","text":"int"}]}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this source cannot contain "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasCharacters()"},"code":true,"children":[{"kind":"text","text":"characters"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the offset is outside the text contents"}]}]}],"doc":{"summary":[{"kind":"text","text":"Given a 0-based character offset, return the 1-based number of the line that includes the position."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Given a 0-based character offset, return the 1-based number of the line that includes the position. Causes the contents of this source to be loaded if they are loaded lazily."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":429}},{"id":"org.graalvm.polyglot.Source#getColumnNumber(int)","anchor":"getColumnNumber(int)","kind":"method","name":"getColumnNumber","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"getColumnNumber"},{"kind":"punct","text":"("},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"param","text":"offset"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"params":[{"name":"offset","type":[{"kind":"keyword","text":"int"}]}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this source cannot contain "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasCharacters()"},"code":true,"children":[{"kind":"text","text":"characters"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the offset is outside the text contents"}]}]}],"doc":{"summary":[{"kind":"text","text":"Given a 0-based character offset, return the 1-based number of the column at the position."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Given a 0-based character offset, return the 1-based number of the column at the position. Causes the contents of this source to be loaded if they are loaded lazily."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":442}},{"id":"org.graalvm.polyglot.Source#getLineStartOffset(int)","anchor":"getLineStartOffset(int)","kind":"method","name":"getLineStartOffset","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"getLineStartOffset"},{"kind":"punct","text":"("},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"param","text":"lineNumber"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"params":[{"name":"lineNumber","type":[{"kind":"keyword","text":"int"}]}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this source cannot contain "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasCharacters()"},"code":true,"children":[{"kind":"text","text":"characters"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if there is no such line in the text"}]}]}],"doc":{"summary":[{"kind":"text","text":"Given a 1-based line number, return the 0-based offset of the first character in the line."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Given a 1-based line number, return the 0-based offset of the first character in the line."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":454}},{"id":"org.graalvm.polyglot.Source#getLineLength(int)","anchor":"getLineLength(int)","kind":"method","name":"getLineLength","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"getLineLength"},{"kind":"punct","text":"("},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"param","text":"lineNumber"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"params":[{"name":"lineNumber","type":[{"kind":"keyword","text":"int"}]}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this source cannot contain "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasCharacters()"},"code":true,"children":[{"kind":"text","text":"characters"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if there is no such line in the text"}]}]}],"doc":{"summary":[{"kind":"text","text":"The number of characters (not counting a possible terminating newline) in a (1-based) numbered line."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"The number of characters (not counting a possible terminating newline) in a (1-based) numbered line. Causes the contents of this source to be loaded if they are loaded lazily."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":467}},{"id":"org.graalvm.polyglot.Source#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":476}},{"id":"org.graalvm.polyglot.Source#hashCode()","anchor":"hashCode()","kind":"method","name":"hashCode","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"hashCode"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"overrides":{"id":"java.lang.Object#hashCode()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":486}},{"id":"org.graalvm.polyglot.Source#equals(java.lang.Object)","anchor":"equals(java.lang.Object)","kind":"method","name":"equals","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"equals"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"obj"},{"kind":"punct","text":")"}],"params":[{"name":"obj","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"overrides":{"id":"java.lang.Object#equals(java.lang.Object)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":496}},{"id":"org.graalvm.polyglot.Source#newBuilder(java.lang.String,java.lang.CharSequence,java.lang.String)","anchor":"newBuilder(java.lang.String,java.lang.CharSequence,java.lang.String)","kind":"method","name":"newBuilder","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"newBuilder"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"language"},{"kind":"punct","text":", "},{"kind":"type","text":"CharSequence","ref":"java.lang.CharSequence","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html"},{"kind":"punct","text":" "},{"kind":"param","text":"characters"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"name"},{"kind":"punct","text":")"}],"params":[{"name":"language","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the language id, must not be "},{"kind":"code","text":"null"}]}]},{"name":"characters","type":[{"kind":"type","text":"CharSequence","ref":"java.lang.CharSequence","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the character sequence or string, must not be "},{"kind":"code","text":"null"}]}]},{"name":"name","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the name of the source, if "},{"kind":"code","text":"null"},{"kind":"text","text":" then "},{"kind":"code","text":"\"Unnamed\""},{"kind":"text","text":" will be used as name."}]}]}],"returns":{"type":[{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Creates a new character based literal source from a character sequence."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new character based literal source from a character sequence. The given characters must not mutate after they were accessed for the first time."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Use this method for sources that do originate from a literal. For file or URL sources use the appropriate builder constructor and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#content(java.lang.CharSequence)"},"code":true,"children":[{"kind":"text","text":"Builder.content(CharSequence)"}]},{"kind":"text","text":". Example usage:"}]},{"kind":"code","text":"Source source = Source.newBuilder(\"js\", \"function() {\\n\" + \"  return 'Hi';\\n\" + \"}\\n\", \"hi.js\").buildLiteral();\nassert \"hi.js\".equals(source.getName());"}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":525}},{"id":"org.graalvm.polyglot.Source#newBuilder(java.lang.String,org.graalvm.polyglot.io.ByteSequence,java.lang.String)","anchor":"newBuilder(java.lang.String,org.graalvm.polyglot.io.ByteSequence,java.lang.String)","kind":"method","name":"newBuilder","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"newBuilder"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"language"},{"kind":"punct","text":", "},{"kind":"type","text":"ByteSequence","ref":"org.graalvm.polyglot.io.ByteSequence"},{"kind":"punct","text":" "},{"kind":"param","text":"bytes"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"name"},{"kind":"punct","text":")"}],"params":[{"name":"language","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the language id, must not be "},{"kind":"code","text":"null"}]}]},{"name":"bytes","type":[{"kind":"type","text":"ByteSequence","ref":"org.graalvm.polyglot.io.ByteSequence"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the byte sequence or string, must not be "},{"kind":"code","text":"null"}]}]},{"name":"name","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the name of the source, if "},{"kind":"code","text":"null"},{"kind":"text","text":" then "},{"kind":"code","text":"\"Unnamed\""},{"kind":"text","text":" will be used as name."}]}]}],"returns":{"type":[{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Creates a new byte based literal source from a byte sequence."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new byte based literal source from a byte sequence. The given bytes must not mutate after they were accessed for the first time."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Use this method for sources that do originate from a literal. For file or URL sources use the appropriate builder constructor and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#content(java.lang.CharSequence)"},"code":true,"children":[{"kind":"text","text":"Builder.content(CharSequence)"}]},{"kind":"text","text":". Example usage:"}]},{"kind":"code","text":""}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":546}},{"id":"org.graalvm.polyglot.Source#newBuilder(java.lang.String,java.io.File)","anchor":"newBuilder(java.lang.String,java.io.File)","kind":"method","name":"newBuilder","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"newBuilder"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"language"},{"kind":"punct","text":", "},{"kind":"type","text":"File","ref":"java.io.File","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/File.html"},{"kind":"punct","text":" "},{"kind":"param","text":"file"},{"kind":"punct","text":")"}],"params":[{"name":"language","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the language id, must not be "},{"kind":"code","text":"null"}]}]},{"name":"file","type":[{"kind":"type","text":"File","ref":"java.io.File","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/File.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the file to use, must not be "},{"kind":"code","text":"null"}]}]}],"returns":{"type":[{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Creates a new file based source builder from a given file."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new file based source builder from a given file. A file based source is either interpreted as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasBytes()"},"code":true,"children":[{"kind":"text","text":"binary"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasCharacters()"},"code":true,"children":[{"kind":"text","text":"character"}]},{"kind":"text","text":" source depending on the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getDefaultMimeType()"},"code":true,"children":[{"kind":"text","text":"default MIME type"}]},{"kind":"text","text":" of the language, the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#content(org.graalvm.polyglot.io.ByteSequence)"},"code":true,"children":[{"kind":"text","text":"contents"}]},{"kind":"text","text":" or the specified "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#mimeType(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"MIME type"}]},{"kind":"text","text":". A language may be detected from an existing file using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#findLanguage(java.io.File)"},"code":true,"children":[{"kind":"text","text":"findLanguage(File)"}]},{"kind":"text","text":"."}]},{"kind":"code","text":"File file = new File(dir, name);\nassert name.endsWith(\".java\") : \"Imagine proper file\";\n\nString language = Source.findLanguage(file);\nSource source = Source.newBuilder(language, file).build();\n\nassert file.getName().equals(source.getName());\nassert file.getPath().equals(source.getPath());\nassert file.toURI().equals(source.getURI());"}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":574}},{"id":"org.graalvm.polyglot.Source#newBuilder(java.lang.String,java.net.URL)","anchor":"newBuilder(java.lang.String,java.net.URL)","kind":"method","name":"newBuilder","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"newBuilder"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"language"},{"kind":"punct","text":", "},{"kind":"type","text":"URL","ref":"java.net.URL","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URL.html"},{"kind":"punct","text":" "},{"kind":"param","text":"url"},{"kind":"punct","text":")"}],"params":[{"name":"language","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the language id, must not be "},{"kind":"code","text":"null"}]}]},{"name":"url","type":[{"kind":"type","text":"URL","ref":"java.net.URL","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URL.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the URL to use and load, must not be "},{"kind":"code","text":"null"}]}]}],"returns":{"type":[{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Creates a new URL based source builder from a given URL."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new URL based source builder from a given URL. A URL based source is either interpreted as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasBytes()"},"code":true,"children":[{"kind":"text","text":"binary"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasCharacters()"},"code":true,"children":[{"kind":"text","text":"character"}]},{"kind":"text","text":" source depending on the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getDefaultMimeType()"},"code":true,"children":[{"kind":"text","text":"default MIME type"}]},{"kind":"text","text":" of the language, the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#content(org.graalvm.polyglot.io.ByteSequence)"},"code":true,"children":[{"kind":"text","text":"contents"}]},{"kind":"text","text":" or the specified "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#mimeType(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"MIME type"}]},{"kind":"text","text":". A language may be detected from an existing file using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#findLanguage(java.net.URL)"},"code":true,"children":[{"kind":"text","text":"findLanguage(URL)"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Example usage:"}]},{"kind":"code","text":"URL resource = relativeClass.getResource(\"sample.js\");\nSource source = Source.newBuilder(\"js\", resource).build();\nassert resource.toExternalForm().equals(source.getPath());\nassert \"sample.js\".equals(source.getName());\nassert resource.toURI().equals(source.getURI());"}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":600}},{"id":"org.graalvm.polyglot.Source#newBuilder(java.lang.String,java.io.Reader,java.lang.String)","anchor":"newBuilder(java.lang.String,java.io.Reader,java.lang.String)","kind":"method","name":"newBuilder","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"newBuilder"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"language"},{"kind":"punct","text":", "},{"kind":"type","text":"Reader","ref":"java.io.Reader","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/Reader.html"},{"kind":"punct","text":" "},{"kind":"param","text":"source"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"name"},{"kind":"punct","text":")"}],"params":[{"name":"language","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},{"name":"source","type":[{"kind":"type","text":"Reader","ref":"java.io.Reader","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/Reader.html"}]},{"name":"name","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Creates new character based literal source from a reader."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates new character based literal source from a reader."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Use this method for sources that do originate from a literal. For file or URL sources use the appropriate builder constructor and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#content(java.lang.CharSequence)"},"code":true,"children":[{"kind":"text","text":"Builder.content(CharSequence)"}]},{"kind":"text","text":"."}]},{"kind":"code","text":"Reader stream = new InputStreamReader(\n                relativeClass.getResourceAsStream(\"sample.js\"));\nSource source = Source.newBuilder(\"js\", stream, \"sample.js\").build();\nassert \"sample.js\".equals(source.getName());"}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":620}},{"id":"org.graalvm.polyglot.Source#create(java.lang.String,java.lang.CharSequence)","anchor":"create(java.lang.String,java.lang.CharSequence)","kind":"method","name":"create","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"},{"kind":"punct","text":" "},{"kind":"name","text":"create"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"language"},{"kind":"punct","text":", "},{"kind":"type","text":"CharSequence","ref":"java.lang.CharSequence","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html"},{"kind":"punct","text":" "},{"kind":"param","text":"source"},{"kind":"punct","text":")"}],"params":[{"name":"language","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},{"name":"source","type":[{"kind":"type","text":"CharSequence","ref":"java.lang.CharSequence","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html"}]}],"returns":{"type":[{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"}]},"doc":{"summary":[{"kind":"text","text":"Shortcut for creating a source object from a language and char sequence."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Shortcut for creating a source object from a language and char sequence. The given characters must not mutate after they were accessed for the first time."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Use for sources that do not come from a file, or URL. If they do, use the appropriate builder and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#content(java.lang.CharSequence)"},"code":true,"children":[{"kind":"text","text":"Builder.content(CharSequence)"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":633}},{"id":"org.graalvm.polyglot.Source#findLanguage(java.io.File)","anchor":"findLanguage(java.io.File)","kind":"method","name":"findLanguage","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"findLanguage"},{"kind":"punct","text":"("},{"kind":"type","text":"File","ref":"java.io.File","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/File.html"},{"kind":"punct","text":" "},{"kind":"param","text":"file"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"file","type":[{"kind":"type","text":"File","ref":"java.io.File","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/File.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the file to find the first language for"}]}]}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"throws":[{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if an error opening the file occurred."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the id of the first language that supports evaluating the probed mime type of a given "},{"kind":"link","target":{"id":"java.io.File","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/File.html"},"code":true,"children":[{"kind":"text","text":"file"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the id of the first language that supports evaluating the probed mime type of a given "},{"kind":"link","target":{"id":"java.io.File","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/File.html"},"code":true,"children":[{"kind":"text","text":"file"}]},{"kind":"text","text":". This method is a shortcut for: "},{"kind":"code","text":"\n"},{"kind":"code","text":"\nString mimeType = Source.findMimeType(file);\nreturn mimeType != null ? Source.findLanguage(mimeType) : null;\n"},{"kind":"code","text":"\n"}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#findMimeType(java.net.URL)"},"code":true,"children":[{"kind":"text","text":"findMimeType(URL)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#findLanguage(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"findLanguage(String)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":654}},{"id":"org.graalvm.polyglot.Source#findLanguage(java.net.URL)","anchor":"findLanguage(java.net.URL)","kind":"method","name":"findLanguage","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"findLanguage"},{"kind":"punct","text":"("},{"kind":"type","text":"URL","ref":"java.net.URL","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URL.html"},{"kind":"punct","text":" "},{"kind":"param","text":"url"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"url","type":[{"kind":"type","text":"URL","ref":"java.net.URL","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URL.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the url to find the first language for"}]}]}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"throws":[{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if an error opening the url occurred."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the id of the first language that supports evaluating the probed mime type of a given "},{"kind":"link","target":{"id":"java.net.URL","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URL.html"},"code":true,"children":[{"kind":"text","text":"URL"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the id of the first language that supports evaluating the probed mime type of a given "},{"kind":"link","target":{"id":"java.net.URL","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URL.html"},"code":true,"children":[{"kind":"text","text":"URL"}]},{"kind":"text","text":". This method is a shortcut for: "},{"kind":"code","text":"\n"},{"kind":"code","text":"\nString mimeType = Source.findMimeType(url);\nreturn mimeType != null ? Source.findLanguage(mimeType) : null;\n"},{"kind":"code","text":"\n"}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#findMimeType(java.net.URL)"},"code":true,"children":[{"kind":"text","text":"findMimeType(URL)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#findLanguage(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"findLanguage(String)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":675}},{"id":"org.graalvm.polyglot.Source#findMimeType(java.io.File)","anchor":"findMimeType(java.io.File)","kind":"method","name":"findMimeType","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"findMimeType"},{"kind":"punct","text":"("},{"kind":"type","text":"File","ref":"java.io.File","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/File.html"},{"kind":"punct","text":" "},{"kind":"param","text":"file"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"file","type":[{"kind":"type","text":"File","ref":"java.io.File","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/File.html"}]}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"throws":[{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if an error opening the file occurred."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the probed MIME type for a given file, or "},{"kind":"code","text":"null"},{"kind":"text","text":" if no MIME type could be resolved."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the probed MIME type for a given file, or "},{"kind":"code","text":"null"},{"kind":"text","text":" if no MIME type could be resolved. Typically the MIME type is identified using the file extension and/or using its contents. Probing the MIME type of an "},{"kind":"link","target":{"id":"java.io.File","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/File.html"},"code":true,"children":[{"kind":"text","text":"File"}]},{"kind":"text","text":" may require to opening the file."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#findLanguage(java.io.File)"},"code":true,"children":[{"kind":"text","text":"findLanguage(File)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":688}},{"id":"org.graalvm.polyglot.Source#findMimeType(java.net.URL)","anchor":"findMimeType(java.net.URL)","kind":"method","name":"findMimeType","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"findMimeType"},{"kind":"punct","text":"("},{"kind":"type","text":"URL","ref":"java.net.URL","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URL.html"},{"kind":"punct","text":" "},{"kind":"param","text":"url"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"url","type":[{"kind":"type","text":"URL","ref":"java.net.URL","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URL.html"}]}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"throws":[{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if an error opening the url occurred."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the probed MIME type for a given url, or "},{"kind":"code","text":"null"},{"kind":"text","text":" if no MIME type could be resolved."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the probed MIME type for a given url, or "},{"kind":"code","text":"null"},{"kind":"text","text":" if no MIME type could be resolved. Typically the MIME type is identified using the file extension, connection meta-data and/or using it contents. Returns "},{"kind":"code","text":"null"},{"kind":"text","text":" if the language of the given file could not be detected. Probing the language of a URL may require to open a new URL connection."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#findLanguage(java.net.URL)"},"code":true,"children":[{"kind":"text","text":"findLanguage(URL)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":703}},{"id":"org.graalvm.polyglot.Source#findLanguage(java.lang.String)","anchor":"findLanguage(java.lang.String)","kind":"method","name":"findLanguage","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"findLanguage"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"mimeType"},{"kind":"punct","text":")"}],"params":[{"name":"mimeType","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns the first installed language that supports evaluating sources for a given MIME type."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the first installed language that supports evaluating sources for a given MIME type. Returns "},{"kind":"code","text":"null"},{"kind":"text","text":" if no language was found that supports a given MIME type. The languages are queried in the same order as returned by "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#getLanguages()"},"code":true,"children":[{"kind":"text","text":"Engine.getLanguages()"}]},{"kind":"text","text":". Mime-types don't adhere to the MIME type format will return "},{"kind":"code","text":"null"},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":715}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Representation of a source code unit and its contents that can be evaluated in an execution "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"context"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Representation of a source code unit and its contents that can be evaluated in an execution "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"context"}]},{"kind":"text","text":". Each source is associated with the ID of the language."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"From a file on disk"}]},{"kind":"paragraph","children":[{"kind":"text","text":"Each file is represented as a canonical object, indexed by the absolute, canonical path name of the file. File content is "},{"kind":"emphasis","children":[{"kind":"text","text":"read eagerly"}]},{"kind":"text","text":" and may be optionally "},{"kind":"emphasis","children":[{"kind":"text","text":"cached"}]},{"kind":"text","text":". Sample usage:"}]},{"kind":"code","text":"File file = new File(dir, name);\nassert name.endsWith(\".java\") : \"Imagine proper file\";\n\nString language = Source.findLanguage(file);\nSource source = Source.newBuilder(language, file).build();\n\nassert file.getName().equals(source.getName());\nassert file.getPath().equals(source.getPath());\nassert file.toURI().equals(source.getURI());"},{"kind":"paragraph","children":[{"kind":"text","text":"The starting point is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#newBuilder(java.lang.String,java.io.File)"},"code":true,"children":[{"kind":"text","text":"Source.newBuilder(String, java.io.File)"}]},{"kind":"text","text":" method."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Read from a URL"}]},{"kind":"paragraph","children":[{"kind":"text","text":"One can read remote or in JAR resources using the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#newBuilder(java.lang.String,java.net.URL)"},"code":true,"children":[{"kind":"text","text":"Source.newBuilder(String, java.net.URL)"}]},{"kind":"text","text":" factory:"}]},{"kind":"code","text":"URL resource = relativeClass.getResource(\"sample.js\");\nSource source = Source.newBuilder(\"js\", resource).build();\nassert resource.toExternalForm().equals(source.getPath());\nassert \"sample.js\".equals(source.getName());\nassert resource.toURI().equals(source.getURI());"},{"kind":"paragraph","children":[{"kind":"text","text":"Each URL source is represented as a canonical object, indexed by the URL. Contents are "},{"kind":"emphasis","children":[{"kind":"text","text":"read eagerly"}]},{"kind":"text","text":" once the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#build()"},"code":true,"children":[{"kind":"text","text":"Builder.build()"}]},{"kind":"text","text":" method is called."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Source from a literal text"}]},{"kind":"paragraph","children":[{"kind":"text","text":"An anonymous immutable code snippet can be created from a string via the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#newBuilder(java.lang.String,java.lang.CharSequence,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"Source.newBuilder(String, java.lang.CharSequence, String)"}]},{"kind":"text","text":" factory method: "},{"kind":"break"}]},{"kind":"code","text":"Source source = Source.newBuilder(\"js\", \"function() {\\n\" + \"  return 'Hi';\\n\" + \"}\\n\", \"hi.js\").buildLiteral();\nassert \"hi.js\".equals(source.getName());"},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Reading from a stream"}]},{"kind":"paragraph","children":[{"kind":"text","text":"If one has a "},{"kind":"link","target":{"id":"java.io.Reader","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/Reader.html"},"code":true,"children":[{"kind":"text","text":"Reader"}]},{"kind":"text","text":" one can convert its content into a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":" via "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#newBuilder(java.lang.String,java.io.Reader,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"Source.newBuilder(String, java.io.Reader, String)"}]},{"kind":"text","text":" method: "},{"kind":"break"}]},{"kind":"code","text":"Reader stream = new InputStreamReader(\n                relativeClass.getResourceAsStream(\"sample.js\"));\nSource source = Source.newBuilder(\"js\", stream, \"sample.js\").build();\nassert \"sample.js\".equals(source.getName());"},{"kind":"paragraph","children":[{"kind":"text","text":"the content is "},{"kind":"emphasis","children":[{"kind":"text","text":"read eagerly"}]},{"kind":"text","text":" once the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#build()"},"code":true,"children":[{"kind":"text","text":"Builder.build()"}]},{"kind":"text","text":" method is called."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Reading from bytes"}]},{"kind":"paragraph","children":[{"kind":"text","text":"Sources can be created from bytes. Please note that all character related methods will throw an "},{"kind":"link","target":{"id":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},"code":true,"children":[{"kind":"text","text":"UnsupportedOperationException"}]},{"kind":"text","text":" if that is the case."}]},{"kind":"code","text":"byte[] bytes = new byte[]{ /* Binary */ };\nSource source = Source.newBuilder(\"llvm\",\n                ByteSequence.create(bytes),\n                \"<literal>\").buildLiteral();"},{"kind":"heading","level":2,"children":[{"kind":"text","text":"Attributes"}]},{"kind":"paragraph","children":[{"kind":"text","text":"The source object can be associated with various attributes like "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getName()"},"code":true,"children":[{"kind":"text","text":"getName()"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getURI()"},"code":true,"children":[{"kind":"text","text":"getURI()"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getMimeType()"},"code":true,"children":[{"kind":"text","text":"getMimeType()"}]},{"kind":"text","text":" and these are immutable. The system makes the best effort to derive values of these attributes from the location and/or content of the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":" object. However, to give the user that creates the source control over these attributes, the API offers an way to alter values of these attributes."}]},{"kind":"heading","level":2,"children":[{"kind":"text","text":"Character and byte based Sources"}]},{"kind":"paragraph","children":[{"kind":"text","text":"A source is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasBytes()"},"code":true,"children":[{"kind":"text","text":"byte"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasCharacters()"},"code":true,"children":[{"kind":"text","text":"character"}]},{"kind":"text","text":" based, or none of those when no content is specified. For literal sources it depends on whether the byte or character based factory method was used. When the source was loaded from a "},{"kind":"link","target":{"id":"java.io.File","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/File.html"},"code":true,"children":[{"kind":"text","text":"file"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"java.net.URL","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URL.html"},"code":true,"children":[{"kind":"text","text":"url"}]},{"kind":"text","text":" then the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getDefaultMimeType()"},"code":true,"children":[{"kind":"text","text":"default MIME type"}]},{"kind":"text","text":" of the provided language will be used to determine whether bytes or characters should be loaded. The behavior can be customized by specifying a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#mimeType(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"MIME type"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#content(org.graalvm.polyglot.io.ByteSequence)"},"code":true,"children":[{"kind":"text","text":"content"}]},{"kind":"text","text":" explicitly. If the specified or inferred MIME type starts with "},{"kind":"code","text":"'text/"},{"kind":"text","text":" or the MIME types is "},{"kind":"code","text":"null"},{"kind":"text","text":" then it will be interpreted as character based, otherwise byte based."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#eval(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"To evaluate sources."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#findLanguage(java.io.File)"},"code":true,"children":[{"kind":"text","text":"To detect a language using a File"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#findLanguage(java.net.URL)"},"code":true,"children":[{"kind":"text","text":"To detect a language using a URL."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#findMimeType(java.io.File)"},"code":true,"children":[{"kind":"text","text":"To detect a MIME type using a File."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#findMimeType(java.net.URL)"},"code":true,"children":[{"kind":"text","text":"To detect a MIME type using a URL."}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":162}},{"id":"org.graalvm.polyglot.Source$Builder","name":"Source.Builder","kind":"class","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"Source.Builder"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"enclosing":"org.graalvm.polyglot.Source","members":[{"id":"org.graalvm.polyglot.Source$Builder#name(java.lang.String)","anchor":"name(java.lang.String)","kind":"method","name":"name","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"name"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"newName"},{"kind":"punct","text":")"}],"params":[{"name":"newName","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"name that replaces the previously given one. If set to "},{"kind":"code","text":"null"},{"kind":"text","text":" then "},{"kind":"code","text":"\"Unnamed\""},{"kind":"text","text":" will be used."}]}]}],"returns":{"type":[{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"instance of "},{"kind":"code","text":"this"},{"kind":"text","text":" builder"}]}]},"doc":{"summary":[{"kind":"text","text":"Specifies a name to the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#build()"},"code":true,"children":[{"kind":"text","text":"to-be-built"}]},{"kind":"text","text":" "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Specifies a name to the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#build()"},"code":true,"children":[{"kind":"text","text":"to-be-built"}]},{"kind":"text","text":" "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":829}},{"id":"org.graalvm.polyglot.Source$Builder#content(java.lang.String)","anchor":"content(java.lang.String)","kind":"method","name":"content","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"content"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"code"},{"kind":"punct","text":")"}],"params":[{"name":"code","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the code to be available via "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getCharacters()"},"code":true,"children":[{"kind":"text","text":"Source.getCharacters()"}]}]}]}],"returns":{"type":[{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"instance of this builder"}]}]},"doc":{"summary":[{"kind":"text","text":"Specifies content of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#build()"},"code":true,"children":[{"kind":"text","text":"to-be-built"}]},{"kind":"text","text":" "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Specifies content of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#build()"},"code":true,"children":[{"kind":"text","text":"to-be-built"}]},{"kind":"text","text":" "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":". Using this method one can ignore the real content of a file or URL and use already read one, or completely different one. Example:"}]},{"kind":"code","text":"URL resource = relativeClass.getResource(\"sample.js\");\nSource source = Source.newBuilder(\"js\", resource).content(\"{}\").buildLiteral();\nassert resource.toExternalForm().equals(source.getPath());\nassert \"sample.js\".equals(source.getName());\nassert resource.toExternalForm().equals(source.getURI().toString());\nassert \"{}\".equals(source.getCharacters());"}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":852}},{"id":"org.graalvm.polyglot.Source$Builder#content(java.lang.CharSequence)","anchor":"content(java.lang.CharSequence)","kind":"method","name":"content","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"content"},{"kind":"punct","text":"("},{"kind":"type","text":"CharSequence","ref":"java.lang.CharSequence","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html"},{"kind":"punct","text":" "},{"kind":"param","text":"characters"},{"kind":"punct","text":")"}],"params":[{"name":"characters","type":[{"kind":"type","text":"CharSequence","ref":"java.lang.CharSequence","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the code to be available via "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getCharacters()"},"code":true,"children":[{"kind":"text","text":"Source.getCharacters()"}]}]}]}],"returns":{"type":[{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"instance of this builder - which's "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#build()"},"code":true,"children":[{"kind":"text","text":"build()"}]},{"kind":"text","text":" method no longer throws an "},{"kind":"link","target":{"id":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"},"code":true,"children":[{"kind":"text","text":"IOException"}]}]}]},"doc":{"summary":[{"kind":"text","text":"Specifies character based content of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#build()"},"code":true,"children":[{"kind":"text","text":"to-be-built"}]},{"kind":"text","text":" "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Specifies character based content of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#build()"},"code":true,"children":[{"kind":"text","text":"to-be-built"}]},{"kind":"text","text":" "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":". Using this method one can ignore the real content of a file or URL and use already read one, or completely different one. The given characters must not mutate after they were accessed for the first time. Example:"}]},{"kind":"code","text":"URL resource = relativeClass.getResource(\"sample.js\");\nSource source = Source.newBuilder(\"js\", resource).content(\"{}\").buildLiteral();\nassert resource.toExternalForm().equals(source.getPath());\nassert \"sample.js\".equals(source.getName());\nassert resource.toExternalForm().equals(source.getURI().toString());\nassert \"{}\".equals(source.getCharacters());"}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":876}},{"id":"org.graalvm.polyglot.Source$Builder#content(org.graalvm.polyglot.io.ByteSequence)","anchor":"content(org.graalvm.polyglot.io.ByteSequence)","kind":"method","name":"content","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"content"},{"kind":"punct","text":"("},{"kind":"type","text":"ByteSequence","ref":"org.graalvm.polyglot.io.ByteSequence"},{"kind":"punct","text":" "},{"kind":"param","text":"bytes"},{"kind":"punct","text":")"}],"params":[{"name":"bytes","type":[{"kind":"type","text":"ByteSequence","ref":"org.graalvm.polyglot.io.ByteSequence"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the code to be available via "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getBytes()"},"code":true,"children":[{"kind":"text","text":"Source.getBytes()"}]}]}]}],"returns":{"type":[{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"instance of this builder - which's "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#build()"},"code":true,"children":[{"kind":"text","text":"build()"}]},{"kind":"text","text":" method no longer throws an "},{"kind":"link","target":{"id":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"},"code":true,"children":[{"kind":"text","text":"IOException"}]}]}]},"doc":{"summary":[{"kind":"text","text":"Specifies byte based content of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#build()"},"code":true,"children":[{"kind":"text","text":"to-be-built"}]},{"kind":"text","text":" "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Specifies byte based content of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#build()"},"code":true,"children":[{"kind":"text","text":"to-be-built"}]},{"kind":"text","text":" "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":". Using this method one can ignore the real content of a file or URL and use already read one, or completely different one. The given bytes must not mutate after they were accessed for the first time. Example:"}]},{"kind":"code","text":"URL resource = relativeClass.getResource(\"sample.js\");\nSource source = Source.newBuilder(\"js\", resource).content(\"{}\").buildLiteral();\nassert resource.toExternalForm().equals(source.getPath());\nassert \"sample.js\".equals(source.getName());\nassert resource.toExternalForm().equals(source.getURI().toString());\nassert \"{}\".equals(source.getCharacters());"}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#content(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"content(String)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":903}},{"id":"org.graalvm.polyglot.Source$Builder#mimeType(java.lang.String)","anchor":"mimeType(java.lang.String)","kind":"method","name":"mimeType","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"mimeType"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"mimeType"},{"kind":"punct","text":")"}],"params":[{"name":"mimeType","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the new mime type to be assigned, or "},{"kind":"code","text":"null"},{"kind":"text","text":" if default MIME type should be used."}]}]}],"returns":{"type":[{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"instance of "},{"kind":"code","text":"this"},{"kind":"text","text":" builder ready to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#build()"},"code":true,"children":[{"kind":"text","text":"create new source"}]}]}]},"doc":{"summary":[{"kind":"text","text":"Explicitly assigns a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getMimeType()"},"code":true,"children":[{"kind":"text","text":"MIME type"}]},{"kind":"text","text":" to the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#build()"},"code":true,"children":[{"kind":"text","text":"to-be-built"}]},{"kind":"text","text":" "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Explicitly assigns a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getMimeType()"},"code":true,"children":[{"kind":"text","text":"MIME type"}]},{"kind":"text","text":" to the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#build()"},"code":true,"children":[{"kind":"text","text":"to-be-built"}]},{"kind":"text","text":" "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":". If the MIME type is "},{"kind":"code","text":"null"},{"kind":"text","text":" then the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getDefaultMimeType()"},"code":true,"children":[{"kind":"text","text":"default MIME type"}]},{"kind":"text","text":" of the language will be used to interpret the source. If set explicitly then the language needs to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getMimeTypes()"},"code":true,"children":[{"kind":"text","text":"support"}]},{"kind":"text","text":" the MIME type in order to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#eval(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"evaluate"}]},{"kind":"text","text":" the source. If not "},{"kind":"code","text":"null"},{"kind":"text","text":" the MIME type is already verified containing no spaces and a '/' between group and sub-group. An example for a valid MIME type is: "},{"kind":"code","text":"text/javascript"},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The MIME type can be guessed by the system based on "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#findMimeType(java.io.File)"},"code":true,"children":[{"kind":"text","text":"files"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#findMimeType(java.net.URL)"},"code":true,"children":[{"kind":"text","text":"urls"}]},{"kind":"text","text":". If a source is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#hasBytes()"},"code":true,"children":[{"kind":"text","text":"binary"}]},{"kind":"text","text":" based then the MIME type must also be a binary based MIME type. All MIME types starting with 'text/' will be interpreted as character based MIME types."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getDefaultMimeType()"},"code":true,"children":[{"kind":"text","text":"Language.getDefaultMimeType()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getMimeTypes()"},"code":true,"children":[{"kind":"text","text":"Language.getMimeTypes()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#findMimeType(java.io.File)"},"code":true,"children":[{"kind":"text","text":"Source.findMimeType(File)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#findMimeType(java.net.URL)"},"code":true,"children":[{"kind":"text","text":"Source.findMimeType(URL)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":933}},{"id":"org.graalvm.polyglot.Source$Builder#interactive(boolean)","anchor":"interactive(boolean)","kind":"method","name":"interactive","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"interactive"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"interactive"},{"kind":"punct","text":")"}],"params":[{"name":"interactive","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the instance of this builder"}]}]},"doc":{"summary":[{"kind":"text","text":"Marks the source as interactive."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Marks the source as interactive. "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#eval(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"Evaluation"}]},{"kind":"text","text":" of interactive sources by an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#isInteractive()"},"code":true,"children":[{"kind":"text","text":"interactive language"}]},{"kind":"text","text":" can use the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]},{"kind":"text","text":" output streams to print the result and read an input. However, non-interactive languages are expected to ignore the interactive property of sources and not use the polyglot engine streams. Any desired printing of the evaluated result provided by a non-interactive language needs to be handled by the caller. Calling of this method influences the result of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#isInteractive()"},"code":true,"children":[{"kind":"text","text":"Source.isInteractive()"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":951}},{"id":"org.graalvm.polyglot.Source$Builder#internal(boolean)","anchor":"internal(boolean)","kind":"method","name":"internal","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"internal"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"internal"},{"kind":"punct","text":")"}],"params":[{"name":"internal","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the instance of this builder"}]}]},"doc":{"summary":[{"kind":"text","text":"Set whether this source has been marked as "},{"kind":"emphasis","children":[{"kind":"text","text":"internal"}]},{"kind":"text","text":", meaning that it has been provided by the infrastructure, language implementation, or system library."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Set whether this source has been marked as "},{"kind":"emphasis","children":[{"kind":"text","text":"internal"}]},{"kind":"text","text":", meaning that it has been provided by the infrastructure, language implementation, or system library. "},{"kind":"emphasis","children":[{"kind":"text","text":"Internal"}]},{"kind":"text","text":" sources are presumed to be irrelevant to guest language programmers, as well as possibly confusing and revealing of language implementation details."}]},{"kind":"paragraph","children":[{"kind":"text","text":"On the other hand, tools should be free to make "},{"kind":"emphasis","children":[{"kind":"text","text":"internal"}]},{"kind":"text","text":" sources visible in (possibly privileged) modes that are useful for language implementors."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":969}},{"id":"org.graalvm.polyglot.Source$Builder#cached(boolean)","anchor":"cached(boolean)","kind":"method","name":"cached","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"cached"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"cached"},{"kind":"punct","text":")"}],"params":[{"name":"cached","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"instance of "},{"kind":"code","text":"this"},{"kind":"text","text":" builder ready to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#build()"},"code":true,"children":[{"kind":"text","text":"create new source"}]}]}]},"doc":{"summary":[{"kind":"text","text":"Enables or disables code caching for this source."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Enables or disables code caching for this source. By default code caching is enabled. If "},{"kind":"code","text":"true"},{"kind":"text","text":" then the source does not require parsing every time this source is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#eval(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"evaluated"}]},{"kind":"text","text":". If "},{"kind":"code","text":"false"},{"kind":"text","text":" then the source requires parsing every time the source is evaluated but does not remember any state. Disabling caching may be useful if the source is known to only be evaluated once."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If a source instance is no longer referenced by the client then all code caches will be freed automatically. Also, if the underlying context or engine is no longer referenced then cached code for evaluated sources will be freed automatically."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":988}},{"id":"org.graalvm.polyglot.Source$Builder#uri(java.net.URI)","anchor":"uri(java.net.URI)","kind":"method","name":"uri","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"uri"},{"kind":"punct","text":"("},{"kind":"type","text":"URI","ref":"java.net.URI","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URI.html"},{"kind":"punct","text":" "},{"kind":"param","text":"newUri"},{"kind":"punct","text":")"}],"params":[{"name":"newUri","type":[{"kind":"type","text":"URI","ref":"java.net.URI","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URI.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the URL to use instead of default one, cannot be "},{"kind":"code","text":"null"}]}]}],"returns":{"type":[{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the instance of this builder"}]}]},"doc":{"summary":[{"kind":"text","text":"Assigns new "},{"kind":"link","target":{"id":"java.net.URI","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URI.html"},"code":true,"children":[{"kind":"text","text":"URI"}]},{"kind":"text","text":" to the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#build()"},"code":true,"children":[{"kind":"text","text":"to-be-created"}]},{"kind":"text","text":" "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Assigns new "},{"kind":"link","target":{"id":"java.net.URI","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URI.html"},"code":true,"children":[{"kind":"text","text":"URI"}]},{"kind":"text","text":" to the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#build()"},"code":true,"children":[{"kind":"text","text":"to-be-created"}]},{"kind":"text","text":" "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":". Each source provides "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#getURI()"},"code":true,"children":[{"kind":"text","text":"Source.getURI()"}]},{"kind":"text","text":" as a persistent identification of its location. A default value for the method is deduced from the location or content, but one can change it by using this method"}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":1003}},{"id":"org.graalvm.polyglot.Source$Builder#encoding(java.nio.charset.Charset)","anchor":"encoding(java.nio.charset.Charset)","kind":"method","name":"encoding","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"encoding"},{"kind":"punct","text":"("},{"kind":"type","text":"Charset","ref":"java.nio.charset.Charset","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/charset/Charset.html"},{"kind":"punct","text":" "},{"kind":"param","text":"encoding"},{"kind":"punct","text":")"}],"params":[{"name":"encoding","type":[{"kind":"type","text":"Charset","ref":"java.nio.charset.Charset","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/charset/Charset.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the new file encoding to be used for reading the content"}]}]}],"returns":{"type":[{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"instance of "},{"kind":"code","text":"this"},{"kind":"text","text":" builder ready to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#build()"},"code":true,"children":[{"kind":"text","text":"create new source"}]}]}]},"doc":{"summary":[{"kind":"text","text":"Assigns an encoding used to read the file content."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Assigns an encoding used to read the file content. If the encoding is "},{"kind":"code","text":"null"},{"kind":"text","text":" then the file contained encoding information is used. If the file doesn't provide an encoding information the default "},{"kind":"code","text":"UTF-8"},{"kind":"text","text":" encoding is used."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":1018}},{"id":"org.graalvm.polyglot.Source$Builder#option(java.lang.String,java.lang.String)","anchor":"option(java.lang.String,java.lang.String)","kind":"method","name":"option","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"option"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"key"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":")"}],"params":[{"name":"key","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the option key (must not be null)"}]}]},{"name":"value","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the option value (must not be null)"}]}]}],"returns":{"type":[{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Sets a source option key and value for the built source."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets a source option key and value for the built source. Source options allow you to attach language- or instrument-specific configuration to a source. These options are parsed and validated only when "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#eval(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"Context.eval(Source)"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#parse(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"Context.parse(Source)"}]},{"kind":"text","text":" is invoked, rather than when the source is created."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If the source is validated, all source options will be validated. Therefore, each language or instrument associated with a source option must be installed."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Source options of any language or instrument can be supplied to all sources. Some source options may only have an effect when provided to sources of the language with the same id. The available source option keys can be found in the respective language or instrument documentation, or at runtime via "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getSourceOptions()"},"code":true,"children":[{"kind":"text","text":"Language.getSourceOptions()"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Instrument#getSourceOptions()"},"code":true,"children":[{"kind":"text","text":"Instrument.getSourceOptions()"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#eval(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"Context.eval(Source)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#parse(org.graalvm.polyglot.Source)"},"code":true,"children":[{"kind":"text","text":"Context.parse(Source)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Language#getSourceOptions()"},"code":true,"children":[{"kind":"text","text":"Language.getSourceOptions()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Instrument#getSourceOptions()"},"code":true,"children":[{"kind":"text","text":"Instrument.getSourceOptions()"}]}]]},"since":"25.0","source":{"path":"org/graalvm/polyglot/Source.java","line":1046}},{"id":"org.graalvm.polyglot.Source$Builder#options(java.util.Map)","anchor":"options(java.util.Map)","kind":"method","name":"options","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"options"},{"kind":"punct","text":"("},{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"options"},{"kind":"punct","text":")"}],"params":[{"name":"options","type":[{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":">"}]}],"returns":{"type":[{"kind":"type","text":"Source.Builder","ref":"org.graalvm.polyglot.Source$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Shortcut for setting multiple "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"options"}]},{"kind":"text","text":" using a map."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Shortcut for setting multiple "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#option(java.lang.String,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"options"}]},{"kind":"text","text":" using a map. All values of the provided map must be non-null."}]}]},"since":"25.0","source":{"path":"org/graalvm/polyglot/Source.java","line":1062}},{"id":"org.graalvm.polyglot.Source$Builder#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"25.3","source":{"path":"org/graalvm/polyglot/Source.java","line":1074}},{"id":"org.graalvm.polyglot.Source$Builder#build()","anchor":"build()","kind":"method","name":"build","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"},{"kind":"punct","text":" "},{"kind":"name","text":"build"},{"kind":"punct","text":"() "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"returns":{"type":[{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the source object"}]}]},"throws":[{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true}],"doc":{"summary":[{"kind":"text","text":"Uses configuration of this builder to create new "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":" object."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Uses configuration of this builder to create new "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":" object. The method throws an "},{"kind":"link","target":{"id":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"},"code":true,"children":[{"kind":"text","text":"IOException"}]},{"kind":"text","text":" if an error loading the source occurred."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":1156}},{"id":"org.graalvm.polyglot.Source$Builder#buildLiteral()","anchor":"buildLiteral()","kind":"method","name":"buildLiteral","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"},{"kind":"punct","text":" "},{"kind":"name","text":"buildLiteral"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the source object"}]}]},"doc":{"summary":[{"kind":"text","text":"Uses configuration of this builder to create a new "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":" object."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Uses configuration of this builder to create a new "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":" object. This method suppresses any "},{"kind":"link","target":{"id":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"},"code":true,"children":[{"kind":"text","text":"IOException"}]},{"kind":"text","text":" as "},{"kind":"link","target":{"id":"java.lang.AssertionError","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AssertionError.html"},"code":true,"children":[{"kind":"text","text":"AssertionError"}]},{"kind":"text","text":" and should only be used if the builder was created using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source#newBuilder(java.lang.String,java.lang.CharSequence,java.lang.String)"},"code":true,"children":[{"kind":"text","text":"or Source#newBuilder(String, ByteSequence, String) byte sequence literal"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":1179}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Represents a builder to build "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":" objects."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Represents a builder to build "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":" objects."}]},{"kind":"paragraph","children":[{"kind":"text","text":"To load a source from disk one can use:"}]},{"kind":"code","text":"File file = new File(dir, name);\nassert name.endsWith(\".java\") : \"Imagine proper file\";\n\nString language = Source.findLanguage(file);\nSource source = Source.newBuilder(language, file).build();\n\nassert file.getName().equals(source.getName());\nassert file.getPath().equals(source.getPath());\nassert file.toURI().equals(source.getURI());"},{"kind":"paragraph","children":[{"kind":"text","text":"To load source from a "},{"kind":"link","target":{"id":"java.net.URL","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URL.html"},"code":true,"children":[{"kind":"text","text":"URL"}]},{"kind":"text","text":" one can use:"}]},{"kind":"code","text":"URL resource = relativeClass.getResource(\"sample.js\");\nSource source = Source.newBuilder(\"js\", resource).build();\nassert resource.toExternalForm().equals(source.getPath());\nassert \"sample.js\".equals(source.getName());\nassert resource.toURI().equals(source.getURI());"},{"kind":"paragraph","children":[{"kind":"text","text":"To create a source representing characters:"}]},{"kind":"code","text":"Source source = Source.newBuilder(\"js\", \"function() {\\n\" + \"  return 'Hi';\\n\" + \"}\\n\", \"hi.js\").buildLiteral();\nassert \"hi.js\".equals(source.getName());"},{"kind":"paragraph","children":[{"kind":"text","text":"or read a source from a "},{"kind":"link","target":{"id":"java.io.Reader","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/Reader.html"},"code":true,"children":[{"kind":"text","text":"Reader"}]},{"kind":"text","text":":"}]},{"kind":"code","text":"Reader stream = new InputStreamReader(\n                relativeClass.getResourceAsStream(\"sample.js\"));\nSource source = Source.newBuilder(\"js\", stream, \"sample.js\").build();\nassert \"sample.js\".equals(source.getName());"},{"kind":"paragraph","children":[{"kind":"text","text":"To create a source representing bytes:"}]},{"kind":"code","text":"byte[] bytes = new byte[]{ /* Binary */ };\nSource source = Source.newBuilder(\"llvm\",\n                ByteSequence.create(bytes),\n                \"<literal>\").buildLiteral();"},{"kind":"paragraph","children":[{"kind":"text","text":"Once your builder is configured, call "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source$Builder#build()"},"code":true,"children":[{"kind":"text","text":"build()"}]},{"kind":"text","text":" to perform the loading and construction of new "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Source.java","line":800}},{"id":"org.graalvm.polyglot.SourceSection","name":"SourceSection","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"SourceSection"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.polyglot.SourceSection#isAvailable()","anchor":"isAvailable()","kind":"method","name":"isAvailable","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isAvailable"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns whether this is a special instance that signifies that source information is available."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns whether this is a special instance that signifies that source information is available. Available source sections are never equal to unavailable source sections. Unavailable source sections return the same indices and lengths as empty source sections starting at character index "},{"kind":"code","text":"0"},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/SourceSection.java","line":75}},{"id":"org.graalvm.polyglot.SourceSection#hasLines()","anchor":"hasLines()","kind":"method","name":"hasLines","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasLines"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this section has a line number information, "},{"kind":"code","text":"false"},{"kind":"text","text":" otherwise."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this section has a line number information, "},{"kind":"code","text":"false"},{"kind":"text","text":" otherwise. When "},{"kind":"code","text":"true"},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#getStartLine()"},"code":true,"children":[{"kind":"text","text":"getStartLine()"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#getEndLine()"},"code":true,"children":[{"kind":"text","text":"getEndLine()"}]},{"kind":"text","text":" return valid line numbers, when "},{"kind":"code","text":"false"},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#getStartLine()"},"code":true,"children":[{"kind":"text","text":"getStartLine()"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#getEndLine()"},"code":true,"children":[{"kind":"text","text":"getEndLine()"}]},{"kind":"text","text":" return "},{"kind":"code","text":"1"},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/SourceSection.java","line":87}},{"id":"org.graalvm.polyglot.SourceSection#hasColumns()","anchor":"hasColumns()","kind":"method","name":"hasColumns","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasColumns"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this section has a column number information, "},{"kind":"code","text":"false"},{"kind":"text","text":" otherwise."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this section has a column number information, "},{"kind":"code","text":"false"},{"kind":"text","text":" otherwise. When "},{"kind":"code","text":"true"},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#hasLines()"},"code":true,"children":[{"kind":"text","text":"hasLines()"}]},{"kind":"text","text":" is "},{"kind":"code","text":"true"},{"kind":"text","text":" as well, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#getStartColumn()"},"code":true,"children":[{"kind":"text","text":"getStartColumn()"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#getEndColumn()"},"code":true,"children":[{"kind":"text","text":"getEndColumn()"}]},{"kind":"text","text":" return valid column numbers. When "},{"kind":"code","text":"false"},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#getStartColumn()"},"code":true,"children":[{"kind":"text","text":"getStartColumn()"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#getEndColumn()"},"code":true,"children":[{"kind":"text","text":"getEndColumn()"}]},{"kind":"text","text":" return "},{"kind":"code","text":"1"},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/SourceSection.java","line":100}},{"id":"org.graalvm.polyglot.SourceSection#hasCharIndex()","anchor":"hasCharIndex()","kind":"method","name":"hasCharIndex","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasCharIndex"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this section has a character index information, "},{"kind":"code","text":"false"},{"kind":"text","text":" otherwise."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this section has a character index information, "},{"kind":"code","text":"false"},{"kind":"text","text":" otherwise. When "},{"kind":"code","text":"true"},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#getCharIndex()"},"code":true,"children":[{"kind":"text","text":"getCharIndex()"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#getCharEndIndex()"},"code":true,"children":[{"kind":"text","text":"getCharEndIndex()"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#getCharLength()"},"code":true,"children":[{"kind":"text","text":"getCharLength()"}]},{"kind":"text","text":" return valid character indices, when "},{"kind":"code","text":"false"},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#getCharIndex()"},"code":true,"children":[{"kind":"text","text":"getCharIndex()"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#getCharEndIndex()"},"code":true,"children":[{"kind":"text","text":"getCharEndIndex()"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#getCharLength()"},"code":true,"children":[{"kind":"text","text":"getCharLength()"}]},{"kind":"text","text":" return "},{"kind":"code","text":"0"},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/SourceSection.java","line":113}},{"id":"org.graalvm.polyglot.SourceSection#getSource()","anchor":"getSource()","kind":"method","name":"getSource","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"},{"kind":"punct","text":" "},{"kind":"name","text":"getSource"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the source object."}]}]},"doc":{"summary":[{"kind":"text","text":"Representation of the source program that contains this section."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Representation of the source program that contains this section."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/SourceSection.java","line":123}},{"id":"org.graalvm.polyglot.SourceSection#getStartLine()","anchor":"getStartLine()","kind":"method","name":"getStartLine","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"getStartLine"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the starting line number."}]}]},"doc":{"summary":[{"kind":"text","text":"Returns 1-based line number of the first character in this section (inclusive)."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns 1-based line number of the first character in this section (inclusive). Returns "},{"kind":"code","text":"1"},{"kind":"text","text":" for out of bounds or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#isAvailable()"},"code":true,"children":[{"kind":"text","text":"unavailable"}]},{"kind":"text","text":" source sections, or source sections not "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#hasLines()"},"code":true,"children":[{"kind":"text","text":"having lines"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#hasLines()"},"code":true,"children":[{"kind":"text","text":"hasLines()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/SourceSection.java","line":136}},{"id":"org.graalvm.polyglot.SourceSection#getStartColumn()","anchor":"getStartColumn()","kind":"method","name":"getStartColumn","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"getStartColumn"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the starting column number."}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the 1-based column number of the first character in this section (inclusive)."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the 1-based column number of the first character in this section (inclusive). Returns "},{"kind":"code","text":"1"},{"kind":"text","text":" for out of bounds or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#isAvailable()"},"code":true,"children":[{"kind":"text","text":"unavailable"}]},{"kind":"text","text":" source sections, or source sections not "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#hasColumns()"},"code":true,"children":[{"kind":"text","text":"having columns"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#hasColumns()"},"code":true,"children":[{"kind":"text","text":"hasColumns()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/SourceSection.java","line":149}},{"id":"org.graalvm.polyglot.SourceSection#getEndLine()","anchor":"getEndLine()","kind":"method","name":"getEndLine","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"getEndLine"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the starting line number."}]}]},"doc":{"summary":[{"kind":"text","text":"Returns 1-based line number of the last character in this section (inclusive)."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns 1-based line number of the last character in this section (inclusive). Returns "},{"kind":"code","text":"1"},{"kind":"text","text":" for out of bounds or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#isAvailable()"},"code":true,"children":[{"kind":"text","text":"unavailable"}]},{"kind":"text","text":" source sections, or source sections not "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#hasLines()"},"code":true,"children":[{"kind":"text","text":"having lines"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#hasLines()"},"code":true,"children":[{"kind":"text","text":"hasLines()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/SourceSection.java","line":162}},{"id":"org.graalvm.polyglot.SourceSection#getEndColumn()","anchor":"getEndColumn()","kind":"method","name":"getEndColumn","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"getEndColumn"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the starting column number."}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the 1-based column number of the last character in this section (inclusive)."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the 1-based column number of the last character in this section (inclusive). Returns "},{"kind":"code","text":"1"},{"kind":"text","text":" for out of bounds or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#isAvailable()"},"code":true,"children":[{"kind":"text","text":"unavailable"}]},{"kind":"text","text":" source sections, or source sections not "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#hasColumns()"},"code":true,"children":[{"kind":"text","text":"having columns"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#hasColumns()"},"code":true,"children":[{"kind":"text","text":"hasColumns()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/SourceSection.java","line":175}},{"id":"org.graalvm.polyglot.SourceSection#getCharIndex()","anchor":"getCharIndex()","kind":"method","name":"getCharIndex","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"getCharIndex"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the starting character index."}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the 0-based index of the first character in this section."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the 0-based index of the first character in this section. Returns "},{"kind":"code","text":"0"},{"kind":"text","text":" for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#isAvailable()"},"code":true,"children":[{"kind":"text","text":"unavailable"}]},{"kind":"text","text":" source sections, or sections not "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#hasCharIndex()"},"code":true,"children":[{"kind":"text","text":"having character index"}]},{"kind":"text","text":". The returned index might be out of bounds of the source code if assertions (-ea) are not enabled."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#hasCharIndex()"},"code":true,"children":[{"kind":"text","text":"hasCharIndex()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/SourceSection.java","line":189}},{"id":"org.graalvm.polyglot.SourceSection#getCharLength()","anchor":"getCharLength()","kind":"method","name":"getCharLength","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"getCharLength"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the number of characters in the section."}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the length of this section in characters."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the length of this section in characters. Returns "},{"kind":"code","text":"0"},{"kind":"text","text":" for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#isAvailable()"},"code":true,"children":[{"kind":"text","text":"unavailable"}]},{"kind":"text","text":" source sections, or sections not "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#hasCharIndex()"},"code":true,"children":[{"kind":"text","text":"having character index"}]},{"kind":"text","text":". The returned length might be out of bounds of the source code if assertions (-ea) are not enabled."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#hasCharIndex()"},"code":true,"children":[{"kind":"text","text":"hasCharIndex()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/SourceSection.java","line":203}},{"id":"org.graalvm.polyglot.SourceSection#getCharEndIndex()","anchor":"getCharEndIndex()","kind":"method","name":"getCharEndIndex","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"getCharEndIndex"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the end position of the section."}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the index of the text position immediately following the last character in the section."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the index of the text position immediately following the last character in the section. Returns "},{"kind":"code","text":"0"},{"kind":"text","text":" for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#isAvailable()"},"code":true,"children":[{"kind":"text","text":"unavailable"}]},{"kind":"text","text":" source sections, or sections not "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#hasCharIndex()"},"code":true,"children":[{"kind":"text","text":"having character index"}]},{"kind":"text","text":". The returned index might be out of bounds of the source code if assertions (-ea) are not enabled."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#hasCharIndex()"},"code":true,"children":[{"kind":"text","text":"hasCharIndex()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/SourceSection.java","line":217}},{"id":"org.graalvm.polyglot.SourceSection#getCode()","anchor":"getCode()","kind":"method","name":"getCode","modifiers":["public"],"annotations":[[{"kind":"annotation","text":"@Deprecated","ref":"java.lang.Deprecated","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Deprecated.html"},{"kind":"punct","text":"("},{"kind":"param","text":"since"},{"kind":"punct","text":" = "},{"kind":"literal","text":"\"19.0\""},{"kind":"punct","text":")"}]],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"CharSequence","ref":"java.lang.CharSequence","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getCode"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"CharSequence","ref":"java.lang.CharSequence","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html"}]},"deprecated":{"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"use "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#getCharacters()"},"code":true,"children":[{"kind":"text","text":"getCharacters()"}]},{"kind":"text","text":" instead."}]}],"since":"19.0"},"since":"19.0","source":{"path":"org/graalvm/polyglot/SourceSection.java","line":225}},{"id":"org.graalvm.polyglot.SourceSection#getCharacters()","anchor":"getCharacters()","kind":"method","name":"getCharacters","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"CharSequence","ref":"java.lang.CharSequence","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getCharacters"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"CharSequence","ref":"java.lang.CharSequence","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/CharSequence.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the code as a string."}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the source code fragment described by this section."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the source code fragment described by this section. Returns an empty string for out of bounds or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#isAvailable()"},"code":true,"children":[{"kind":"text","text":"unavailable"}]},{"kind":"text","text":" source sections."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/SourceSection.java","line":237}},{"id":"org.graalvm.polyglot.SourceSection#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"doc":{"summary":[{"kind":"text","text":"Returns an implementation-defined string representation of this source section to be used for debugging purposes only."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns an implementation-defined string representation of this source section to be used for debugging purposes only."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#getCharacters()"},"code":true,"children":[{"kind":"text","text":"getCharacters()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/SourceSection.java","line":248}},{"id":"org.graalvm.polyglot.SourceSection#hashCode()","anchor":"hashCode()","kind":"method","name":"hashCode","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"hashCode"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"overrides":{"id":"java.lang.Object#hashCode()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},"since":"19.0 or earlier","source":{"path":"org/graalvm/polyglot/SourceSection.java","line":254}},{"id":"org.graalvm.polyglot.SourceSection#equals(java.lang.Object)","anchor":"equals(java.lang.Object)","kind":"method","name":"equals","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"equals"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"obj"},{"kind":"punct","text":")"}],"params":[{"name":"obj","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"overrides":{"id":"java.lang.Object#equals(java.lang.Object)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},"since":"19.0 or earlier","source":{"path":"org/graalvm/polyglot/SourceSection.java","line":260}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Description of contiguous section of text within a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":" of program code.; supports multiple modes of access to the text and its location."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Description of contiguous section of text within a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"Source"}]},{"kind":"text","text":" of program code.; supports multiple modes of access to the text and its location. Two available source sections are considered equal if their sources, start and length are equal. "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection#isAvailable()"},"code":true,"children":[{"kind":"text","text":"Unavailable"}]},{"kind":"text","text":" source sections are compared by identity. Source sections are designed to be used as keys in hash maps."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/SourceSection.java","line":55}},{"id":"org.graalvm.polyglot.TypeLiteral","name":"TypeLiteral","kind":"class","language":"java","modifiers":["public","abstract"],"typeParams":[{"name":"T"}],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"abstract"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"TypeLiteral"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.polyglot.TypeLiteral#<init>()","anchor":"<init>()","kind":"constructor","name":"TypeLiteral","modifiers":["protected"],"signature":[{"kind":"keyword","text":"protected"},{"kind":"punct","text":" "},{"kind":"name","text":"TypeLiteral"},{"kind":"punct","text":"()"}],"doc":{"summary":[{"kind":"text","text":"Constructs a new type literal."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Constructs a new type literal. Derives represented class from type parameter."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Clients create an empty anonymous subclass. Doing so embeds the type parameter in the anonymous class's type hierarchy so we can reconstitute it at runtime despite erasure."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/TypeLiteral.java","line":79}},{"id":"org.graalvm.polyglot.TypeLiteral#getType()","anchor":"getType()","kind":"method","name":"getType","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"Type","ref":"java.lang.reflect.Type","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/reflect/Type.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getType"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Type","ref":"java.lang.reflect.Type","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/reflect/Type.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns the type literal including generic type information."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the type literal including generic type information."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/TypeLiteral.java","line":135}},{"id":"org.graalvm.polyglot.TypeLiteral#getRawType()","anchor":"getRawType()","kind":"method","name":"getRawType","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"name","text":"getRawType"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}]},"doc":{"summary":[{"kind":"text","text":"Returns the raw class type of the literal."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the raw class type of the literal."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/TypeLiteral.java","line":144}},{"id":"org.graalvm.polyglot.TypeLiteral#equals(java.lang.Object)","anchor":"equals(java.lang.Object)","kind":"method","name":"equals","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"equals"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"obj"},{"kind":"punct","text":")"}],"params":[{"name":"obj","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"overrides":{"id":"java.lang.Object#equals(java.lang.Object)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},"since":"19.0","source":{"path":"org/graalvm/polyglot/TypeLiteral.java","line":151}},{"id":"org.graalvm.polyglot.TypeLiteral#hashCode()","anchor":"hashCode()","kind":"method","name":"hashCode","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"hashCode"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"overrides":{"id":"java.lang.Object#hashCode()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},"since":"19.0","source":{"path":"org/graalvm/polyglot/TypeLiteral.java","line":159}},{"id":"org.graalvm.polyglot.TypeLiteral#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"19.0","source":{"path":"org/graalvm/polyglot/TypeLiteral.java","line":167}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Represents a generic type "},{"kind":"code","text":"T"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Represents a generic type "},{"kind":"code","text":"T"},{"kind":"text","text":". Java doesn't yet provide a way to represent generic types, so this class does. Forces clients to create a subclass of this class which enables retrieval of the type information even at runtime."}]},{"kind":"paragraph","children":[{"kind":"text","text":"For example, to create a type literal for "},{"kind":"code","text":"List<String>"},{"kind":"text","text":", you can create an empty anonymous inner class:"}]},{"kind":"paragraph","children":[{"kind":"code","text":"TypeLiteral<List<String>> list = new TypeLiteral<List<String>>() {};"}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(org.graalvm.polyglot.TypeLiteral)"},"code":true,"children":[{"kind":"text","text":"org.graalvm.polyglot.Value.as(TypeLiteral)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/TypeLiteral.java","line":65}},{"id":"org.graalvm.polyglot.Value","name":"Value","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"Value"},{"kind":"punct","text":" "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"AbstractValue","ref":"org.graalvm.polyglot.AbstractValue"}],"superclass":[{"kind":"type","text":"AbstractValue","ref":"org.graalvm.polyglot.AbstractValue"}],"ancestors":[{"id":"org.graalvm.polyglot.AbstractValue"},{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.polyglot.Value#getMetaObject()","anchor":"getMetaObject()","kind":"method","name":"getMetaObject","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"getMetaObject"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the metaobject that is associated with this value or "},{"kind":"code","text":"null"},{"kind":"text","text":" if no metaobject is available."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the metaobject that is associated with this value or "},{"kind":"code","text":"null"},{"kind":"text","text":" if no metaobject is available. The metaobject represents a description of the object, reveals it's kind and it's features. Some information that a metaobject might define includes the base object's type, interface, class, methods, attributes, etc."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The returned value returns "},{"kind":"code","text":"true"},{"kind":"text","text":" for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isMetaObject()"},"code":true,"children":[{"kind":"text","text":"isMetaObject()"}]},{"kind":"text","text":" and provides implementations for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMetaSimpleName()"},"code":true,"children":[{"kind":"text","text":"getMetaSimpleName()"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMetaQualifiedName()"},"code":true,"children":[{"kind":"text","text":"getMetaQualifiedName()"}]},{"kind":"text","text":", and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isMetaInstance(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"isMetaInstance(Object)"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"This method does not cause any observable side-effects."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isMetaObject()"},"code":true,"children":[{"kind":"text","text":"isMetaObject()"}]}]]},"since":"19.0 revised in 20.1","source":{"path":"org/graalvm/polyglot/Value.java","line":195}},{"id":"org.graalvm.polyglot.Value#isMetaObject()","anchor":"isMetaObject()","kind":"method","name":"isMetaObject","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isMetaObject"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the value represents a metaobject."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the value represents a metaobject. Metaobjects may be values that naturally occur in a language or they may be returned by "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMetaObject()"},"code":true,"children":[{"kind":"text","text":"getMetaObject()"}]},{"kind":"text","text":". A metaobject represents a description of the object, reveals its kind and its features. Returns "},{"kind":"code","text":"false"},{"kind":"text","text":" by default. Metaobjects are often also "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canInstantiate()"},"code":true,"children":[{"kind":"text","text":"instantiable"}]},{"kind":"text","text":", but not necessarily."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Sample interpretations:"}]},{"kind":"text","text":" In Java an instance of the type "},{"kind":"link","target":{"id":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},"code":true,"children":[{"kind":"text","text":"Class"}]},{"kind":"text","text":" is a metaobject. In JavaScript any function instance is a metaobject. For example, the metaobject of a JavaScript class is the associated constructor function."}]},{"kind":"paragraph","children":[{"kind":"text","text":"This method does not cause any observable side-effects. If this method is implemented then also "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMetaQualifiedName()"},"code":true,"children":[{"kind":"text","text":"getMetaQualifiedName()"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMetaSimpleName()"},"code":true,"children":[{"kind":"text","text":"getMetaSimpleName()"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isMetaInstance(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"isMetaInstance(Object)"}]},{"kind":"text","text":" must be implemented as well."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMetaQualifiedName()"},"code":true,"children":[{"kind":"text","text":"getMetaQualifiedName()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMetaSimpleName()"},"code":true,"children":[{"kind":"text","text":"getMetaSimpleName()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isMetaInstance(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"isMetaInstance(Object)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMetaObject()"},"code":true,"children":[{"kind":"text","text":"getMetaObject()"}]}]]},"since":"20.1","source":{"path":"org/graalvm/polyglot/Value.java","line":226}},{"id":"org.graalvm.polyglot.Value#getMetaQualifiedName()","anchor":"getMetaQualifiedName()","kind":"method","name":"getMetaQualifiedName","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getMetaQualifiedName"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if and only if "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isMetaObject()"},"code":true,"children":[{"kind":"text","text":"isMetaObject()"}]},{"kind":"text","text":" returns "},{"kind":"code","text":"false"},{"kind":"text","text":" for the same value."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the qualified name of a metaobject as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isString()"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the qualified name of a metaobject as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isString()"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Sample interpretations:"}]},{"kind":"text","text":" The qualified name of a Java class includes the package name and its class name. JavaScript does not have the notion of qualified name and therefore returns the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMetaSimpleName()"},"code":true,"children":[{"kind":"text","text":"simple name"}]},{"kind":"text","text":" instead."}]}]},"since":"20.1","source":{"path":"org/graalvm/polyglot/Value.java","line":246}},{"id":"org.graalvm.polyglot.Value#getMetaSimpleName()","anchor":"getMetaSimpleName()","kind":"method","name":"getMetaSimpleName","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getMetaSimpleName"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if and only if "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isMetaObject()"},"code":true,"children":[{"kind":"text","text":"isMetaObject()"}]},{"kind":"text","text":" returns "},{"kind":"code","text":"false"},{"kind":"text","text":" for the same value."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the simple name of a metaobject as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isString()"},"code":true,"children":[{"kind":"text","text":"string"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the simple name of a metaobject as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isString()"},"code":true,"children":[{"kind":"text","text":"string"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Sample interpretations:"}]},{"kind":"text","text":" The simple name of a Java class is the class name."}]}]},"since":"20.1","source":{"path":"org/graalvm/polyglot/Value.java","line":264}},{"id":"org.graalvm.polyglot.Value#isMetaInstance(java.lang.Object)","anchor":"isMetaInstance(java.lang.Object)","kind":"method","name":"isMetaInstance","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isMetaInstance"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"instance"},{"kind":"punct","text":")"}],"params":[{"name":"instance","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the instance object to check."}]}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if and only if "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isMetaObject()"},"code":true,"children":[{"kind":"text","text":"isMetaObject()"}]},{"kind":"text","text":" returns "},{"kind":"code","text":"false"},{"kind":"text","text":" for the same value."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the given instance is an instance of this value, else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the given instance is an instance of this value, else "},{"kind":"code","text":"false"},{"kind":"text","text":". The instance value is subject to polyglot value mapping rules as described in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Sample interpretations:"}]},{"kind":"text","text":" A Java object is an instance of its returned "},{"kind":"link","target":{"id":"java.lang.Object#getClass()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},"code":true,"children":[{"kind":"text","text":"class"}]},{"kind":"text","text":"."}]}]},"since":"20.1","source":{"path":"org/graalvm/polyglot/Value.java","line":287}},{"id":"org.graalvm.polyglot.Value#hasMetaParents()","anchor":"hasMetaParents()","kind":"method","name":"hasMetaParents","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasMetaParents"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the value represents a metaobject and the metaobject has meta parents."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the value represents a metaobject and the metaobject has meta parents. Returns "},{"kind":"code","text":"false"},{"kind":"text","text":" by default."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Sample interpretations:"}]},{"kind":"text","text":" In Java an instance of the type "},{"kind":"link","target":{"id":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},"code":true,"children":[{"kind":"text","text":"Class"}]},{"kind":"text","text":" is a metaobject. Further, the superclass and the implemented interfaces types of that type constitute the meta parents. In JavaScript any function instance is a metaobject. For example, the metaobject of a JavaScript class is the associated constructor function."}]},{"kind":"paragraph","children":[{"kind":"text","text":"This method does not cause any observable side-effects. If this method is implemented then also "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMetaParents()"},"code":true,"children":[{"kind":"text","text":"getMetaParents()"}]},{"kind":"text","text":" must be implemented as well."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMetaParents()"},"code":true,"children":[{"kind":"text","text":"getMetaParents()"}]}]]},"since":"22.2","source":{"path":"org/graalvm/polyglot/Value.java","line":312}},{"id":"org.graalvm.polyglot.Value#getMetaParents()","anchor":"getMetaParents()","kind":"method","name":"getMetaParents","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"getMetaParents"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have any "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMetaParents()"},"code":true,"children":[{"kind":"text","text":"hasMetaParents()"}]},{"kind":"text","text":" meta parents."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the meta parents of a meta object as an array object "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasArrayElements()"},"code":true,"children":[{"kind":"text","text":"hasArrayElements()"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the meta parents of a meta object as an array object "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasArrayElements()"},"code":true,"children":[{"kind":"text","text":"hasArrayElements()"}]},{"kind":"text","text":". This method does not cause any observable side-effects. If this method is implemented then also "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMetaParents()"},"code":true,"children":[{"kind":"text","text":"hasMetaParents()"}]},{"kind":"text","text":" must be implemented as well."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMetaParents()"},"code":true,"children":[{"kind":"text","text":"hasMetaParents()"}]}]]},"since":"22.2","source":{"path":"org/graalvm/polyglot/Value.java","line":332}},{"id":"org.graalvm.polyglot.Value#hasArrayElements()","anchor":"hasArrayElements()","kind":"method","name":"hasArrayElements","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasArrayElements"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this polyglot value has array elements."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this polyglot value has array elements. In this case array elements can be accessed using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getArrayElement(long)"},"code":true,"children":[{"kind":"text","text":"getArrayElement(long)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#setArrayElement(long,java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"setArrayElement(long, Object)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#removeArrayElement(long)"},"code":true,"children":[{"kind":"text","text":"removeArrayElement(long)"}]},{"kind":"text","text":" and the array size can be queried using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getArraySize()"},"code":true,"children":[{"kind":"text","text":"getArraySize()"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":350}},{"id":"org.graalvm.polyglot.Value#getArrayElement(long)","anchor":"getArrayElement(long)","kind":"method","name":"getArrayElement","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"getArrayElement"},{"kind":"punct","text":"("},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"index"},{"kind":"punct","text":")"}],"params":[{"name":"index","type":[{"kind":"keyword","text":"long"}]}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"throws":[{"type":[{"kind":"type","text":"ArrayIndexOutOfBoundsException","ref":"java.lang.ArrayIndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the array index does not exist."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have any "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasArrayElements()"},"code":true,"children":[{"kind":"text","text":"array elements"}]},{"kind":"text","text":" or if the index exists but is not readable."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the array element of a given index."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the array element of a given index. Polyglot arrays start with index "},{"kind":"code","text":"0"},{"kind":"text","text":", independent of the guest language. The given array index must be greater or equal to 0."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":370}},{"id":"org.graalvm.polyglot.Value#setArrayElement(long,java.lang.Object)","anchor":"setArrayElement(long,java.lang.Object)","kind":"method","name":"setArrayElement","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"setArrayElement"},{"kind":"punct","text":"("},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"index"},{"kind":"punct","text":", "},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":")"}],"params":[{"name":"index","type":[{"kind":"keyword","text":"long"}]},{"name":"value","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"throws":[{"type":[{"kind":"type","text":"ArrayIndexOutOfBoundsException","ref":"java.lang.ArrayIndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the array index does not exist."}]}]},{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the provided value type is not allowed to be written."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have any "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasArrayElements()"},"code":true,"children":[{"kind":"text","text":"array elements"}]},{"kind":"text","text":" or if the index exists but is not modifiable."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Sets the value at a given index."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets the value at a given index. Polyglot arrays start with index "},{"kind":"code","text":"0"},{"kind":"text","text":", independent of the guest language. The array element value is subject to polyglot value mapping rules as described in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":392}},{"id":"org.graalvm.polyglot.Value#removeArrayElement(long)","anchor":"removeArrayElement(long)","kind":"method","name":"removeArrayElement","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"removeArrayElement"},{"kind":"punct","text":"("},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"index"},{"kind":"punct","text":")"}],"params":[{"name":"index","type":[{"kind":"keyword","text":"long"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"ArrayIndexOutOfBoundsException","ref":"java.lang.ArrayIndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the array index does not exist."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have any "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasArrayElements()"},"code":true,"children":[{"kind":"text","text":"array elements"}]},{"kind":"text","text":" or if the index exists but is not removable."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Removes an array element at a given index."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Removes an array element at a given index. Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the underlying array element could be removed, otherwise "},{"kind":"code","text":"false"},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":412}},{"id":"org.graalvm.polyglot.Value#getArraySize()","anchor":"getArraySize()","kind":"method","name":"getArraySize","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"name","text":"getArraySize"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"long"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have any "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasArrayElements()"},"code":true,"children":[{"kind":"text","text":"array elements"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the array size for values with array elements."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the array size for values with array elements."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":429}},{"id":"org.graalvm.polyglot.Value#hasBufferElements()","anchor":"hasBufferElements()","kind":"method","name":"hasBufferElements","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasBufferElements"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the receiver may have buffer elements."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the receiver may have buffer elements. In this case, the buffer size can be queried using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getBufferSize()"},"code":true,"children":[{"kind":"text","text":"getBufferSize()"}]},{"kind":"text","text":" and elements can be read using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#readBufferByte(long)"},"code":true,"children":[{"kind":"text","text":"readBufferByte(long)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#readBufferShort(java.nio.ByteOrder,long)"},"code":true,"children":[{"kind":"text","text":"readBufferShort(ByteOrder, long)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#readBufferInt(java.nio.ByteOrder,long)"},"code":true,"children":[{"kind":"text","text":"readBufferInt(ByteOrder, long)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#readBufferLong(java.nio.ByteOrder,long)"},"code":true,"children":[{"kind":"text","text":"readBufferLong(ByteOrder, long)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#readBufferFloat(java.nio.ByteOrder,long)"},"code":true,"children":[{"kind":"text","text":"readBufferFloat(ByteOrder, long)"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#readBufferDouble(java.nio.ByteOrder,long)"},"code":true,"children":[{"kind":"text","text":"readBufferDouble(ByteOrder, long)"}]},{"kind":"text","text":". If "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isBufferWritable()"},"code":true,"children":[{"kind":"text","text":"isBufferWritable()"}]},{"kind":"text","text":" returns "},{"kind":"code","text":"true"},{"kind":"text","text":", then buffer elements can also be written using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#writeBufferByte(long,byte)"},"code":true,"children":[{"kind":"text","text":"writeBufferByte(long, byte)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#writeBufferShort(java.nio.ByteOrder,long,short)"},"code":true,"children":[{"kind":"text","text":"writeBufferShort(ByteOrder, long, short)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#writeBufferInt(java.nio.ByteOrder,long,int)"},"code":true,"children":[{"kind":"text","text":"writeBufferInt(ByteOrder, long, int)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#writeBufferLong(java.nio.ByteOrder,long,long)"},"code":true,"children":[{"kind":"text","text":"writeBufferLong(ByteOrder, long, long)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#writeBufferFloat(java.nio.ByteOrder,long,float)"},"code":true,"children":[{"kind":"text","text":"writeBufferFloat(ByteOrder, long, float)"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#writeBufferDouble(java.nio.ByteOrder,long,double)"},"code":true,"children":[{"kind":"text","text":"writeBufferDouble(ByteOrder, long, double)"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Invoking this method does not cause any observable side-effects."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"hasBufferElements()"}]}]]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":460}},{"id":"org.graalvm.polyglot.Value#isBufferWritable()","anchor":"isBufferWritable()","kind":"method","name":"isBufferWritable","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isBufferWritable"},{"kind":"punct","text":"() "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"buffer elements"}]},{"kind":"text","text":"."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns true if the receiver object is a modifiable buffer."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns true if the receiver object is a modifiable buffer. In this case, elements can be written using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#writeBufferByte(long,byte)"},"code":true,"children":[{"kind":"text","text":"writeBufferByte(long, byte)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#writeBufferShort(java.nio.ByteOrder,long,short)"},"code":true,"children":[{"kind":"text","text":"writeBufferShort(ByteOrder, long, short)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#writeBufferInt(java.nio.ByteOrder,long,int)"},"code":true,"children":[{"kind":"text","text":"writeBufferInt(ByteOrder, long, int)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#writeBufferLong(java.nio.ByteOrder,long,long)"},"code":true,"children":[{"kind":"text","text":"writeBufferLong(ByteOrder, long, long)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#writeBufferFloat(java.nio.ByteOrder,long,float)"},"code":true,"children":[{"kind":"text","text":"writeBufferFloat(ByteOrder, long, float)"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#writeBufferDouble(java.nio.ByteOrder,long,double)"},"code":true,"children":[{"kind":"text","text":"writeBufferDouble(ByteOrder, long, double)"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Invoking this method does not cause any observable side-effects."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":483}},{"id":"org.graalvm.polyglot.Value#getBufferSize()","anchor":"getBufferSize()","kind":"method","name":"getBufferSize","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"name","text":"getBufferSize"},{"kind":"punct","text":"() "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"returns":{"type":[{"kind":"keyword","text":"long"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"buffer elements"}]},{"kind":"text","text":"."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the buffer size in bytes for values with buffer elements."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the buffer size in bytes for values with buffer elements."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Invoking this method does not cause any observable side-effects."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":500}},{"id":"org.graalvm.polyglot.Value#readBufferByte(long)","anchor":"readBufferByte(long)","kind":"method","name":"readBufferByte","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"byte"},{"kind":"punct","text":" "},{"kind":"name","text":"readBufferByte"},{"kind":"punct","text":"("},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"byteOffset"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},{"kind":"punct","text":", "},{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"params":[{"name":"byteOffset","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the offset, in bytes, from the start of the buffer at which the byte will be read."}]}]}],"returns":{"type":[{"kind":"keyword","text":"byte"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the byte at the given byte offset from the start of the buffer."}]}]},"throws":[{"type":[{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if and only if "},{"kind":"code","text":"byteOffset < 0 || byteOffset >= "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getBufferSize()"},"code":true,"children":[{"kind":"text","text":"getBufferSize()"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"buffer elements"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Reads the byte at the given byte offset from the start of the buffer."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Reads the byte at the given byte offset from the start of the buffer."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The access is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" guaranteed to be atomic. Therefore, this method is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" thread-safe."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Invoking this method does not cause any observable side-effects."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":527}},{"id":"org.graalvm.polyglot.Value#readBuffer(long,byte[],int,int)","anchor":"readBuffer(long,byte[],int,int)","kind":"method","name":"readBuffer","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"readBuffer"},{"kind":"punct","text":"("},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"byteOffset"},{"kind":"punct","text":", "},{"kind":"keyword","text":"byte"},{"kind":"punct","text":"[] "},{"kind":"param","text":"destination"},{"kind":"punct","text":", "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"param","text":"destinationOffset"},{"kind":"punct","text":", "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"param","text":"length"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},{"kind":"punct","text":", "},{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"params":[{"name":"byteOffset","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"offset in the buffer to start reading from."}]}]},{"name":"destination","type":[{"kind":"keyword","text":"byte"},{"kind":"punct","text":"[]"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"byte array to write the read bytes into."}]}]},{"name":"destinationOffset","type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"offset in the destination array to start writing from."}]}]},{"name":"length","type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"number of bytes to read."}]}]}],"throws":[{"type":[{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if and only if "},{"kind":"code","text":"byteOffset < 0 || length < 0 || byteOffset + length > "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getBufferSize()"},"code":true,"children":[{"kind":"text","text":"getBufferSize()"}]},{"kind":"code","text":" || destinationOffset < 0 || destinationOffset + length > destination.length"}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"buffer elements"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Reads bytes from the receiver object into the specified byte array."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Reads bytes from the receiver object into the specified byte array."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The access is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" guaranteed to be atomic. Therefore, this message is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" thread-safe."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Invoking this message does not cause any observable side-effects."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Example"}]},{"kind":"text","text":" reading into an output stream using a 4k auxiliary byte array:"}]},{"kind":"code","text":"Value val = ...\nassert val.hasBufferElements();\ntry (OutputStream out = ...) {\n    byte[] aux = new byte[4096];\n    long bufferSize = val.getBufferSize();\n    for (long offset = 0; offset < bufferSize; offset += aux.length) {\n        int bytesToRead = (int) Math.min(bufferSize - offset, aux.length);\n        val.readBuffer(offset, aux, 0, bytesToRead);\n        out.write(aux, 0, bytesToRead);\n    }\n}"},{"kind":"paragraph","children":[{"kind":"text","text":"In case the goal is to read the whole contents into a single byte array, the easiest way is to do that through "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.ByteSequence"},"code":true,"children":[{"kind":"text","text":"ByteSequence"}]},{"kind":"text","text":":"}]},{"kind":"code","text":"byte[] byteArray = val.as(ByteSequence.class).toByteArray();"}]},"since":"24.0","source":{"path":"org/graalvm/polyglot/Value.java","line":578}},{"id":"org.graalvm.polyglot.Value#writeBufferByte(long,byte)","anchor":"writeBufferByte(long,byte)","kind":"method","name":"writeBufferByte","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"writeBufferByte"},{"kind":"punct","text":"("},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"byteOffset"},{"kind":"punct","text":", "},{"kind":"keyword","text":"byte"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},{"kind":"punct","text":", "},{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"params":[{"name":"byteOffset","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the offset, in bytes, from the start of the buffer at which the byte will be written."}]}]},{"name":"value","type":[{"kind":"keyword","text":"byte"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the byte value to be written."}]}]}],"throws":[{"type":[{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if and only if "},{"kind":"code","text":"byteOffset < 0 || byteOffset >= "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getBufferSize()"},"code":true,"children":[{"kind":"text","text":"getBufferSize()"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"buffer elements"}]},{"kind":"text","text":" or is not "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isBufferWritable()"},"code":true,"children":[{"kind":"text","text":"modifiable"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Writes the given byte at the given byte offset from the start of the buffer."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Writes the given byte at the given byte offset from the start of the buffer."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The access is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" guaranteed to be atomic. Therefore, this method is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" thread-safe."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":602}},{"id":"org.graalvm.polyglot.Value#readBufferShort(java.nio.ByteOrder,long)","anchor":"readBufferShort(java.nio.ByteOrder,long)","kind":"method","name":"readBufferShort","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"short"},{"kind":"punct","text":" "},{"kind":"name","text":"readBufferShort"},{"kind":"punct","text":"("},{"kind":"type","text":"ByteOrder","ref":"java.nio.ByteOrder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html"},{"kind":"punct","text":" "},{"kind":"param","text":"order"},{"kind":"punct","text":", "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"byteOffset"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},{"kind":"punct","text":", "},{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"params":[{"name":"order","type":[{"kind":"type","text":"ByteOrder","ref":"java.nio.ByteOrder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the order in which to read the individual bytes of the short."}]}]},{"name":"byteOffset","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the offset, in bytes, from the start of the buffer from which the short will be read."}]}]}],"returns":{"type":[{"kind":"keyword","text":"short"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the short at the given byte offset from the start of the buffer."}]}]},"throws":[{"type":[{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if and only if "},{"kind":"code","text":"byteOffset "},{"kind":"code","text":"<"},{"kind":"code","text":" 0 || byteOffset "},{"kind":"code","text":">"},{"kind":"code","text":"= "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getBufferSize()"},"code":true,"children":[{"kind":"text","text":"getBufferSize()"}]},{"kind":"code","text":" - 1"},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"buffer elements"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Reads the short at the given byte offset from the start of the buffer in the given byte order."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Reads the short at the given byte offset from the start of the buffer in the given byte order."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Unaligned accesses are supported."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The access is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" guaranteed to be atomic. Therefore, this method is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" thread-safe."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Invoking this method does not cause any observable side-effects."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":630}},{"id":"org.graalvm.polyglot.Value#writeBufferShort(java.nio.ByteOrder,long,short)","anchor":"writeBufferShort(java.nio.ByteOrder,long,short)","kind":"method","name":"writeBufferShort","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"writeBufferShort"},{"kind":"punct","text":"("},{"kind":"type","text":"ByteOrder","ref":"java.nio.ByteOrder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html"},{"kind":"punct","text":" "},{"kind":"param","text":"order"},{"kind":"punct","text":", "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"byteOffset"},{"kind":"punct","text":", "},{"kind":"keyword","text":"short"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},{"kind":"punct","text":", "},{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"params":[{"name":"order","type":[{"kind":"type","text":"ByteOrder","ref":"java.nio.ByteOrder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the order in which to write the individual bytes of the short."}]}]},{"name":"byteOffset","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the offset, in bytes, from the start of the buffer from which the short will be written."}]}]},{"name":"value","type":[{"kind":"keyword","text":"short"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the short value to be written."}]}]}],"throws":[{"type":[{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if and only if "},{"kind":"code","text":"byteOffset "},{"kind":"code","text":"<"},{"kind":"code","text":" 0 || byteOffset "},{"kind":"code","text":">"},{"kind":"code","text":"= "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getBufferSize()"},"code":true,"children":[{"kind":"text","text":"getBufferSize()"}]},{"kind":"code","text":" - 1"},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"buffer elements"}]},{"kind":"text","text":" or is not "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isBufferWritable()"},"code":true,"children":[{"kind":"text","text":"modifiable"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Writes the given short in the given byte order at the given byte offset from the start of the buffer."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Writes the given short in the given byte order at the given byte offset from the start of the buffer."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Unaligned accesses are supported."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The access is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" guaranteed to be atomic. Therefore, this method is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" thread-safe."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":659}},{"id":"org.graalvm.polyglot.Value#readBufferInt(java.nio.ByteOrder,long)","anchor":"readBufferInt(java.nio.ByteOrder,long)","kind":"method","name":"readBufferInt","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"readBufferInt"},{"kind":"punct","text":"("},{"kind":"type","text":"ByteOrder","ref":"java.nio.ByteOrder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html"},{"kind":"punct","text":" "},{"kind":"param","text":"order"},{"kind":"punct","text":", "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"byteOffset"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},{"kind":"punct","text":", "},{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"params":[{"name":"order","type":[{"kind":"type","text":"ByteOrder","ref":"java.nio.ByteOrder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the order in which to read the individual bytes of the int."}]}]},{"name":"byteOffset","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the offset, in bytes, from the start of the buffer from which the int will be read."}]}]}],"returns":{"type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the int at the given byte offset from the start of the buffer."}]}]},"throws":[{"type":[{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if and only if "},{"kind":"code","text":"byteOffset "},{"kind":"code","text":"<"},{"kind":"code","text":" 0 || byteOffset "},{"kind":"code","text":">"},{"kind":"code","text":"= "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getBufferSize()"},"code":true,"children":[{"kind":"text","text":"getBufferSize()"}]},{"kind":"code","text":" - 3"},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"buffer elements"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Reads the int at the given byte offset from the start of the buffer in the given byte order."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Reads the int at the given byte offset from the start of the buffer in the given byte order."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Unaligned accesses are supported."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The access is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" guaranteed to be atomic. Therefore, this method is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" thread-safe."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Invoking this method does not cause any observable side-effects."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":686}},{"id":"org.graalvm.polyglot.Value#writeBufferInt(java.nio.ByteOrder,long,int)","anchor":"writeBufferInt(java.nio.ByteOrder,long,int)","kind":"method","name":"writeBufferInt","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"writeBufferInt"},{"kind":"punct","text":"("},{"kind":"type","text":"ByteOrder","ref":"java.nio.ByteOrder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html"},{"kind":"punct","text":" "},{"kind":"param","text":"order"},{"kind":"punct","text":", "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"byteOffset"},{"kind":"punct","text":", "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},{"kind":"punct","text":", "},{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"params":[{"name":"order","type":[{"kind":"type","text":"ByteOrder","ref":"java.nio.ByteOrder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the order in which to write the individual bytes of the int."}]}]},{"name":"byteOffset","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the offset, in bytes, from the start of the buffer from which the int will be written."}]}]},{"name":"value","type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the int value to be written."}]}]}],"throws":[{"type":[{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if and only if "},{"kind":"code","text":"byteOffset "},{"kind":"code","text":"<"},{"kind":"code","text":" 0 || byteOffset "},{"kind":"code","text":">"},{"kind":"code","text":"= "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getBufferSize()"},"code":true,"children":[{"kind":"text","text":"getBufferSize()"}]},{"kind":"code","text":" - 3"},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"buffer elements"}]},{"kind":"text","text":" or is not "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isBufferWritable()"},"code":true,"children":[{"kind":"text","text":"modifiable"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Writes the given int in the given byte order at the given byte offset from the start of the buffer."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Writes the given int in the given byte order at the given byte offset from the start of the buffer."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Unaligned accesses are supported."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The access is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" guaranteed to be atomic. Therefore, this method is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" thread-safe."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":715}},{"id":"org.graalvm.polyglot.Value#readBufferLong(java.nio.ByteOrder,long)","anchor":"readBufferLong(java.nio.ByteOrder,long)","kind":"method","name":"readBufferLong","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"name","text":"readBufferLong"},{"kind":"punct","text":"("},{"kind":"type","text":"ByteOrder","ref":"java.nio.ByteOrder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html"},{"kind":"punct","text":" "},{"kind":"param","text":"order"},{"kind":"punct","text":", "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"byteOffset"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},{"kind":"punct","text":", "},{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"params":[{"name":"order","type":[{"kind":"type","text":"ByteOrder","ref":"java.nio.ByteOrder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the order in which to read the individual bytes of the long."}]}]},{"name":"byteOffset","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the offset, in bytes, from the start of the buffer from which the int will be read."}]}]}],"returns":{"type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the int at the given byte offset from the start of the buffer."}]}]},"throws":[{"type":[{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if and only if "},{"kind":"code","text":"byteOffset "},{"kind":"code","text":"<"},{"kind":"code","text":" 0 || byteOffset "},{"kind":"code","text":">"},{"kind":"code","text":"= "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getBufferSize()"},"code":true,"children":[{"kind":"text","text":"getBufferSize()"}]},{"kind":"code","text":" - 7"},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"buffer elements"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Reads the long at the given byte offset from the start of the buffer in the given byte order."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Reads the long at the given byte offset from the start of the buffer in the given byte order."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Unaligned accesses are supported."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The access is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" guaranteed to be atomic. Therefore, this method is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" thread-safe."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Invoking this method does not cause any observable side-effects."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":742}},{"id":"org.graalvm.polyglot.Value#writeBufferLong(java.nio.ByteOrder,long,long)","anchor":"writeBufferLong(java.nio.ByteOrder,long,long)","kind":"method","name":"writeBufferLong","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"writeBufferLong"},{"kind":"punct","text":"("},{"kind":"type","text":"ByteOrder","ref":"java.nio.ByteOrder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html"},{"kind":"punct","text":" "},{"kind":"param","text":"order"},{"kind":"punct","text":", "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"byteOffset"},{"kind":"punct","text":", "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},{"kind":"punct","text":", "},{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"params":[{"name":"order","type":[{"kind":"type","text":"ByteOrder","ref":"java.nio.ByteOrder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the order in which to write the individual bytes of the long."}]}]},{"name":"byteOffset","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the offset, in bytes, from the start of the buffer from which the int will be written."}]}]},{"name":"value","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the int value to be written."}]}]}],"throws":[{"type":[{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if and only if "},{"kind":"code","text":"byteOffset "},{"kind":"code","text":"<"},{"kind":"code","text":" 0 || byteOffset "},{"kind":"code","text":">"},{"kind":"code","text":"= "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getBufferSize()"},"code":true,"children":[{"kind":"text","text":"getBufferSize()"}]},{"kind":"code","text":" - 7"},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"buffer elements"}]},{"kind":"text","text":" or is not "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isBufferWritable()"},"code":true,"children":[{"kind":"text","text":"modifiable"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Writes the given long in the given byte order at the given byte offset from the start of the buffer."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Writes the given long in the given byte order at the given byte offset from the start of the buffer."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Unaligned accesses are supported."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The access is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" guaranteed to be atomic. Therefore, this method is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" thread-safe."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":771}},{"id":"org.graalvm.polyglot.Value#readBufferFloat(java.nio.ByteOrder,long)","anchor":"readBufferFloat(java.nio.ByteOrder,long)","kind":"method","name":"readBufferFloat","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"float"},{"kind":"punct","text":" "},{"kind":"name","text":"readBufferFloat"},{"kind":"punct","text":"("},{"kind":"type","text":"ByteOrder","ref":"java.nio.ByteOrder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html"},{"kind":"punct","text":" "},{"kind":"param","text":"order"},{"kind":"punct","text":", "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"byteOffset"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},{"kind":"punct","text":", "},{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"params":[{"name":"order","type":[{"kind":"type","text":"ByteOrder","ref":"java.nio.ByteOrder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the order in which to read the individual bytes of the float."}]}]},{"name":"byteOffset","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the offset, in bytes, from the start of the buffer from which the float will be read."}]}]}],"returns":{"type":[{"kind":"keyword","text":"float"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the float at the given byte offset from the start of the buffer."}]}]},"throws":[{"type":[{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if and only if "},{"kind":"code","text":"byteOffset "},{"kind":"code","text":"<"},{"kind":"code","text":" 0 || byteOffset "},{"kind":"code","text":">"},{"kind":"code","text":"= "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getBufferSize()"},"code":true,"children":[{"kind":"text","text":"getBufferSize()"}]},{"kind":"code","text":" - 3"},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"buffer elements"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Reads the float at the given byte offset from the start of the buffer in the given byte order."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Reads the float at the given byte offset from the start of the buffer in the given byte order."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Unaligned accesses are supported."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The access is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" guaranteed to be atomic. Therefore, this method is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" thread-safe."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Invoking this method does not cause any observable side-effects."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":799}},{"id":"org.graalvm.polyglot.Value#writeBufferFloat(java.nio.ByteOrder,long,float)","anchor":"writeBufferFloat(java.nio.ByteOrder,long,float)","kind":"method","name":"writeBufferFloat","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"writeBufferFloat"},{"kind":"punct","text":"("},{"kind":"type","text":"ByteOrder","ref":"java.nio.ByteOrder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html"},{"kind":"punct","text":" "},{"kind":"param","text":"order"},{"kind":"punct","text":", "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"byteOffset"},{"kind":"punct","text":", "},{"kind":"keyword","text":"float"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},{"kind":"punct","text":", "},{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"params":[{"name":"order","type":[{"kind":"type","text":"ByteOrder","ref":"java.nio.ByteOrder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the order in which to read the individual bytes of the float."}]}]},{"name":"byteOffset","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the offset, in bytes, from the start of the buffer from which the float will be written."}]}]},{"name":"value","type":[{"kind":"keyword","text":"float"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the float value to be written."}]}]}],"throws":[{"type":[{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if and only if "},{"kind":"code","text":"byteOffset "},{"kind":"code","text":"<"},{"kind":"code","text":" 0 || byteOffset "},{"kind":"code","text":">"},{"kind":"code","text":"= "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getBufferSize()"},"code":true,"children":[{"kind":"text","text":"getBufferSize()"}]},{"kind":"code","text":" - 3"},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"buffer elements"}]},{"kind":"text","text":" or is not "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isBufferWritable()"},"code":true,"children":[{"kind":"text","text":"modifiable"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Writes the given float in the given byte order at the given byte offset from the start of the buffer."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Writes the given float in the given byte order at the given byte offset from the start of the buffer."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Unaligned accesses are supported."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The access is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" guaranteed to be atomic. Therefore, this method is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" thread-safe."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":828}},{"id":"org.graalvm.polyglot.Value#readBufferDouble(java.nio.ByteOrder,long)","anchor":"readBufferDouble(java.nio.ByteOrder,long)","kind":"method","name":"readBufferDouble","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"double"},{"kind":"punct","text":" "},{"kind":"name","text":"readBufferDouble"},{"kind":"punct","text":"("},{"kind":"type","text":"ByteOrder","ref":"java.nio.ByteOrder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html"},{"kind":"punct","text":" "},{"kind":"param","text":"order"},{"kind":"punct","text":", "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"byteOffset"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},{"kind":"punct","text":", "},{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"params":[{"name":"order","type":[{"kind":"type","text":"ByteOrder","ref":"java.nio.ByteOrder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the order in which to write the individual bytes of the double."}]}]},{"name":"byteOffset","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the offset, in bytes, from the start of the buffer from which the double will be read."}]}]}],"returns":{"type":[{"kind":"keyword","text":"double"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the double at the given byte offset from the start of the buffer."}]}]},"throws":[{"type":[{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if and only if "},{"kind":"code","text":"byteOffset "},{"kind":"code","text":"<"},{"kind":"code","text":" 0 || byteOffset "},{"kind":"code","text":">"},{"kind":"code","text":"= "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getBufferSize()"},"code":true,"children":[{"kind":"text","text":"getBufferSize()"}]},{"kind":"code","text":" - 7"},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"buffer elements"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Reads the double at the given byte offset from the start of the buffer in the given byte order."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Reads the double at the given byte offset from the start of the buffer in the given byte order."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Unaligned accesses are supported."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The access is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" guaranteed to be atomic. Therefore, this method is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" thread-safe."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Invoking this method does not cause any observable side-effects."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":856}},{"id":"org.graalvm.polyglot.Value#writeBufferDouble(java.nio.ByteOrder,long,double)","anchor":"writeBufferDouble(java.nio.ByteOrder,long,double)","kind":"method","name":"writeBufferDouble","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"writeBufferDouble"},{"kind":"punct","text":"("},{"kind":"type","text":"ByteOrder","ref":"java.nio.ByteOrder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html"},{"kind":"punct","text":" "},{"kind":"param","text":"order"},{"kind":"punct","text":", "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"byteOffset"},{"kind":"punct","text":", "},{"kind":"keyword","text":"double"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},{"kind":"punct","text":", "},{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"params":[{"name":"order","type":[{"kind":"type","text":"ByteOrder","ref":"java.nio.ByteOrder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the order in which to write the individual bytes of the double."}]}]},{"name":"byteOffset","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the offset, in bytes, from the start of the buffer from which the double will be written."}]}]},{"name":"value","type":[{"kind":"keyword","text":"double"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the double value to be written."}]}]}],"throws":[{"type":[{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if and only if "},{"kind":"code","text":"byteOffset "},{"kind":"code","text":"<"},{"kind":"code","text":" 0 || byteOffset "},{"kind":"code","text":">"},{"kind":"code","text":"= "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getBufferSize()"},"code":true,"children":[{"kind":"text","text":"getBufferSize()"}]},{"kind":"code","text":" - 7"},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"buffer elements"}]},{"kind":"text","text":" or is not "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isBufferWritable()"},"code":true,"children":[{"kind":"text","text":"modifiable"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Writes the given double in the given byte order at the given byte offset from the start of the buffer."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Writes the given double in the given byte order at the given byte offset from the start of the buffer."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Unaligned accesses are supported."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The access is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" guaranteed to be atomic. Therefore, this method is "},{"kind":"emphasis","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" thread-safe."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":885}},{"id":"org.graalvm.polyglot.Value#hasMembers()","anchor":"hasMembers()","kind":"method","name":"hasMembers","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasMembers"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value generally supports containing members."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value generally supports containing members. To check whether a value has "},{"kind":"emphasis","children":[{"kind":"text","text":"no"}]},{"kind":"text","text":" members use "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMemberKeys()"},"code":true,"children":[{"kind":"text","text":"getMemberKeys()"}]},{"kind":"code","text":"."},{"kind":"link","target":{"id":"java.util.Set#isEmpty()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Set.html#isEmpty()"},"code":true,"children":[{"kind":"text","text":"isEmpty()"}]},{"kind":"text","text":" instead. If polyglot value has members, it may also support "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"getMember(String)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#putMember(java.lang.String,java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"putMember(String, Object)"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#removeMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"removeMember(String)"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"To check the existence of members."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"To read members."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#putMember(java.lang.String,java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"To write members."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#removeMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"To remove a member."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMemberKeys()"},"code":true,"children":[{"kind":"text","text":"For a list of members."}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":908}},{"id":"org.graalvm.polyglot.Value#hasMember(java.lang.String)","anchor":"hasMember(java.lang.String)","kind":"method","name":"hasMember","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasMember"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"identifier"},{"kind":"punct","text":")"}],"params":[{"name":"identifier","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the identifier is null."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if such a member exists for a given "},{"kind":"code","text":"identifier"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if such a member exists for a given "},{"kind":"code","text":"identifier"},{"kind":"text","text":". If the value has no "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMembers()"},"code":true,"children":[{"kind":"text","text":"members"}]},{"kind":"text","text":" then "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"hasMember(String)"}]},{"kind":"text","text":" returns "},{"kind":"code","text":"false"},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":925}},{"id":"org.graalvm.polyglot.Value#getMember(java.lang.String)","anchor":"getMember(java.lang.String)","kind":"method","name":"getMember","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"getMember"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"identifier"},{"kind":"punct","text":")"}],"params":[{"name":"identifier","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMembers()"},"code":true,"children":[{"kind":"text","text":"has no members"}]},{"kind":"text","text":" or the given identifier exists but is not readable."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the identifier is null."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the member with a given "},{"kind":"code","text":"identifier"},{"kind":"text","text":" or "},{"kind":"code","text":"null"},{"kind":"text","text":" if the member does not exist."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the member with a given "},{"kind":"code","text":"identifier"},{"kind":"text","text":" or "},{"kind":"code","text":"null"},{"kind":"text","text":" if the member does not exist."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":944}},{"id":"org.graalvm.polyglot.Value#getMemberKeys()","anchor":"getMemberKeys()","kind":"method","name":"getMemberKeys","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Set","ref":"java.util.Set","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Set.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"> "},{"kind":"name","text":"getMemberKeys"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Set","ref":"java.util.Set","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Set.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":">"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"code":true,"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns a set of all member keys."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns a set of all member keys. Calling "},{"kind":"link","target":{"id":"java.util.Set#contains(java.lang.Object)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Set.html#contains(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Set.contains(Object)"}]},{"kind":"text","text":" with a string key is equivalent to calling "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"hasMember(String)"}]},{"kind":"text","text":". Removing an element from the returned set is equivalent to calling "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#removeMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"removeMember(String)"}]},{"kind":"text","text":". Adding an element to the set is equivalent to calling "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#putMember(java.lang.String,java.lang.Object)"},"children":[{"kind":"text","text":"putMember(key, null)"}]},{"kind":"text","text":". If the value does not support "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMembers()"},"code":true,"children":[{"kind":"text","text":"members"}]},{"kind":"text","text":" then an empty unmodifiable set is returned. If the context gets closed while the returned set is still alive, then the set will throw an "},{"kind":"link","target":{"id":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"},"code":true,"children":[{"kind":"text","text":"IllegalStateException"}]},{"kind":"text","text":" if any methods except Object methods are invoked."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":966}},{"id":"org.graalvm.polyglot.Value#putMember(java.lang.String,java.lang.Object)","anchor":"putMember(java.lang.String,java.lang.Object)","kind":"method","name":"putMember","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"putMember"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"identifier"},{"kind":"punct","text":", "},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":")"}],"params":[{"name":"identifier","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},{"name":"value","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"code":true,"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have any "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMembers()"},"code":true,"children":[{"kind":"text","text":"members"}]},{"kind":"text","text":", the key does not exist and new members cannot be added, or the existing member is not modifiable."}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the provided value type is not allowed to be written."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the identifier is null."}]}]}],"doc":{"summary":[{"kind":"text","text":"Sets the value of a member using an identifier."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets the value of a member using an identifier. The member value is subject to polyglot value mapping rules as described in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":987}},{"id":"org.graalvm.polyglot.Value#removeMember(java.lang.String)","anchor":"removeMember(java.lang.String)","kind":"method","name":"removeMember","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"removeMember"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"identifier"},{"kind":"punct","text":")"}],"params":[{"name":"identifier","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have any "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMembers()"},"code":true,"children":[{"kind":"text","text":"members"}]},{"kind":"text","text":" or if the key "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"exists"}]},{"kind":"text","text":" but cannot be removed."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"code":true,"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the identifier is null."}]}]}],"doc":{"summary":[{"kind":"text","text":"Removes a single member from the object."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Removes a single member from the object. Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the member was successfully removed, "},{"kind":"code","text":"false"},{"kind":"text","text":" if such a member does not exist."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1004}},{"id":"org.graalvm.polyglot.Value#hasStaticScope()","anchor":"hasStaticScope()","kind":"method","name":"hasStaticScope","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasStaticScope"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"children":[{"kind":"text","text":"closed"}]}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurs during execution"}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value is a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isMetaObject()"},"children":[{"kind":"text","text":"meta object"}]},{"kind":"text","text":" that provides a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getStaticScope()"},"children":[{"kind":"text","text":"static scope"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value is a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isMetaObject()"},"children":[{"kind":"text","text":"meta object"}]},{"kind":"text","text":" that provides a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getStaticScope()"},"children":[{"kind":"text","text":"static scope"}]},{"kind":"text","text":". A static scope represents the static or class level members associated with the type described by this meta object, such as static fields or methods."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isMetaObject()"},"code":true,"children":[{"kind":"text","text":"isMetaObject()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getStaticScope()"},"code":true,"children":[{"kind":"text","text":"getStaticScope()"}]}]]},"since":"25.1","source":{"path":"org/graalvm/polyglot/Value.java","line":1025}},{"id":"org.graalvm.polyglot.Value#getStaticScope()","anchor":"getStaticScope()","kind":"method","name":"getStaticScope","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"getStaticScope"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if and only if this value does not "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasStaticScope()"},"children":[{"kind":"text","text":"have a static scope"}]}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"children":[{"kind":"text","text":"closed"}]}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurs during execution"}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the static scope associated with this value."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the static scope associated with this value. This value must be a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isMetaObject()"},"children":[{"kind":"text","text":"meta-object"}]},{"kind":"text","text":". A static scope is an object that exposes static members, members whose values or behavior are independent of any particular instance."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The returned static scope can be used to access static members using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"getMember(String)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMemberKeys()"},"code":true,"children":[{"kind":"text","text":"getMemberKeys()"}]},{"kind":"text","text":", or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#invokeMember(java.lang.String,java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"invokeMember(String, Object...)"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The returned static scope is always expected to provide "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMembers()"},"code":true,"children":[{"kind":"text","text":"members"}]},{"kind":"text","text":", representing the static context."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Examples:"}]}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"text","text":"In Java, the static scope exposes static fields and methods of a class."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"In Python, the static scope exposes class-level attributes and methods, effectively corresponding to the members provided by the Python metaobject."}]}]]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasStaticScope()"},"code":true,"children":[{"kind":"text","text":"hasStaticScope()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isMetaObject()"},"code":true,"children":[{"kind":"text","text":"isMetaObject()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMembers()"},"code":true,"children":[{"kind":"text","text":"hasMembers()"}]}]]},"since":"25.1","source":{"path":"org/graalvm/polyglot/Value.java","line":1058}},{"id":"org.graalvm.polyglot.Value#canExecute()","anchor":"canExecute()","kind":"method","name":"canExecute","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"canExecute"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the value can be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#execute(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"executed"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the value can be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#execute(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"executed"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#execute(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"execute(Object...)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1071}},{"id":"org.graalvm.polyglot.Value#execute(java.lang.Object...)","anchor":"execute(java.lang.Object...)","kind":"method","name":"execute","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"execute"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":"... "},{"kind":"param","text":"arguments"},{"kind":"punct","text":")"}],"params":[{"name":"arguments","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":"..."}],"varargs":true}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a wrong number of arguments was provided or one of the arguments was not applicable."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value cannot be executed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the arguments array is null."}]}]}],"doc":{"summary":[{"kind":"text","text":"Executes this value if it "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canExecute()"},"code":true,"children":[{"kind":"text","text":"can"}]},{"kind":"text","text":" be executed and returns its result."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Executes this value if it "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canExecute()"},"code":true,"children":[{"kind":"text","text":"can"}]},{"kind":"text","text":" be executed and returns its result. If no result value is expected or needed use "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#executeVoid(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"executeVoid(Object...)"}]},{"kind":"text","text":" for better performance. All arguments are subject to polyglot value mapping rules as described in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#executeVoid(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"executeVoid(Object...)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1094}},{"id":"org.graalvm.polyglot.Value#executeVoid(java.lang.Object...)","anchor":"executeVoid(java.lang.Object...)","kind":"method","name":"executeVoid","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"executeVoid"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":"... "},{"kind":"param","text":"arguments"},{"kind":"punct","text":")"}],"params":[{"name":"arguments","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":"..."}],"varargs":true}],"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a wrong number of arguments was provided or one of the arguments was not applicable."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value cannot be executed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the arguments array is null."}]}]}],"doc":{"summary":[{"kind":"text","text":"Executes this value if it "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canExecute()"},"code":true,"children":[{"kind":"text","text":"can"}]},{"kind":"text","text":" be executed."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Executes this value if it "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canExecute()"},"code":true,"children":[{"kind":"text","text":"can"}]},{"kind":"text","text":" be executed. All arguments are subject to polyglot value mapping rules as described in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#execute(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"execute(Object...)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1120}},{"id":"org.graalvm.polyglot.Value#canInstantiate()","anchor":"canInstantiate()","kind":"method","name":"canInstantiate","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"canInstantiate"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the value can be instantiated."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the value can be instantiated. This indicates that the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#newInstance(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"newInstance(Object...)"}]},{"kind":"text","text":" can be used with this value. If a value is instantiable it is often also a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isMetaObject()"},"code":true,"children":[{"kind":"text","text":"isMetaObject()"}]},{"kind":"text","text":", but this is not a requirement."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isMetaObject()"},"code":true,"children":[{"kind":"text","text":"isMetaObject()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1138}},{"id":"org.graalvm.polyglot.Value#newInstance(java.lang.Object...)","anchor":"newInstance(java.lang.Object...)","kind":"method","name":"newInstance","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"newInstance"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":"... "},{"kind":"param","text":"arguments"},{"kind":"punct","text":")"}],"params":[{"name":"arguments","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":"..."}],"varargs":true}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a wrong number of arguments was provided or one of the arguments was not applicable."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value cannot be instantiated."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the arguments array is null."}]}]}],"doc":{"summary":[{"kind":"text","text":"Instantiates this value if it "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canInstantiate()"},"code":true,"children":[{"kind":"text","text":"can"}]},{"kind":"text","text":" be instantiated."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Instantiates this value if it "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canInstantiate()"},"code":true,"children":[{"kind":"text","text":"can"}]},{"kind":"text","text":" be instantiated. All arguments are subject to polyglot value mapping rules as described in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1158}},{"id":"org.graalvm.polyglot.Value#canInvokeMember(java.lang.String)","anchor":"canInvokeMember(java.lang.String)","kind":"method","name":"canInvokeMember","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"canInvokeMember"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"identifier"},{"kind":"punct","text":")"}],"params":[{"name":"identifier","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the member identifier"}]}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the given member exists and can be invoked."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the given member exists and can be invoked. Returns "},{"kind":"code","text":"false"},{"kind":"text","text":" if the member does not exist ("},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"hasMember(String)"}]},{"kind":"text","text":" returns "},{"kind":"code","text":"false"},{"kind":"text","text":"), or is not invocable."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMemberKeys()"},"code":true,"children":[{"kind":"text","text":"For a list of members."}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#invokeMember(java.lang.String,java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"invokeMember(String, Object...)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1179}},{"id":"org.graalvm.polyglot.Value#invokeMember(java.lang.String,java.lang.Object...)","anchor":"invokeMember(java.lang.String,java.lang.Object...)","kind":"method","name":"invokeMember","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"invokeMember"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"identifier"},{"kind":"punct","text":", "},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":"... "},{"kind":"param","text":"arguments"},{"kind":"punct","text":")"}],"params":[{"name":"identifier","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the member identifier to invoke"}]}]},{"name":"arguments","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":"..."}],"varargs":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the invocation arguments"}]}]}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this member cannot be invoked."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during invocation."}]}]},{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the arguments array is null."}]}]}],"doc":{"summary":[{"kind":"text","text":"Invokes the given member of this value."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Invokes the given member of this value. Unlike "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#execute(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"execute(Object...)"}]},{"kind":"text","text":", this is an object oriented execution of a member of an object. To test whether invocation is supported, call "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canInvokeMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"canInvokeMember(String)"}]},{"kind":"text","text":". When object oriented semantics are not supported, use "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"getMember(String)"}]},{"kind":"code","text":"."},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#execute(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"execute(Object...)"}]},{"kind":"text","text":" instead."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canInvokeMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"canInvokeMember(String)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1203}},{"id":"org.graalvm.polyglot.Value#isString()","anchor":"isString()","kind":"method","name":"isString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a string."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a string."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1224}},{"id":"org.graalvm.polyglot.Value#asString()","anchor":"asString()","kind":"method","name":"asString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"asString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"throws":[{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value could not be converted to string."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value does not represent a string."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the "},{"kind":"link","target":{"id":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":" value if this value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isString()"},"code":true,"children":[{"kind":"text","text":"is"}]},{"kind":"text","text":" a string."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the "},{"kind":"link","target":{"id":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":" value if this value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isString()"},"code":true,"children":[{"kind":"text","text":"is"}]},{"kind":"text","text":" a string. This method returns "},{"kind":"code","text":"null"},{"kind":"text","text":" if this value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNull()"},"code":true,"children":[{"kind":"text","text":"null"}]},{"kind":"text","text":" value."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1241}},{"id":"org.graalvm.polyglot.Value#asStringBytes(org.graalvm.polyglot.Value.StringEncoding)","anchor":"asStringBytes(org.graalvm.polyglot.Value.StringEncoding)","kind":"method","name":"asStringBytes","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"byte"},{"kind":"punct","text":"[] "},{"kind":"name","text":"asStringBytes"},{"kind":"punct","text":"("},{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"},{"kind":"punct","text":" "},{"kind":"param","text":"encoding"},{"kind":"punct","text":")"}],"params":[{"name":"encoding","type":[{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the desired encoding for the string. Must not be "},{"kind":"code","text":"null"},{"kind":"text","text":". Supported encodings are defined in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value$StringEncoding"},"code":true,"children":[{"kind":"text","text":"StringEncoding"}]},{"kind":"text","text":"."}]}]}],"returns":{"type":[{"kind":"keyword","text":"byte"},{"kind":"punct","text":"[]"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a byte array containing the string's raw bytes in the specified encoding"}]}]},"throws":[{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"encoding"},{"kind":"text","text":" is "},{"kind":"code","text":"null"}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the string value is no longer valid (e.g., the associated context has been closed)"}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the bytes of a given string value without converting it to a Java "},{"kind":"link","target":{"id":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the bytes of a given string value without converting it to a Java "},{"kind":"link","target":{"id":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"This method retrieves the raw bytes of the string in the specified "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value$StringEncoding"},"code":true,"children":[{"kind":"text","text":"StringEncoding"}]},{"kind":"text","text":", avoiding intermediate conversions to a Java "},{"kind":"code","text":"String"},{"kind":"text","text":". This is particularly useful for performance-sensitive scenarios where the overhead of creating a Java "},{"kind":"code","text":"String"},{"kind":"text","text":" is undesirable."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If the string is not already encoded in the specified encoding, it will be re-encoded before the bytes are returned. Note that re-encoding may involve additional computational overhead depending on the size of the string and the differences between its current encoding and the target encoding. "},{"kind":"strong","children":[{"kind":"text","text":"Usage Note:"}]},{"kind":"text","text":" The returned byte array represents the raw data of the string in the requested encoding. Modifications to the array will not affect the underlying string value."}]}]},"since":"24.2","source":{"path":"org/graalvm/polyglot/Value.java","line":1273}},{"id":"org.graalvm.polyglot.Value#fitsInInt()","anchor":"fitsInInt()","kind":"method","name":"fitsInInt","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"fitsInInt"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value fits in "},{"kind":"code","text":"int"},{"kind":"text","text":", else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value fits in "},{"kind":"code","text":"int"},{"kind":"text","text":", else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asInt()"},"code":true,"children":[{"kind":"text","text":"asInt()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1286}},{"id":"org.graalvm.polyglot.Value#asInt()","anchor":"asInt()","kind":"method","name":"asInt","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"asInt"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"throws":[{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value represents "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNull()"},"code":true,"children":[{"kind":"text","text":"null"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value could not be converted."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns an "},{"kind":"code","text":"int"},{"kind":"text","text":" representation of this value if it is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#fitsInInt()"},"code":true,"children":[{"kind":"text","text":"fits"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns an "},{"kind":"code","text":"int"},{"kind":"text","text":" representation of this value if it is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#fitsInInt()"},"code":true,"children":[{"kind":"text","text":"fits"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1304}},{"id":"org.graalvm.polyglot.Value#isBoolean()","anchor":"isBoolean()","kind":"method","name":"isBoolean","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isBoolean"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a boolean value."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a boolean value."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asBoolean()"},"code":true,"children":[{"kind":"text","text":"asBoolean()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1320}},{"id":"org.graalvm.polyglot.Value#asBoolean()","anchor":"asBoolean()","kind":"method","name":"asBoolean","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"asBoolean"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value represents "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNull()"},"code":true,"children":[{"kind":"text","text":"null"}]}]}]},{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value could not be converted."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns a "},{"kind":"code","text":"boolean"},{"kind":"text","text":" representation of this value if it is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isBoolean()"},"code":true,"children":[{"kind":"text","text":"boolean"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns a "},{"kind":"code","text":"boolean"},{"kind":"text","text":" representation of this value if it is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isBoolean()"},"code":true,"children":[{"kind":"text","text":"boolean"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1338}},{"id":"org.graalvm.polyglot.Value#isNumber()","anchor":"isNumber()","kind":"method","name":"isNumber","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isNumber"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":", else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":", else "},{"kind":"code","text":"false"},{"kind":"text","text":". The number value may be accessed as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asByte()"},"code":true,"children":[{"kind":"text","text":"byte"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asShort()"},"code":true,"children":[{"kind":"text","text":"short"}]},{"kind":"text","text":" "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asInt()"},"code":true,"children":[{"kind":"text","text":"int"}]},{"kind":"text","text":" "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asLong()"},"code":true,"children":[{"kind":"text","text":"long"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asFloat()"},"code":true,"children":[{"kind":"text","text":"float"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asDouble()"},"code":true,"children":[{"kind":"text","text":"double"}]},{"kind":"text","text":" value."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1356}},{"id":"org.graalvm.polyglot.Value#fitsInLong()","anchor":"fitsInLong()","kind":"method","name":"fitsInLong","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"fitsInLong"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value fits in "},{"kind":"code","text":"long"},{"kind":"text","text":", else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value fits in "},{"kind":"code","text":"long"},{"kind":"text","text":", else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asLong()"},"code":true,"children":[{"kind":"text","text":"asLong()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1373}},{"id":"org.graalvm.polyglot.Value#asLong()","anchor":"asLong()","kind":"method","name":"asLong","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"name","text":"asLong"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"long"}]},"throws":[{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value represents "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNull()"},"code":true,"children":[{"kind":"text","text":"null"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value could not be converted to long."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns a "},{"kind":"code","text":"long"},{"kind":"text","text":" representation of this value if it is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#fitsInLong()"},"code":true,"children":[{"kind":"text","text":"fits"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns a "},{"kind":"code","text":"long"},{"kind":"text","text":" representation of this value if it is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#fitsInLong()"},"code":true,"children":[{"kind":"text","text":"fits"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1391}},{"id":"org.graalvm.polyglot.Value#fitsInBigInteger()","anchor":"fitsInBigInteger()","kind":"method","name":"fitsInBigInteger","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"fitsInBigInteger"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value fits in "},{"kind":"code","text":"BigInteger"},{"kind":"text","text":", else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value fits in "},{"kind":"code","text":"BigInteger"},{"kind":"text","text":", else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asBigInteger()"},"code":true,"children":[{"kind":"text","text":"asBigInteger()"}]}]]},"since":"23.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1408}},{"id":"org.graalvm.polyglot.Value#asBigInteger()","anchor":"asBigInteger()","kind":"method","name":"asBigInteger","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"BigInteger","ref":"java.math.BigInteger","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/math/BigInteger.html"},{"kind":"punct","text":" "},{"kind":"name","text":"asBigInteger"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"BigInteger","ref":"java.math.BigInteger","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/math/BigInteger.html"}]},"throws":[{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value represents "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNull()"},"code":true,"children":[{"kind":"text","text":"null"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value could not be converted to BigInteger."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns a "},{"kind":"code","text":"BigInteger"},{"kind":"text","text":" representation of this value if it is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#fitsInBigInteger()"},"code":true,"children":[{"kind":"text","text":"fits"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns a "},{"kind":"code","text":"BigInteger"},{"kind":"text","text":" representation of this value if it is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#fitsInBigInteger()"},"code":true,"children":[{"kind":"text","text":"fits"}]},{"kind":"text","text":"."}]}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1426}},{"id":"org.graalvm.polyglot.Value#fitsInDouble()","anchor":"fitsInDouble()","kind":"method","name":"fitsInDouble","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"fitsInDouble"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value fits in "},{"kind":"code","text":"double"},{"kind":"text","text":", else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value fits in "},{"kind":"code","text":"double"},{"kind":"text","text":", else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asDouble()"},"code":true,"children":[{"kind":"text","text":"asDouble()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1443}},{"id":"org.graalvm.polyglot.Value#asDouble()","anchor":"asDouble()","kind":"method","name":"asDouble","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"double"},{"kind":"punct","text":" "},{"kind":"name","text":"asDouble"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"double"}]},"throws":[{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value represents "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNull()"},"code":true,"children":[{"kind":"text","text":"null"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value could not be converted."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns a "},{"kind":"code","text":"double"},{"kind":"text","text":" representation of this value if it is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#fitsInDouble()"},"code":true,"children":[{"kind":"text","text":"fits"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns a "},{"kind":"code","text":"double"},{"kind":"text","text":" representation of this value if it is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#fitsInDouble()"},"code":true,"children":[{"kind":"text","text":"fits"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1461}},{"id":"org.graalvm.polyglot.Value#fitsInFloat()","anchor":"fitsInFloat()","kind":"method","name":"fitsInFloat","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"fitsInFloat"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value fits in "},{"kind":"code","text":"float"},{"kind":"text","text":", else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value fits in "},{"kind":"code","text":"float"},{"kind":"text","text":", else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asFloat()"},"code":true,"children":[{"kind":"text","text":"asFloat()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1478}},{"id":"org.graalvm.polyglot.Value#asFloat()","anchor":"asFloat()","kind":"method","name":"asFloat","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"float"},{"kind":"punct","text":" "},{"kind":"name","text":"asFloat"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"float"}]},"throws":[{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value represents "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNull()"},"code":true,"children":[{"kind":"text","text":"null"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value could not be converted."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns a "},{"kind":"code","text":"float"},{"kind":"text","text":" representation of this value if it is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#fitsInFloat()"},"code":true,"children":[{"kind":"text","text":"fits"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns a "},{"kind":"code","text":"float"},{"kind":"text","text":" representation of this value if it is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#fitsInFloat()"},"code":true,"children":[{"kind":"text","text":"fits"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1496}},{"id":"org.graalvm.polyglot.Value#fitsInByte()","anchor":"fitsInByte()","kind":"method","name":"fitsInByte","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"fitsInByte"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value fits in "},{"kind":"code","text":"byte"},{"kind":"text","text":", else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value fits in "},{"kind":"code","text":"byte"},{"kind":"text","text":", else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asByte()"},"code":true,"children":[{"kind":"text","text":"asByte()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1513}},{"id":"org.graalvm.polyglot.Value#asByte()","anchor":"asByte()","kind":"method","name":"asByte","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"byte"},{"kind":"punct","text":" "},{"kind":"name","text":"asByte"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"byte"}]},"throws":[{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value represents "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNull()"},"code":true,"children":[{"kind":"text","text":"null"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value could not be converted."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns a "},{"kind":"code","text":"byte"},{"kind":"text","text":" representation of this value if it is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#fitsInByte()"},"code":true,"children":[{"kind":"text","text":"fits"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns a "},{"kind":"code","text":"byte"},{"kind":"text","text":" representation of this value if it is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#fitsInByte()"},"code":true,"children":[{"kind":"text","text":"fits"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1531}},{"id":"org.graalvm.polyglot.Value#fitsInShort()","anchor":"fitsInShort()","kind":"method","name":"fitsInShort","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"fitsInShort"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value fits in "},{"kind":"code","text":"short"},{"kind":"text","text":", else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value fits in "},{"kind":"code","text":"short"},{"kind":"text","text":", else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asShort()"},"code":true,"children":[{"kind":"text","text":"asShort()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1548}},{"id":"org.graalvm.polyglot.Value#asShort()","anchor":"asShort()","kind":"method","name":"asShort","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"short"},{"kind":"punct","text":" "},{"kind":"name","text":"asShort"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"short"}]},"throws":[{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value represents "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNull()"},"code":true,"children":[{"kind":"text","text":"null"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this value could not be converted."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns a "},{"kind":"code","text":"short"},{"kind":"text","text":" representation of this value if it is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#fitsInShort()"},"code":true,"children":[{"kind":"text","text":"fits"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns a "},{"kind":"code","text":"short"},{"kind":"text","text":" representation of this value if it is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" and the value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#fitsInShort()"},"code":true,"children":[{"kind":"text","text":"fits"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1566}},{"id":"org.graalvm.polyglot.Value#isNull()","anchor":"isNull()","kind":"method","name":"isNull","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isNull"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value is a "},{"kind":"code","text":"null"},{"kind":"text","text":" like."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value is a "},{"kind":"code","text":"null"},{"kind":"text","text":" like."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1581}},{"id":"org.graalvm.polyglot.Value#isNativePointer()","anchor":"isNativePointer()","kind":"method","name":"isNativePointer","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isNativePointer"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value is a native pointer."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value is a native pointer. The value of the pointer can be accessed using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asNativePointer()"},"code":true,"children":[{"kind":"text","text":"asNativePointer()"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1597}},{"id":"org.graalvm.polyglot.Value#asNativePointer()","anchor":"asNativePointer()","kind":"method","name":"asNativePointer","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"name","text":"asNativePointer"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"long"}]},"throws":[{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value is not a pointer."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the value of the pointer as "},{"kind":"code","text":"long"},{"kind":"text","text":" value."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the value of the pointer as "},{"kind":"code","text":"long"},{"kind":"text","text":" value."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1613}},{"id":"org.graalvm.polyglot.Value#isHostObject()","anchor":"isHostObject()","kind":"method","name":"isHostObject","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isHostObject"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the value originated form the host language Java."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the value originated form the host language Java. In such a case the value can be accessed using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asHostObject()"},"code":true,"children":[{"kind":"text","text":"asHostObject()"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1629}},{"id":"org.graalvm.polyglot.Value#asHostObject()","anchor":"asHostObject()","kind":"method","name":"asHostObject","modifiers":["public"],"typeParams":[{"name":"T"}],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" <"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"name","text":"asHostObject"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"typeParam","text":"T"}]},"throws":[{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isHostObject()"},"code":true,"children":[{"kind":"text","text":"isHostObject()"}]},{"kind":"text","text":" is "},{"kind":"code","text":"false"}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if Java host language object is allocated in a foreign heap."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the original Java host language object."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the original Java host language object."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1647}},{"id":"org.graalvm.polyglot.Value#isProxyObject()","anchor":"isProxyObject()","kind":"method","name":"isProxyObject","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isProxyObject"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"Proxy"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"Proxy"}]},{"kind":"text","text":". The proxy instance can be unboxed using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asProxyObject()"},"code":true,"children":[{"kind":"text","text":"asProxyObject()"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1664}},{"id":"org.graalvm.polyglot.Value#asProxyObject()","anchor":"asProxyObject()","kind":"method","name":"asProxyObject","modifiers":["public"],"typeParams":[{"name":"T","bounds":[[{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}]]}],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" <"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"},{"kind":"punct","text":"> "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"name","text":"asProxyObject"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"typeParam","text":"T"}]},"throws":[{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a value is not a proxy object."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context was closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the unboxed instance of the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"Proxy"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the unboxed instance of the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"Proxy"}]},{"kind":"text","text":". Proxies are not automatically boxed to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isHostObject()"},"code":true,"children":[{"kind":"text","text":"host objects"}]},{"kind":"text","text":" on host language call boundaries (Java methods)."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1681}},{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)","anchor":"as(java.lang.Class)","kind":"method","name":"as","modifiers":["public"],"typeParams":[{"name":"T"}],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" <"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"name","text":"as"},{"kind":"punct","text":"("},{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"param","text":"targetType"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"},{"kind":"punct","text":", "},{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"},{"kind":"punct","text":", "},{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"params":[{"name":"targetType","type":[{"kind":"type","text":"Class","ref":"java.lang.Class","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the target Java type to map"}]}]}],"returns":{"type":[{"kind":"typeParam","text":"T"}]},"throws":[{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if polyglot value could not be mapped to the target type."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the conversion triggered a guest language error."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context is already closed."}]}]},{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the target type is null."}]}]}],"doc":{"summary":[{"kind":"text","text":"Maps a polyglot value to a value with a given Java target type."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Maps a polyglot value to a value with a given Java target type."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Target type mapping"}]},{"kind":"paragraph","children":[{"kind":"text","text":"The following target types are supported and interpreted in the following order:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"text","text":"Custom "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#targetTypeMapping(java.lang.Class,java.lang.Class,java.util.function.Predicate,java.util.function.Function)"},"code":true,"children":[{"kind":"text","text":"target type mappings"}]},{"kind":"text","text":" specified in the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"HostAccess"}]},{"kind":"text","text":" configuration with precedence "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#HIGHEST"},"code":true,"children":[{"kind":"text","text":"TargetMappingPrecedence.HIGHEST"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#HIGH"},"code":true,"children":[{"kind":"text","text":"TargetMappingPrecedence.HIGH"}]},{"kind":"text","text":". These custom target type mappings may override all the type mappings below. This allows for customization if one of the below type mappings is not suitable."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"Value"}]},{"kind":"code","text":".class"},{"kind":"text","text":" is always supported and returns this instance."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isHostObject()"},"code":true,"children":[{"kind":"text","text":"host object"}]},{"kind":"text","text":" then all classes implemented or extended by the host object can be used as target type."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"code","text":".class"},{"kind":"text","text":" is supported if the value is a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isString()"},"code":true,"children":[{"kind":"text","text":"string"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.lang.Character","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Character.html"},"code":true,"children":[{"kind":"text","text":"Character"}]},{"kind":"code","text":".class"},{"kind":"text","text":" is supported if the value is a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isString()"},"code":true,"children":[{"kind":"text","text":"string"}]},{"kind":"text","text":" of length one or if a number can be safely be converted to a character."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.lang.Number","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Number.html"},"code":true,"children":[{"kind":"text","text":"Number"}]},{"kind":"code","text":".class"},{"kind":"text","text":" is supported if the value is a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":". "},{"kind":"link","target":{"id":"java.lang.Byte","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Byte.html"},"code":true,"children":[{"kind":"text","text":"Byte"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.lang.Short","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Short.html"},"code":true,"children":[{"kind":"text","text":"Short"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.lang.Integer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Integer.html"},"code":true,"children":[{"kind":"text","text":"Integer"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.lang.Long","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Long.html"},"code":true,"children":[{"kind":"text","text":"Long"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.lang.Float","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Float.html"},"code":true,"children":[{"kind":"text","text":"Float"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"java.lang.Double","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Double.html"},"code":true,"children":[{"kind":"text","text":"Double"}]},{"kind":"text","text":" are allowed if they fit without conversion. If a conversion is necessary then a "},{"kind":"link","target":{"id":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"},"code":true,"children":[{"kind":"text","text":"ClassCastException"}]},{"kind":"text","text":" is thrown. Primitive class literals throw a "},{"kind":"link","target":{"id":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"},"code":true,"children":[{"kind":"text","text":"NullPointerException"}]},{"kind":"text","text":" if the value represents "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNull()"},"code":true,"children":[{"kind":"text","text":"null"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.lang.Boolean","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Boolean.html"},"code":true,"children":[{"kind":"text","text":"Boolean"}]},{"kind":"code","text":".class"},{"kind":"text","text":" is supported if the value is a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isBoolean()"},"code":true,"children":[{"kind":"text","text":"boolean"}]},{"kind":"text","text":". Primitive "},{"kind":"link","target":{"id":"java.lang.Boolean","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Boolean.html"},"code":true,"children":[{"kind":"text","text":"boolean.class"}]},{"kind":"text","text":" literal is also supported. The primitive class literal throws a "},{"kind":"link","target":{"id":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"},"code":true,"children":[{"kind":"text","text":"NullPointerException"}]},{"kind":"text","text":" if the value represents "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNull()"},"code":true,"children":[{"kind":"text","text":"null"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.time.LocalDate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalDate.html"},"code":true,"children":[{"kind":"text","text":"LocalDate"}]},{"kind":"code","text":".class"},{"kind":"text","text":" is supported if the value is a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isDate()"},"code":true,"children":[{"kind":"text","text":"date"}]}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.time.LocalTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalTime.html"},"code":true,"children":[{"kind":"text","text":"LocalTime"}]},{"kind":"code","text":".class"},{"kind":"text","text":" is supported if the value is a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTime()"},"code":true,"children":[{"kind":"text","text":"time"}]}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.time.LocalDateTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalDateTime.html"},"code":true,"children":[{"kind":"text","text":"LocalDateTime"}]},{"kind":"code","text":".class"},{"kind":"text","text":" is supported if the value is a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isDate()"},"code":true,"children":[{"kind":"text","text":"date"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTime()"},"code":true,"children":[{"kind":"text","text":"time"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.time.Instant","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Instant.html"},"code":true,"children":[{"kind":"text","text":"Instant"}]},{"kind":"code","text":".class"},{"kind":"text","text":" is supported if the value is an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isInstant()"},"code":true,"children":[{"kind":"text","text":"instant"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.time.ZonedDateTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/ZonedDateTime.html"},"code":true,"children":[{"kind":"text","text":"ZonedDateTime"}]},{"kind":"code","text":".class"},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"java.time.OffsetDateTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/OffsetDateTime.html"},"code":true,"children":[{"kind":"text","text":"OffsetDateTime"}]},{"kind":"code","text":".class"},{"kind":"text","text":" are supported if the value is a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isDate()"},"code":true,"children":[{"kind":"text","text":"date"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTime()"},"code":true,"children":[{"kind":"text","text":"time"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTimeZone()"},"code":true,"children":[{"kind":"text","text":"timezone"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.time.OffsetTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/OffsetTime.html"},"code":true,"children":[{"kind":"text","text":"OffsetTime"}]},{"kind":"code","text":".class"},{"kind":"text","text":" is supported if the value is a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTime()"},"code":true,"children":[{"kind":"text","text":"time"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTimeZone()"},"code":true,"children":[{"kind":"text","text":"timezone"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.time.ZoneId","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/ZoneId.html"},"code":true,"children":[{"kind":"text","text":"ZoneId"}]},{"kind":"code","text":".class"},{"kind":"text","text":" is supported if the value is a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTimeZone()"},"code":true,"children":[{"kind":"text","text":"timezone"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.time.Duration","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Duration.html"},"code":true,"children":[{"kind":"text","text":"Duration"}]},{"kind":"code","text":".class"},{"kind":"text","text":" is supported if the value is a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isDuration()"},"code":true,"children":[{"kind":"text","text":"duration"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"code","text":".class"},{"kind":"text","text":" is supported if the value is an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isException()"},"code":true,"children":[{"kind":"text","text":"exception object"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Any Java type in the type hierarchy of a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isHostObject()"},"code":true,"children":[{"kind":"text","text":"host object"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Custom "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#targetTypeMapping(java.lang.Class,java.lang.Class,java.util.function.Predicate,java.util.function.Function)"},"code":true,"children":[{"kind":"text","text":"target type mappings"}]},{"kind":"text","text":" specified in the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"HostAccess"}]},{"kind":"text","text":" configuration with precedence "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#LOW"},"code":true,"children":[{"kind":"text","text":"TargetMappingPrecedence.LOW"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"code":true,"children":[{"kind":"text","text":"Object"}]},{"kind":"code","text":".class"},{"kind":"text","text":" is always supported. See section Object mapping rules."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"Map"}]},{"kind":"code","text":".class"},{"kind":"text","text":" is supported if "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$MutableTargetMapping#MEMBERS_TO_JAVA_MAP"},"code":true,"children":[{"kind":"text","text":"HostAccess.MutableTargetMapping.MEMBERS_TO_JAVA_MAP"}]},{"kind":"text","text":" respectively "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$MutableTargetMapping#HASH_TO_JAVA_MAP"},"code":true,"children":[{"kind":"text","text":"HostAccess.MutableTargetMapping.HASH_TO_JAVA_MAP"}]},{"kind":"text","text":" are "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowMutableTargetMappings(org.graalvm.polyglot.HostAccess.MutableTargetMapping...)"},"code":true,"children":[{"kind":"text","text":"allowed"}]},{"kind":"text","text":" and the value has "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasHashEntries()"},"code":true,"children":[{"kind":"text","text":"hasHashEntries()"}]},{"kind":"text","text":" hash entries}, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMembers()"},"code":true,"children":[{"kind":"text","text":"members"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasArrayElements()"},"code":true,"children":[{"kind":"text","text":"array elements"}]},{"kind":"text","text":". The returned map can be safely cast to Map<Object, Object>. For value with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMembers()"},"code":true,"children":[{"kind":"text","text":"members"}]},{"kind":"text","text":" the key type is "},{"kind":"link","target":{"id":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":". For value with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasArrayElements()"},"code":true,"children":[{"kind":"text","text":"array elements"}]},{"kind":"text","text":" the key type is "},{"kind":"link","target":{"id":"java.lang.Long","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Long.html"},"code":true,"children":[{"kind":"text","text":"Long"}]},{"kind":"text","text":". It is recommended to use "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(org.graalvm.polyglot.TypeLiteral)"},"code":true,"children":[{"kind":"text","text":"type literals"}]},{"kind":"text","text":" to specify the expected collection component types. With type literals the value type can be restricted, for example to "},{"kind":"code","text":"Map<String, String>"},{"kind":"text","text":". If the raw "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"Map"}]},{"kind":"code","text":".class"},{"kind":"text","text":" or an Object component type is used, then the return types of the list are subject to Object target type mapping rules recursively."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},"code":true,"children":[{"kind":"text","text":"List"}]},{"kind":"code","text":".class"},{"kind":"text","text":" is supported if "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$MutableTargetMapping#ARRAY_TO_JAVA_LIST"},"code":true,"children":[{"kind":"text","text":"HostAccess.MutableTargetMapping.ARRAY_TO_JAVA_LIST"}]},{"kind":"text","text":" is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowMutableTargetMappings(org.graalvm.polyglot.HostAccess.MutableTargetMapping...)"},"code":true,"children":[{"kind":"text","text":"allowed"}]},{"kind":"text","text":" and the value has "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasArrayElements()"},"code":true,"children":[{"kind":"text","text":"array elements"}]},{"kind":"text","text":" and it has an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getArraySize()"},"code":true,"children":[{"kind":"text","text":"array size"}]},{"kind":"text","text":" that is smaller or equal to "},{"kind":"link","target":{"id":"java.lang.Integer#MAX_VALUE","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Integer.html#MAX_VALUE"},"code":true,"children":[{"kind":"text","text":"Integer.MAX_VALUE"}]},{"kind":"text","text":". The returned list can be safely cast to "},{"kind":"code","text":"List<Object>"},{"kind":"text","text":". It is recommended to use "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(org.graalvm.polyglot.TypeLiteral)"},"code":true,"children":[{"kind":"text","text":"type literals"}]},{"kind":"text","text":" to specify the expected component type. With type literals the value type can be restricted to any supported target type, for example to "},{"kind":"code","text":"List<Integer>"},{"kind":"text","text":". If the raw "},{"kind":"link","target":{"id":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},"code":true,"children":[{"kind":"text","text":"List"}]},{"kind":"code","text":".class"},{"kind":"text","text":" or an Object component type is used, then the return types of the list are recursively subject to Object target type mapping rules."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.io.ByteSequence"},"code":true,"children":[{"kind":"text","text":"ByteSequence"}]},{"kind":"code","text":".class"},{"kind":"text","text":" is supported if the value has "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"buffer elements"}]},{"kind":"text","text":" and it has a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getBufferSize()"},"code":true,"children":[{"kind":"text","text":"buffer size"}]},{"kind":"text","text":" that is smaller or equal to "},{"kind":"link","target":{"id":"java.lang.Integer#MAX_VALUE","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Integer.html#MAX_VALUE"},"code":true,"children":[{"kind":"text","text":"Integer.MAX_VALUE"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"code","text":"byte[].class"},{"kind":"text","text":" is supported if the value has "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"buffer elements"}]},{"kind":"text","text":" and it has a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getBufferSize()"},"code":true,"children":[{"kind":"text","text":"buffer size"}]},{"kind":"text","text":" that is smaller or equal to "},{"kind":"link","target":{"id":"java.lang.Integer#MAX_VALUE","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Integer.html#MAX_VALUE"},"code":true,"children":[{"kind":"text","text":"Integer.MAX_VALUE"}]},{"kind":"code","text":" - 8"},{"kind":"text","text":". The contents of the buffer will be copied to a new byte array with appropriate size."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Any Java array type of a supported target type. The values of the value will be eagerly coerced and copied into a new instance of the provided array type. This means that changes in returned array will not be reflected in the original value. Since conversion to a Java array might be an expensive operation it is recommended to use the `List` or `Collection` target type if possible."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.lang.Iterable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html"},"code":true,"children":[{"kind":"text","text":"Iterable"}]},{"kind":"code","text":".class"},{"kind":"text","text":" is supported if "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$MutableTargetMapping#ITERATOR_TO_JAVA_ITERATOR"},"code":true,"children":[{"kind":"text","text":"HostAccess.MutableTargetMapping.ITERATOR_TO_JAVA_ITERATOR"}]},{"kind":"text","text":" is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowMutableTargetMappings(org.graalvm.polyglot.HostAccess.MutableTargetMapping...)"},"code":true,"children":[{"kind":"text","text":"allowed"}]},{"kind":"text","text":" and the value has an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasIterator()"},"code":true,"children":[{"kind":"text","text":"iterator"}]},{"kind":"text","text":". The returned iterable can be safely cast to "},{"kind":"code","text":"Iterable<Object>"},{"kind":"text","text":". It is recommended to use "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(org.graalvm.polyglot.TypeLiteral)"},"code":true,"children":[{"kind":"text","text":"type literals"}]},{"kind":"text","text":" to specify the expected component type. With type literals the value type can be restricted to any supported target type, for example to "},{"kind":"code","text":"Iterable<Integer>"},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},"code":true,"children":[{"kind":"text","text":"Iterator"}]},{"kind":"code","text":".class"},{"kind":"text","text":" is supported if "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$MutableTargetMapping#ITERATOR_TO_JAVA_ITERATOR"},"code":true,"children":[{"kind":"text","text":"HostAccess.MutableTargetMapping.ITERATOR_TO_JAVA_ITERATOR"}]},{"kind":"text","text":" is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowMutableTargetMappings(org.graalvm.polyglot.HostAccess.MutableTargetMapping...)"},"code":true,"children":[{"kind":"text","text":"allowed"}]},{"kind":"text","text":" and the value is an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isIterator()"},"code":true,"children":[{"kind":"text","text":"iterator"}]},{"kind":"text","text":" The returned iterator can be safely cast to "},{"kind":"code","text":"Iterator<Object>"},{"kind":"text","text":". It is recommended to use "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(org.graalvm.polyglot.TypeLiteral)"},"code":true,"children":[{"kind":"text","text":"type literals"}]},{"kind":"text","text":" to specify the expected component type. With type literals the value type can be restricted to any supported target type, for example to "},{"kind":"code","text":"Iterator<Integer>"},{"kind":"text","text":". If the raw "},{"kind":"link","target":{"id":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},"code":true,"children":[{"kind":"text","text":"Iterator"}]},{"kind":"code","text":".class"},{"kind":"text","text":" or an Object component type is used, then the return types of the iterator are recursively subject to Object target type mapping rules. The returned iterator's "},{"kind":"link","target":{"id":"java.util.Iterator#next()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html#next()"},"code":true,"children":[{"kind":"text","text":"next"}]},{"kind":"text","text":" method may throw a "},{"kind":"link","target":{"id":"java.util.ConcurrentModificationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/ConcurrentModificationException.html"},"code":true,"children":[{"kind":"text","text":"ConcurrentModificationException"}]},{"kind":"text","text":" when an underlying iterable has changed or "},{"kind":"link","target":{"id":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},"code":true,"children":[{"kind":"text","text":"UnsupportedOperationException"}]},{"kind":"text","text":" when the iterator's current element is not readable."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Any "},{"kind":"link","target":{"id":"java.lang.FunctionalInterface","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/FunctionalInterface.html"},"code":true,"children":[{"kind":"text","text":"functional"}]},{"kind":"text","text":" interface if "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$MutableTargetMapping#EXECUTABLE_TO_JAVA_INTERFACE"},"code":true,"children":[{"kind":"text","text":"HostAccess.MutableTargetMapping.EXECUTABLE_TO_JAVA_INTERFACE"}]},{"kind":"text","text":" is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowMutableTargetMappings(org.graalvm.polyglot.HostAccess.MutableTargetMapping...)"},"code":true,"children":[{"kind":"text","text":"allowed"}]},{"kind":"text","text":" and the value can be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canExecute()"},"code":true,"children":[{"kind":"text","text":"executed"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canInstantiate()"},"code":true,"children":[{"kind":"text","text":"instantiated"}]},{"kind":"text","text":" and the interface type is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"implementable"}]},{"kind":"text","text":". Note that "},{"kind":"link","target":{"id":"java.lang.FunctionalInterface","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/FunctionalInterface.html"},"code":true,"children":[{"kind":"text","text":"FunctionalInterface"}]},{"kind":"text","text":" are implementable by default in with the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#EXPLICIT"},"code":true,"children":[{"kind":"text","text":"explicit"}]},{"kind":"text","text":" host access policy. In case a value can be executed and instantiated then the returned implementation of the interface will be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#execute(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"executed"}]},{"kind":"text","text":". The coercion to the parameter types of functional interface method is converted using the semantics of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"as(Class)"}]},{"kind":"text","text":". If a standard functional interface like "},{"kind":"link","target":{"id":"java.util.function.Function","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Function.html"},"code":true,"children":[{"kind":"text","text":"Function"}]},{"kind":"text","text":" is used, it is recommended to use "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(org.graalvm.polyglot.TypeLiteral)"},"code":true,"children":[{"kind":"text","text":"type literals"}]},{"kind":"text","text":" to specify the expected generic method parameter and return type."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Any interface if the value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMembers()"},"code":true,"children":[{"kind":"text","text":"has members"}]},{"kind":"text","text":" and the interface type is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Implementable"},"code":true,"children":[{"kind":"text","text":"implementable"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$MutableTargetMapping#MEMBERS_TO_JAVA_INTERFACE"},"code":true,"children":[{"kind":"text","text":"HostAccess.MutableTargetMapping.MEMBERS_TO_JAVA_INTERFACE"}]},{"kind":"text","text":" is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowMutableTargetMappings(org.graalvm.polyglot.HostAccess.MutableTargetMapping...)"},"code":true,"children":[{"kind":"text","text":"allowed"}]},{"kind":"text","text":". Each interface method maps to one "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"member"}]},{"kind":"text","text":" of the value. Whenever a method of the interface is executed a member with the method or field name must exist otherwise an "},{"kind":"link","target":{"id":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},"code":true,"children":[{"kind":"text","text":"UnsupportedOperationException"}]},{"kind":"text","text":" is thrown when the method is executed. If one of the parameters or the return value cannot be mapped to the target type a "},{"kind":"link","target":{"id":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"},"code":true,"children":[{"kind":"text","text":"ClassCastException"}]},{"kind":"text","text":" or a "},{"kind":"link","target":{"id":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"},"code":true,"children":[{"kind":"text","text":"NullPointerException"}]},{"kind":"text","text":" is thrown."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"JVM only: Any abstract class with an accessible default constructor if the value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMembers()"},"code":true,"children":[{"kind":"text","text":"has members"}]},{"kind":"text","text":" and the class is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Implementable"},"code":true,"children":[{"kind":"text","text":"implementable"}]},{"kind":"text","text":". Each interface method maps to one "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"member"}]},{"kind":"text","text":" of the value. Whenever an abstract method of the class is executed a member with the method or field name must exist otherwise an "},{"kind":"link","target":{"id":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},"code":true,"children":[{"kind":"text","text":"UnsupportedOperationException"}]},{"kind":"text","text":" is thrown when the method is executed. If one of the parameters or the return value cannot be mapped to the target type a "},{"kind":"link","target":{"id":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"},"code":true,"children":[{"kind":"text","text":"ClassCastException"}]},{"kind":"text","text":" or a "},{"kind":"link","target":{"id":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"},"code":true,"children":[{"kind":"text","text":"NullPointerException"}]},{"kind":"text","text":" is thrown."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Custom "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#targetTypeMapping(java.lang.Class,java.lang.Class,java.util.function.Predicate,java.util.function.Function)"},"code":true,"children":[{"kind":"text","text":"target type mappings"}]},{"kind":"text","text":" specified in the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"HostAccess"}]},{"kind":"text","text":" configuration with precedence "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$TargetMappingPrecedence#LOWEST"},"code":true,"children":[{"kind":"text","text":"TargetMappingPrecedence.LOWEST"}]},{"kind":"text","text":"."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"A "},{"kind":"link","target":{"id":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"},"code":true,"children":[{"kind":"text","text":"ClassCastException"}]},{"kind":"text","text":" is thrown for other unsupported target types."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"JavaScript Usage Examples:"}]}]},{"kind":"code","text":"Context context = Context.newBuilder().allowHostAccess(HostAccess.ALL).build();\nassert context.eval(\"js\", \"undefined\").as(Object.class) == null;\nassert context.eval(\"js\", \"'foobar'\").as(String.class).equals(\"foobar\");\nassert context.eval(\"js\", \"42\").as(Integer.class) == 42;\nassert context.eval(\"js\", \"({foo:'bar'})\").as(Map.class).get(\"foo\").equals(\"bar\");\nassert context.eval(\"js\", \"[42]\").as(List.class).get(0).equals(42);\nassert Arrays.equals(context.eval(\"js\", \"([0, 1, 127])\").as(byte[].class), new byte[]{0, 1, 127});\nassert Arrays.equals(context.eval(\"js\", \"(new Uint8Array([0, 1, 127, 255]))\").getMember(\"buffer\").as(byte[].class), new byte[]{0, 1, 127, -1});\nassert ((Map<String, Object>) context.eval(\"js\", \"[{foo:'bar'}]\").as(List.class).get(0)).get(\"foo\").equals(\"bar\");\n\n@FunctionalInterface\ninterface IntFunction {\n    int foo(int value);\n}\nassert context.eval(\"js\", \"(function(a){return a})\").as(IntFunction.class).foo(42).asInt() == 42;\n\n@FunctionalInterface\ninterface StringListFunction {\n    int foo(List<String> value);\n}\nassert context.eval(\"js\", \"(function(a){return a.length})\").as(StringListFunction.class).foo(new String[]{\"42\"}).asInt() == 1;\n\npublic abstract class AbstractClass {\n    public AbstractClass() {\n    }\n\n    int foo(int value);\n}\nassert context.eval(\"js\", \"({foo: function(a){return a}})\").as(AbstractClass.class).foo(42).asInt() == 42;"},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Object target type mapping"}]},{"kind":"paragraph","children":[{"kind":"text","text":"Object target mapping is useful to map polyglot values to its closest corresponding standard JDK type. The following rules apply when "},{"kind":"code","text":"Object"},{"kind":"text","text":" is used as a target type:"}]},{"kind":"list","ordered":true,"items":[[{"kind":"paragraph","children":[{"kind":"text","text":"If the value represents "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNull()"},"code":true,"children":[{"kind":"text","text":"null"}]},{"kind":"text","text":" then "},{"kind":"code","text":"null"},{"kind":"text","text":" is returned."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the value is a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isHostObject()"},"code":true,"children":[{"kind":"text","text":"host object"}]},{"kind":"text","text":" then the value is coerced to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asHostObject()"},"code":true,"children":[{"kind":"text","text":"host object value"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the value is a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isString()"},"code":true,"children":[{"kind":"text","text":"string"}]},{"kind":"text","text":" then the value is coerced to "},{"kind":"link","target":{"id":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"java.lang.Character","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Character.html"},"code":true,"children":[{"kind":"text","text":"Character"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the value is a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isBoolean()"},"code":true,"children":[{"kind":"text","text":"boolean"}]},{"kind":"text","text":" then the value is coerced to "},{"kind":"link","target":{"id":"java.lang.Boolean","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Boolean.html"},"code":true,"children":[{"kind":"text","text":"Boolean"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the value is a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"number"}]},{"kind":"text","text":" then the value is coerced to "},{"kind":"link","target":{"id":"java.lang.Number","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Number.html"},"code":true,"children":[{"kind":"text","text":"Number"}]},{"kind":"text","text":". The specific sub type of the "},{"kind":"link","target":{"id":"java.lang.Number","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Number.html"},"code":true,"children":[{"kind":"text","text":"Number"}]},{"kind":"text","text":" is not specified. Users need to be prepared for any Number subclass including "},{"kind":"link","target":{"id":"java.math.BigInteger","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/math/BigInteger.html"},"code":true,"children":[{"kind":"text","text":"BigInteger"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"java.math.BigDecimal","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/math/BigDecimal.html"},"code":true,"children":[{"kind":"text","text":"BigDecimal"}]},{"kind":"text","text":". It is recommended to cast to "},{"kind":"link","target":{"id":"java.lang.Number","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Number.html"},"code":true,"children":[{"kind":"text","text":"Number"}]},{"kind":"text","text":" and then convert to a Java primitive like with "},{"kind":"link","target":{"id":"java.lang.Number#longValue()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Number.html#longValue()"},"code":true,"children":[{"kind":"text","text":"Number.longValue()"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the value has "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasArrayElements()"},"code":true,"children":[{"kind":"text","text":"array elements"}]},{"kind":"text","text":" and it has an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getArraySize()"},"code":true,"children":[{"kind":"text","text":"array size"}]},{"kind":"text","text":" that is smaller or equal than "},{"kind":"link","target":{"id":"java.lang.Integer#MAX_VALUE","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Integer.html#MAX_VALUE"},"code":true,"children":[{"kind":"text","text":"Integer.MAX_VALUE"}]},{"kind":"text","text":" then the result value will implement "},{"kind":"link","target":{"id":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},"code":true,"children":[{"kind":"text","text":"List"}]},{"kind":"text","text":". Every array element of the value maps to one list element. The size of the returned list maps to the array size of the value. The returned value may also implement "},{"kind":"link","target":{"id":"java.util.function.Function","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Function.html"},"code":true,"children":[{"kind":"text","text":"Function"}]},{"kind":"text","text":" if the value can be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canExecute()"},"code":true,"children":[{"kind":"text","text":"executed"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canInstantiate()"},"code":true,"children":[{"kind":"text","text":"instantiated"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the value has "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasHashEntries()"},"code":true,"children":[{"kind":"text","text":"hash entries"}]},{"kind":"text","text":" then the result value will implement "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"Map"}]},{"kind":"text","text":". The "},{"kind":"link","target":{"id":"java.util.Map#size()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html#size()"},"code":true,"children":[{"kind":"text","text":"size"}]},{"kind":"text","text":" of the returned "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"Map"}]},{"kind":"text","text":" is equal to the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getHashSize()"},"code":true,"children":[{"kind":"text","text":"hash entries count"}]},{"kind":"text","text":". The returned value may also implement "},{"kind":"link","target":{"id":"java.util.function.Function","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Function.html"},"code":true,"children":[{"kind":"text","text":"Function"}]},{"kind":"text","text":" if the value can be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canExecute()"},"code":true,"children":[{"kind":"text","text":"executed"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canInstantiate()"},"code":true,"children":[{"kind":"text","text":"instantiated"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMembers()"},"code":true,"children":[{"kind":"text","text":"has members"}]},{"kind":"text","text":" then the result value will implement "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"Map"}]},{"kind":"text","text":". If this value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMembers()"},"code":true,"children":[{"kind":"text","text":"has members"}]},{"kind":"text","text":" then all members are accessible using "},{"kind":"link","target":{"id":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":" keys. The "},{"kind":"link","target":{"id":"java.util.Map#size()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html#size()"},"code":true,"children":[{"kind":"text","text":"size"}]},{"kind":"text","text":" of the returned "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"Map"}]},{"kind":"text","text":" is equal to the count of all members. The returned value may also implement "},{"kind":"link","target":{"id":"java.util.function.Function","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Function.html"},"code":true,"children":[{"kind":"text","text":"Function"}]},{"kind":"text","text":" if the value can be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canExecute()"},"code":true,"children":[{"kind":"text","text":"executed"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canInstantiate()"},"code":true,"children":[{"kind":"text","text":"instantiated"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the value has an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasIterator()"},"code":true,"children":[{"kind":"text","text":"hasIterator()"}]},{"kind":"text","text":" iterator} then the result value will implement "},{"kind":"link","target":{"id":"java.lang.Iterable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html"},"code":true,"children":[{"kind":"text","text":"Iterable"}]},{"kind":"text","text":". The returned value may also implement "},{"kind":"link","target":{"id":"java.util.function.Function","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Function.html"},"code":true,"children":[{"kind":"text","text":"Function"}]},{"kind":"text","text":" if the value can be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canExecute()"},"code":true,"children":[{"kind":"text","text":"executed"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canInstantiate()"},"code":true,"children":[{"kind":"text","text":"instantiated"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the value is an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isIterator()"},"code":true,"children":[{"kind":"text","text":"isIterator()"}]},{"kind":"text","text":" iterator} then the result value will implement "},{"kind":"link","target":{"id":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},"code":true,"children":[{"kind":"text","text":"Iterator"}]},{"kind":"text","text":". The returned value may also implement "},{"kind":"link","target":{"id":"java.util.function.Function","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Function.html"},"code":true,"children":[{"kind":"text","text":"Function"}]},{"kind":"text","text":" if the value can be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canExecute()"},"code":true,"children":[{"kind":"text","text":"executed"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canInstantiate()"},"code":true,"children":[{"kind":"text","text":"instantiated"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If the value can be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canExecute()"},"code":true,"children":[{"kind":"text","text":"executed"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canInstantiate()"},"code":true,"children":[{"kind":"text","text":"instantiated"}]},{"kind":"text","text":" then the result value implements "},{"kind":"link","target":{"id":"java.util.function.Function","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Function.html"},"code":true,"children":[{"kind":"text","text":"Function"}]},{"kind":"text","text":". By default the argument of the function will be used as single argument to the function when executed. If a value of type "},{"kind":"link","target":{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"code":true,"children":[{"kind":"text","text":"Object[]"}]},{"kind":"text","text":" is provided then the function will be executed with those arguments. The returned function may also implement "},{"kind":"link","target":{"id":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},"code":true,"children":[{"kind":"text","text":"List"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"Map"}]},{"kind":"text","text":" if the value has "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasArrayElements()"},"code":true,"children":[{"kind":"text","text":"array elements"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMembers()"},"code":true,"children":[{"kind":"text","text":"members"}]},{"kind":"text","text":", respectively."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"Mappings to mutable target types such as "},{"kind":"link","target":{"id":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},"code":true,"children":[{"kind":"text","text":"List"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"Map"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},"code":true,"children":[{"kind":"text","text":"Iterator"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"java.lang.Iterable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html"},"code":true,"children":[{"kind":"text","text":"Iterable"}]},{"kind":"text","text":" are only available if the corresponding mappings are enabled (see "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowMutableTargetMappings(org.graalvm.polyglot.HostAccess.MutableTargetMapping...)"},"code":true,"children":[{"kind":"text","text":"org.graalvm.polyglot.HostAccess.Builder.allowMutableTargetMappings(org.graalvm.polyglot.HostAccess.MutableTargetMapping...)"}]},{"kind":"text","text":")."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If none of the above rules apply then this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"Value"}]},{"kind":"text","text":" instance is returned."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"Returned "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isHostObject()"},"code":true,"children":[{"kind":"text","text":"host objects"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.lang.Number","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Number.html"},"code":true,"children":[{"kind":"text","text":"Number"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.lang.Boolean","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Boolean.html"},"code":true,"children":[{"kind":"text","text":"Boolean"}]},{"kind":"text","text":" and "},{"kind":"code","text":"null"},{"kind":"text","text":" values have unlimited lifetime. Other values will throw an "},{"kind":"link","target":{"id":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"},"code":true,"children":[{"kind":"text","text":"IllegalStateException"}]},{"kind":"text","text":" for any operation if their originating "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"context"}]},{"kind":"text","text":" was closed."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If a "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"Map"}]},{"kind":"text","text":" element is modified, a "},{"kind":"link","target":{"id":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},"code":true,"children":[{"kind":"text","text":"List"}]},{"kind":"text","text":" element is modified or a "},{"kind":"link","target":{"id":"java.util.function.Function","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Function.html"},"code":true,"children":[{"kind":"text","text":"Function"}]},{"kind":"text","text":" argument is provided then these values are interpreted according to the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"host to polyglot value mapping rules"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"JavaScript Usage Examples:"}]}]},{"kind":"code","text":"Context context = Context.create();\nassert context.eval(\"js\", \"undefined\").as(Object.class) == null;\nassert context.eval(\"js\", \"'foobar'\").as(Object.class) instanceof String;\nassert context.eval(\"js\", \"42\").as(Object.class) instanceof Number;\nassert context.eval(\"js\", \"[]\").as(Object.class) instanceof Map;\nassert context.eval(\"js\", \"{}\").as(Object.class) instanceof Map;\nassert ((Map<Object, Object>) context.eval(\"js\", \"[{}]\").as(Object.class)).get(0) instanceof Map;\nassert context.eval(\"js\", \"(function(){})\").as(Object.class) instanceof Function;"},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Object Identity"}]},{"kind":"paragraph","children":[{"kind":"text","text":"If polyglot values are mapped as Java primitives such as "},{"kind":"link","target":{"id":"java.lang.Boolean","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Boolean.html"},"code":true,"children":[{"kind":"text","text":"Boolean"}]},{"kind":"text","text":", "},{"kind":"code","text":"null"},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"java.lang.Character","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Character.html"},"code":true,"children":[{"kind":"text","text":"Character"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"java.lang.Number","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Number.html"},"code":true,"children":[{"kind":"text","text":"Number"}]},{"kind":"text","text":", then the identity of the polyglot value is not preserved. All other results can be converted back to a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"polyglot value"}]},{"kind":"text","text":" using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]},{"kind":"text","text":". "},{"kind":"strong","children":[{"kind":"text","text":"Mapping Example using JavaScript:"}]},{"kind":"text","text":" This example first creates a new JavaScript object and maps it to a "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"Map"}]},{"kind":"text","text":". Using the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]},{"kind":"text","text":" it is possible to recreate the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"polyglot value"}]},{"kind":"text","text":" from the Java map. The JavaScript object identity is preserved in the process."}]},{"kind":"code","text":"Context context = Context.create();\nMap<Object, Object> javaMap = context.eval(\"js\", \"{}\").as(Map.class);\nValue polyglotValue = context.asValue(javaMap);"}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(org.graalvm.polyglot.TypeLiteral)"},"code":true,"children":[{"kind":"text","text":"to map to generic type signatures."}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":1972}},{"id":"org.graalvm.polyglot.Value#as(org.graalvm.polyglot.TypeLiteral)","anchor":"as(org.graalvm.polyglot.TypeLiteral)","kind":"method","name":"as","modifiers":["public"],"typeParams":[{"name":"T"}],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" <"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"typeParam","text":"T"},{"kind":"punct","text":" "},{"kind":"name","text":"as"},{"kind":"punct","text":"("},{"kind":"type","text":"TypeLiteral","ref":"org.graalvm.polyglot.TypeLiteral"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":"> "},{"kind":"param","text":"targetType"},{"kind":"punct","text":")"}],"params":[{"name":"targetType","type":[{"kind":"type","text":"TypeLiteral","ref":"org.graalvm.polyglot.TypeLiteral"},{"kind":"punct","text":"<"},{"kind":"typeParam","text":"T"},{"kind":"punct","text":">"}]}],"returns":{"type":[{"kind":"typeParam","text":"T"}]},"throws":[{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the target type is null."}]}]}],"doc":{"summary":[{"kind":"text","text":"Maps a polyglot value to a given Java target type literal."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Maps a polyglot value to a given Java target type literal. For usage instructions see "},{"kind":"link","target":{"id":"org.graalvm.polyglot.TypeLiteral"},"code":true,"children":[{"kind":"text","text":"TypeLiteral"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Usage example:"}]},{"kind":"code","text":"static final TypeLiteral<List<String>> STRING_LIST = new TypeLiteral<List<String>>() {\n};\n\npublic static void main(String[] args) {\n    Context context = Context.create();\n    List<String> javaList = context.eval(\"js\", \"['foo', 'bar', 'bazz']\").as(STRING_LIST);\n    assert javaList.get(0).equals(\"foo\");\n}"}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"as(Class)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":2006}},{"id":"org.graalvm.polyglot.Value#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"org.graalvm.polyglot.AbstractValue#toString()"},"doc":{"summary":[{"kind":"text","text":"Converts this value to a human readable string."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Converts this value to a human readable string. Each language may have special formating conventions - even primitive values may not follow the traditional Java formating rules. The format of the returned string is intended to be interpreted by humans not machines and should therefore not be relied upon by machines. By default this value class name and its "},{"kind":"link","target":{"id":"java.lang.System#identityHashCode(java.lang.Object)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/System.html#identityHashCode(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"identity hash code"}]},{"kind":"text","text":" is used as string representation."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":2024}},{"id":"org.graalvm.polyglot.Value#getSourceLocation()","anchor":"getSourceLocation()","kind":"method","name":"getSourceLocation","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"SourceSection","ref":"org.graalvm.polyglot.SourceSection"},{"kind":"punct","text":" "},{"kind":"name","text":"getSourceLocation"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"SourceSection","ref":"org.graalvm.polyglot.SourceSection"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SourceSection"},"code":true,"children":[{"kind":"text","text":"SourceSection"}]},{"kind":"text","text":" or null if unknown"}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the declared source location of the value."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the declared source location of the value."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":2035}},{"id":"org.graalvm.polyglot.Value#isDate()","anchor":"isDate()","kind":"method","name":"isDate","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isDate"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if polyglot value could not be mapped to the target type."}]}]},{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the target type is null."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the conversion triggered a guest language error."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context is already closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this object represents a date, else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this object represents a date, else "},{"kind":"code","text":"false"},{"kind":"text","text":". If this value is also a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTimeZone()"},"code":true,"children":[{"kind":"text","text":"timezone"}]},{"kind":"text","text":" then the date is aware, otherwise it is naive."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asDate()"},"code":true,"children":[{"kind":"text","text":"asDate()"}]}]]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/Value.java","line":2054}},{"id":"org.graalvm.polyglot.Value#asDate()","anchor":"asDate()","kind":"method","name":"asDate","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"LocalDate","ref":"java.time.LocalDate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalDate.html"},{"kind":"punct","text":" "},{"kind":"name","text":"asDate"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"LocalDate","ref":"java.time.LocalDate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalDate.html"}]},"throws":[{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if polyglot value could not be mapped to the target type."}]}]},{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the target type is null."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the conversion triggered a guest language error."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context is already closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns this value as date if this object represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isDate()"},"code":true,"children":[{"kind":"text","text":"date"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns this value as date if this object represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isDate()"},"code":true,"children":[{"kind":"text","text":"date"}]},{"kind":"text","text":". The returned date is either aware if the value has a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTimeZone()"},"code":true,"children":[{"kind":"text","text":"timezone"}]},{"kind":"text","text":" otherwise it is naive."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isDate()"},"code":true,"children":[{"kind":"text","text":"isDate()"}]}]]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/Value.java","line":2073}},{"id":"org.graalvm.polyglot.Value#isTime()","anchor":"isTime()","kind":"method","name":"isTime","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isTime"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context is already closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this object represents a time, else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this object represents a time, else "},{"kind":"code","text":"false"},{"kind":"text","text":". If the value is also a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTimeZone()"},"code":true,"children":[{"kind":"text","text":"timezone"}]},{"kind":"text","text":" then the time is aware, otherwise it is naive."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asTime()"},"code":true,"children":[{"kind":"text","text":"asTime()"}]}]]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/Value.java","line":2089}},{"id":"org.graalvm.polyglot.Value#asTime()","anchor":"asTime()","kind":"method","name":"asTime","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"LocalTime","ref":"java.time.LocalTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalTime.html"},{"kind":"punct","text":" "},{"kind":"name","text":"asTime"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"LocalTime","ref":"java.time.LocalTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalTime.html"}]},"throws":[{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if polyglot value could not be mapped to the target type."}]}]},{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the target type is null."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the conversion triggered a guest language error."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context is already closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns this value as time if this object represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTime()"},"code":true,"children":[{"kind":"text","text":"time"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns this value as time if this object represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTime()"},"code":true,"children":[{"kind":"text","text":"time"}]},{"kind":"text","text":". The returned time is either aware if the value has a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTimeZone()"},"code":true,"children":[{"kind":"text","text":"timezone"}]},{"kind":"text","text":" otherwise it is naive."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTime()"},"code":true,"children":[{"kind":"text","text":"isTime()"}]}]]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/Value.java","line":2108}},{"id":"org.graalvm.polyglot.Value#isInstant()","anchor":"isInstant()","kind":"method","name":"isInstant","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isInstant"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context is already closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents an instant."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this value represents an instant. If a value is an instant then it is also a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isDate()"},"code":true,"children":[{"kind":"text","text":"date"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTime()"},"code":true,"children":[{"kind":"text","text":"time"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTimeZone()"},"code":true,"children":[{"kind":"text","text":"timezone"}]},{"kind":"text","text":". This method is short-hand for:"}]},{"kind":"code","text":"v.isDate() && v.isTime() && v.isTimeZone()"}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isDate()"},"code":true,"children":[{"kind":"text","text":"isDate()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTime()"},"code":true,"children":[{"kind":"text","text":"isTime()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isInstant()"},"code":true,"children":[{"kind":"text","text":"isInstant()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asInstant()"},"code":true,"children":[{"kind":"text","text":"asInstant()"}]}]]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/Value.java","line":2134}},{"id":"org.graalvm.polyglot.Value#asInstant()","anchor":"asInstant()","kind":"method","name":"asInstant","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Instant","ref":"java.time.Instant","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Instant.html"},{"kind":"punct","text":" "},{"kind":"name","text":"asInstant"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Instant","ref":"java.time.Instant","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Instant.html"}]},"throws":[{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if polyglot value could not be mapped to the target type."}]}]},{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the target type is null."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the conversion triggered a guest language error."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context is already closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns this value as instant if this object represents an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isInstant()"},"code":true,"children":[{"kind":"text","text":"instant"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns this value as instant if this object represents an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isInstant()"},"code":true,"children":[{"kind":"text","text":"instant"}]},{"kind":"text","text":". If a value is an instant then it is also a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isDate()"},"code":true,"children":[{"kind":"text","text":"date"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTime()"},"code":true,"children":[{"kind":"text","text":"time"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTimeZone()"},"code":true,"children":[{"kind":"text","text":"timezone"}]},{"kind":"text","text":". Using this method may be more efficient than reconstructing the timestamp from the date, time and timezone data."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The following assertion always holds if "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isInstant()"},"code":true,"children":[{"kind":"text","text":"isInstant()"}]},{"kind":"text","text":" returns "},{"kind":"code","text":"true"},{"kind":"text","text":":"}]},{"kind":"code","text":"ZoneId zone = getTimeZone(receiver);\nLocalDate date = getDate(receiver);\nLocalTime time = getTime(receiver);\nassert ZonedDateTime.of(date, time, zone).toInstant().equals(getInstant(receiver));"}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isDate()"},"code":true,"children":[{"kind":"text","text":"isDate()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTime()"},"code":true,"children":[{"kind":"text","text":"isTime()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTimeZone()"},"code":true,"children":[{"kind":"text","text":"isTimeZone()"}]}]]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/Value.java","line":2166}},{"id":"org.graalvm.polyglot.Value#isTimeZone()","anchor":"isTimeZone()","kind":"method","name":"isTimeZone","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isTimeZone"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context is already closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this object represents a timezone, else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this object represents a timezone, else "},{"kind":"code","text":"false"},{"kind":"text","text":". The interpretation of timezone objects may vary:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"text","text":"If "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isDate()"},"code":true,"children":[{"kind":"text","text":"isDate()"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTime()"},"code":true,"children":[{"kind":"text","text":"isTime()"}]},{"kind":"text","text":" return "},{"kind":"code","text":"true"},{"kind":"text","text":", then the returned date or time information is aware of this timezone."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isDate()"},"code":true,"children":[{"kind":"text","text":"isDate()"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTime()"},"code":true,"children":[{"kind":"text","text":"isTime()"}]},{"kind":"text","text":" returns "},{"kind":"code","text":"false"},{"kind":"text","text":", then it represents just timezone information."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"Objects with only date information must not have timezone information attached and objects with only time information must have either none, or "},{"kind":"link","target":{"id":"java.time.zone.ZoneRules#isFixedOffset()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/zone/ZoneRules.html#isFixedOffset()"},"code":true,"children":[{"kind":"text","text":"fixed zone"}]},{"kind":"text","text":" only. If this rule is violated then an "},{"kind":"link","target":{"id":"java.lang.AssertionError","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AssertionError.html"},"code":true,"children":[{"kind":"text","text":"AssertionError"}]},{"kind":"text","text":" is thrown if assertions are enabled."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If this method is implemented then also "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asTimeZone()"},"code":true,"children":[{"kind":"text","text":"asTimeZone()"}]},{"kind":"text","text":" must be implemented."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asTimeZone()"},"code":true,"children":[{"kind":"text","text":"asTimeZone()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asInstant()"},"code":true,"children":[{"kind":"text","text":"asInstant()"}]}]]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/Value.java","line":2195}},{"id":"org.graalvm.polyglot.Value#asTimeZone()","anchor":"asTimeZone()","kind":"method","name":"asTimeZone","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"ZoneId","ref":"java.time.ZoneId","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/ZoneId.html"},{"kind":"punct","text":" "},{"kind":"name","text":"asTimeZone"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"ZoneId","ref":"java.time.ZoneId","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/ZoneId.html"}]},"throws":[{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if polyglot value could not be mapped to the target type."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the conversion triggered a guest language error."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context is already closed."}]}]},{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the target type is null."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns this value as timestamp if this object represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTimeZone()"},"code":true,"children":[{"kind":"text","text":"timezone"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns this value as timestamp if this object represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTimeZone()"},"code":true,"children":[{"kind":"text","text":"timezone"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTimeZone()"},"code":true,"children":[{"kind":"text","text":"isTimeZone()"}]}]]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/Value.java","line":2213}},{"id":"org.graalvm.polyglot.Value#isDuration()","anchor":"isDuration()","kind":"method","name":"isDuration","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isDuration"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context is already closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this object represents a duration, else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this object represents a duration, else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"java.time.Duration","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Duration.html"},"code":true,"children":[{"kind":"text","text":"Duration"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asDuration()"},"code":true,"children":[{"kind":"text","text":"asDuration()"}]}]]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/Value.java","line":2229}},{"id":"org.graalvm.polyglot.Value#asDuration()","anchor":"asDuration()","kind":"method","name":"asDuration","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Duration","ref":"java.time.Duration","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Duration.html"},{"kind":"punct","text":" "},{"kind":"name","text":"asDuration"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Duration","ref":"java.time.Duration","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Duration.html"}]},"throws":[{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if polyglot value could not be mapped to the target type."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the conversion triggered a guest language error."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context is already closed."}]}]},{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the target type is null."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns this value as duration if this object represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isDuration()"},"code":true,"children":[{"kind":"text","text":"duration"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns this value as duration if this object represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isDuration()"},"code":true,"children":[{"kind":"text","text":"duration"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isDuration()"},"code":true,"children":[{"kind":"text","text":"isDuration()"}]}]]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/Value.java","line":2247}},{"id":"org.graalvm.polyglot.Value#isException()","anchor":"isException()","kind":"method","name":"isException","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isException"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context is already closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this object represents an exception, else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this object represents an exception, else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#throwException()"},"code":true,"children":[{"kind":"text","text":"throwException()"}]}]]},"since":"19.3","source":{"path":"org/graalvm/polyglot/Value.java","line":2262}},{"id":"org.graalvm.polyglot.Value#throwException()","anchor":"throwException()","kind":"method","name":"throwException","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"RuntimeException","ref":"java.lang.RuntimeException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/RuntimeException.html"},{"kind":"punct","text":" "},{"kind":"name","text":"throwException"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"RuntimeException","ref":"java.lang.RuntimeException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/RuntimeException.html"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value is not an exception."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the underlying context is already closed."}]}]}],"doc":{"summary":[{"kind":"text","text":"Throws this value if this object represents an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isException()"},"code":true,"children":[{"kind":"text","text":"exception"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Throws this value if this object represents an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isException()"},"code":true,"children":[{"kind":"text","text":"exception"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isException()"},"code":true,"children":[{"kind":"text","text":"isException()"}]}]]},"since":"19.3","source":{"path":"org/graalvm/polyglot/Value.java","line":2278}},{"id":"org.graalvm.polyglot.Value#getContext()","anchor":"getContext()","kind":"method","name":"getContext","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Context","ref":"org.graalvm.polyglot.Context"},{"kind":"punct","text":" "},{"kind":"name","text":"getContext"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Context","ref":"org.graalvm.polyglot.Context"}]},"doc":{"summary":[{"kind":"text","text":"Returns the context this value was created with."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the context this value was created with. The returned context may be "},{"kind":"code","text":"null"},{"kind":"text","text":" if the value was created using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Value.asValue(Object)"}]},{"kind":"text","text":" and no current context was "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#enter()"},"code":true,"children":[{"kind":"text","text":"entered"}]},{"kind":"text","text":" at the time."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The returned context can "},{"kind":"strong","children":[{"kind":"text","text":"not"}]},{"kind":"text","text":" be used to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#enter()"},"code":true,"children":[{"kind":"text","text":"enter"}]},{"kind":"text","text":" , "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#leave()"},"code":true,"children":[{"kind":"text","text":"leave"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"code":true,"children":[{"kind":"text","text":"close"}]},{"kind":"text","text":" the context or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#getEngine()"},"code":true,"children":[{"kind":"text","text":"engine"}]},{"kind":"text","text":". Invoking such methods will cause an "},{"kind":"link","target":{"id":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"},"code":true,"children":[{"kind":"text","text":"IllegalStateException"}]},{"kind":"text","text":" to be thrown. This ensures that only the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#create(java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"creator"}]},{"kind":"text","text":" of a context is allowed to enter, leave or close a context and that a context is not closed while it is still active."}]}]},"since":"19.3.0","source":{"path":"org/graalvm/polyglot/Value.java","line":2300}},{"id":"org.graalvm.polyglot.Value#equals(java.lang.Object)","anchor":"equals(java.lang.Object)","kind":"method","name":"equals","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"equals"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"obj"},{"kind":"punct","text":")"}],"params":[{"name":"obj","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"overrides":{"id":"org.graalvm.polyglot.AbstractValue#equals(java.lang.Object)"},"doc":{"summary":[{"kind":"text","text":"Compares the identity of the underlying polyglot objects."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Compares the identity of the underlying polyglot objects. This method does not do any structural comparisons."}]}]},"since":"20.1","source":{"path":"org/graalvm/polyglot/Value.java","line":2316}},{"id":"org.graalvm.polyglot.Value#hashCode()","anchor":"hashCode()","kind":"method","name":"hashCode","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"hashCode"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"overrides":{"id":"org.graalvm.polyglot.AbstractValue#hashCode()"},"doc":{"summary":[{"kind":"text","text":"Returns the identity hash code of the underlying object."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the identity hash code of the underlying object. This method does not compute the hash code depending on the contents of the value."}]}]},"since":"20.1","source":{"path":"org/graalvm/polyglot/Value.java","line":2329}},{"id":"org.graalvm.polyglot.Value#hasIterator()","anchor":"hasIterator()","kind":"method","name":"hasIterator","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasIterator"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this polyglot value provides an iterator."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this polyglot value provides an iterator. In this case the iterator can be obtained using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getIterator()"},"code":true,"children":[{"kind":"text","text":"getIterator()"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getIterator()"},"code":true,"children":[{"kind":"text","text":"getIterator()"}]}]]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":2344}},{"id":"org.graalvm.polyglot.Value#getIterator()","anchor":"getIterator()","kind":"method","name":"getIterator","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"getIterator"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not provide "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasIterator()"},"code":true,"children":[{"kind":"text","text":"iterator"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Creates a new iterator that allows read each element of a sequence."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new iterator that allows read each element of a sequence."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasIterator()"},"code":true,"children":[{"kind":"text","text":"hasIterator()"}]}]]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":2363}},{"id":"org.graalvm.polyglot.Value#isIterator()","anchor":"isIterator()","kind":"method","name":"isIterator","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isIterator"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the value represents an iterator object."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the value represents an iterator object. In this case the iterator elements can be accessed using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getIteratorNextElement()"},"code":true,"children":[{"kind":"text","text":"getIteratorNextElement()"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasIteratorNextElement()"},"code":true,"children":[{"kind":"text","text":"hasIteratorNextElement()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getIteratorNextElement()"},"code":true,"children":[{"kind":"text","text":"getIteratorNextElement()"}]}]]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":2382}},{"id":"org.graalvm.polyglot.Value#hasIteratorNextElement()","anchor":"hasIteratorNextElement()","kind":"method","name":"hasIteratorNextElement","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasIteratorNextElement"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value is not an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isIterator()"},"code":true,"children":[{"kind":"text","text":"iterator"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the value represents an iterator which has more elements, else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the value represents an iterator which has more elements, else "},{"kind":"code","text":"false"},{"kind":"text","text":". Multiple calls to the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasIteratorNextElement()"},"code":true,"children":[{"kind":"text","text":"hasIteratorNextElement()"}]},{"kind":"text","text":" might lead to different results if the underlying data structure is modified."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isIterator()"},"code":true,"children":[{"kind":"text","text":"isIterator()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getIteratorNextElement()"},"code":true,"children":[{"kind":"text","text":"getIteratorNextElement()"}]}]]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":2403}},{"id":"org.graalvm.polyglot.Value#getIteratorNextElement()","anchor":"getIteratorNextElement()","kind":"method","name":"getIteratorNextElement","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"getIteratorNextElement"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value is not an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isIterator()"},"code":true,"children":[{"kind":"text","text":"iterator"}]},{"kind":"text","text":" or when the underlying iterable element exists but is not readable."}]}]},{"type":[{"kind":"type","text":"NoSuchElementException","ref":"java.util.NoSuchElementException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/NoSuchElementException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the iteration has no more elements. Even if the "},{"kind":"link","target":{"id":"java.util.NoSuchElementException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/NoSuchElementException.html"},"code":true,"children":[{"kind":"text","text":"NoSuchElementException"}]},{"kind":"text","text":" was thrown it might not be thrown again by a next call of the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getIteratorNextElement()"},"code":true,"children":[{"kind":"text","text":"getIteratorNextElement()"}]},{"kind":"text","text":" due to a modification of an underlying iterable."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the next element in the iteration."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the next element in the iteration. When the underlying data structure is modified the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getIteratorNextElement()"},"code":true,"children":[{"kind":"text","text":"getIteratorNextElement()"}]},{"kind":"text","text":" may throw the "},{"kind":"link","target":{"id":"java.util.NoSuchElementException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/NoSuchElementException.html"},"code":true,"children":[{"kind":"text","text":"NoSuchElementException"}]},{"kind":"text","text":" despite the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasIteratorNextElement()"},"code":true,"children":[{"kind":"text","text":"hasIteratorNextElement()"}]},{"kind":"text","text":" returned "},{"kind":"code","text":"true"},{"kind":"text","text":", or it may throw a language error."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isIterator()"},"code":true,"children":[{"kind":"text","text":"isIterator()"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasIteratorNextElement()"},"code":true,"children":[{"kind":"text","text":"hasIteratorNextElement()"}]}]]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":2429}},{"id":"org.graalvm.polyglot.Value#hasHashEntries()","anchor":"hasHashEntries()","kind":"method","name":"hasHashEntries","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasHashEntries"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this polyglot value represents a map."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if this polyglot value represents a map. In this case map entries can be accessed using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getHashValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"getHashValue(Object)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getHashValueOrDefault(java.lang.Object,java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"getHashValueOrDefault(Object, Object)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#putHashEntry(java.lang.Object,java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"putHashEntry(Object, Object)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#removeHashEntry(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"removeHashEntry(Object)"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getHashEntriesIterator()"},"code":true,"children":[{"kind":"text","text":"getHashEntriesIterator()"}]},{"kind":"text","text":" and the map size can be queried using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getHashSize()"},"code":true,"children":[{"kind":"text","text":"getHashSize()"}]},{"kind":"text","text":"."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":2448}},{"id":"org.graalvm.polyglot.Value#getHashSize()","anchor":"getHashSize()","kind":"method","name":"getHashSize","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"name","text":"getHashSize"},{"kind":"punct","text":"() "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"returns":{"type":[{"kind":"keyword","text":"long"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have any "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasHashEntries()"},"code":true,"children":[{"kind":"text","text":"hasHashEntries()"}]},{"kind":"text","text":" hash entries}."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the number of map entries for values with hash entries."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the number of map entries for values with hash entries."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":2465}},{"id":"org.graalvm.polyglot.Value#hasHashEntry(java.lang.Object)","anchor":"hasHashEntry(java.lang.Object)","kind":"method","name":"hasHashEntry","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasHashEntry"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"key"},{"kind":"punct","text":")"}],"params":[{"name":"key","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"code":true,"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if mapping for the specified key exists."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if mapping for the specified key exists. If the value has no "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasHashEntries()"},"code":true,"children":[{"kind":"text","text":"hash entries"}]},{"kind":"text","text":" then "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasHashEntry(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"hasHashEntry(Object)"}]},{"kind":"text","text":" returns "},{"kind":"code","text":"false"},{"kind":"text","text":". The key is subject to polyglot value mapping rules as described in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]},{"kind":"text","text":"."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":2483}},{"id":"org.graalvm.polyglot.Value#getHashValue(java.lang.Object)","anchor":"getHashValue(java.lang.Object)","kind":"method","name":"getHashValue","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"getHashValue"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"key"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"params":[{"name":"key","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value has no "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasHashEntries()"},"code":true,"children":[{"kind":"text","text":"hash entries"}]},{"kind":"text","text":" or the mapping for given key exists but is not readable."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"code":true,"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the value for the specified key or "},{"kind":"code","text":"null"},{"kind":"text","text":" if the mapping for the specified key does not exist."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the value for the specified key or "},{"kind":"code","text":"null"},{"kind":"text","text":" if the mapping for the specified key does not exist. The key is subject to polyglot value mapping rules as described in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]},{"kind":"text","text":"."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":2502}},{"id":"org.graalvm.polyglot.Value#getHashValueOrDefault(java.lang.Object,java.lang.Object)","anchor":"getHashValueOrDefault(java.lang.Object,java.lang.Object)","kind":"method","name":"getHashValueOrDefault","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"getHashValueOrDefault"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"key"},{"kind":"punct","text":", "},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"defaultValue"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"params":[{"name":"key","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]},{"name":"defaultValue","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value has no "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasHashEntries()"},"code":true,"children":[{"kind":"text","text":"hash entries"}]},{"kind":"text","text":" at all."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"code":true,"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the value for the specified key or the default value if the mapping for the specified key does not exist or is not readable."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the value for the specified key or the default value if the mapping for the specified key does not exist or is not readable. The key and the default value are subject to polyglot value mapping rules as described in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]},{"kind":"text","text":"."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":2521}},{"id":"org.graalvm.polyglot.Value#putHashEntry(java.lang.Object,java.lang.Object)","anchor":"putHashEntry(java.lang.Object,java.lang.Object)","kind":"method","name":"putHashEntry","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"putHashEntry"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"key"},{"kind":"punct","text":", "},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},{"kind":"punct","text":", "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"params":[{"name":"key","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]},{"name":"value","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have any "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasHashEntries()"},"code":true,"children":[{"kind":"text","text":"hash entries"}]},{"kind":"text","text":", the mapping for specified key does not exist and new members cannot be added, or the existing mapping for specified key is not modifiable."}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the provided key type or value type is not allowed to be written."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"code":true,"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Associates the specified value with the specified key."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Associates the specified value with the specified key. Both key and value are subject to polyglot value mapping rules as described in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]},{"kind":"text","text":"."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":2542}},{"id":"org.graalvm.polyglot.Value#removeHashEntry(java.lang.Object)","anchor":"removeHashEntry(java.lang.Object)","kind":"method","name":"removeHashEntry","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"removeHashEntry"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"key"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"params":[{"name":"key","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have any "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasHashEntries()"},"code":true,"children":[{"kind":"text","text":"hash entries"}]},{"kind":"text","text":" or if mapping for specified key "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasHashEntry(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"exists"}]},{"kind":"text","text":" but cannot be removed."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#close()"},"code":true,"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Removes the mapping for a given key."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Removes the mapping for a given key. Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the mapping was successfully removed, "},{"kind":"code","text":"false"},{"kind":"text","text":" if mapping for a given key does not exist. The key is subject to polyglot value mapping rules as described in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]},{"kind":"text","text":"."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":2559}},{"id":"org.graalvm.polyglot.Value#getHashEntriesIterator()","anchor":"getHashEntriesIterator()","kind":"method","name":"getHashEntriesIterator","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"getHashEntriesIterator"},{"kind":"punct","text":"() "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have any "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasHashEntries()"},"code":true,"children":[{"kind":"text","text":"hash entries"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Creates a new hash entries iterator that allows read each map entry."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new hash entries iterator that allows read each map entry. The return value is always an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isIterator()"},"code":true,"children":[{"kind":"text","text":"iterator"}]},{"kind":"text","text":" of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasArrayElements()"},"code":true,"children":[{"kind":"text","text":"array elements"}]},{"kind":"text","text":". The first array element is a key, the second array element is an associated value. Even if the value array element is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#setArrayElement(long,java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"modifiable"}]},{"kind":"text","text":" writing to array may not update the mapping, always use "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#putHashEntry(java.lang.Object,java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"putHashEntry(Object, Object)"}]},{"kind":"text","text":" to update the mapping."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":2582}},{"id":"org.graalvm.polyglot.Value#getHashKeysIterator()","anchor":"getHashKeysIterator()","kind":"method","name":"getHashKeysIterator","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"getHashKeysIterator"},{"kind":"punct","text":"() "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have any "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasHashEntries()"},"code":true,"children":[{"kind":"text","text":"hash entries"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Creates a new hash keys iterator that allows read each map key."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new hash keys iterator that allows read each map key. The return value is always an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isIterator()"},"code":true,"children":[{"kind":"text","text":"iterator"}]},{"kind":"text","text":"."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":2601}},{"id":"org.graalvm.polyglot.Value#getHashValuesIterator()","anchor":"getHashValuesIterator()","kind":"method","name":"getHashValuesIterator","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"getHashValuesIterator"},{"kind":"punct","text":"() "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the value does not have any "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasHashEntries()"},"code":true,"children":[{"kind":"text","text":"hash entries"}]},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the context is already closed."}]}]},{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a guest language error occurred during execution."}]}]}],"doc":{"summary":[{"kind":"text","text":"Creates a new hash values iterator that allows read each map value."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new hash values iterator that allows read each map value. The return value is always an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isIterator()"},"code":true,"children":[{"kind":"text","text":"iterator"}]},{"kind":"text","text":"."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/Value.java","line":2620}},{"id":"org.graalvm.polyglot.Value#asValue(java.lang.Object)","anchor":"asValue(java.lang.Object)","kind":"method","name":"asValue","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"asValue"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"o"},{"kind":"punct","text":")"}],"params":[{"name":"o","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the object to convert"}]}]}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if no context is currently entered."}]}]}],"doc":{"summary":[{"kind":"text","text":"Converts a Java host value to a polyglot value."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Converts a Java host value to a polyglot value. Returns a value for any host or guest value. If there is a context available use "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]},{"kind":"text","text":" for efficiency instead. The value is bound the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#getCurrent()"},"code":true,"children":[{"kind":"text","text":"current"}]},{"kind":"text","text":" context when created. If there is no context available when the value was constructed then Values constructed with this method may return "},{"kind":"code","text":"null"},{"kind":"text","text":" for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getContext()"},"code":true,"children":[{"kind":"text","text":"getContext()"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Conversion rules."}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":2640}},{"id":"org.graalvm.polyglot.Value#pin()","anchor":"pin()","kind":"method","name":"pin","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"pin"},{"kind":"punct","text":"()"}],"throws":[{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the method scope of the value was finished"}]}]}],"doc":{"summary":[{"kind":"text","text":"Pins a scoped value such that it can be used beyond the scope of a scoped host method call."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Pins a scoped value such that it can be used beyond the scope of a scoped host method call. Pinning is an idempotent operation, i.e. pinning an already pinned value just results in a pinned value again. Trying to pin a value that is not scoped will not cause an effect. Trying to pin a scoped value that has already been released will raise a "},{"kind":"link","target":{"id":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"},"code":true,"children":[{"kind":"text","text":"IllegalStateException"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess#SCOPED"},"code":true,"children":[{"kind":"text","text":"HostAccess.SCOPED"}]}]]},"since":"21.3","source":{"path":"org/graalvm/polyglot/Value.java","line":2659}},{"id":"org.graalvm.polyglot.Value#fromByteBasedString(byte[],org.graalvm.polyglot.Value.StringEncoding)","anchor":"fromByteBasedString(byte[],org.graalvm.polyglot.Value.StringEncoding)","kind":"method","name":"fromByteBasedString","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"fromByteBasedString"},{"kind":"punct","text":"("},{"kind":"keyword","text":"byte"},{"kind":"punct","text":"[] "},{"kind":"param","text":"bytes"},{"kind":"punct","text":", "},{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"},{"kind":"punct","text":" "},{"kind":"param","text":"encoding"},{"kind":"punct","text":")"}],"params":[{"name":"bytes","type":[{"kind":"keyword","text":"byte"},{"kind":"punct","text":"[]"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the byte array representing the string"}]}]},{"name":"encoding","type":[{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the encoding of the byte array"}]}]}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a polyglot string "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"Value"}]}]}]},"throws":[{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if either "},{"kind":"code","text":"bytes"},{"kind":"text","text":" or "},{"kind":"code","text":"encoding"},{"kind":"text","text":" is null"}]}]}],"doc":{"summary":[{"kind":"text","text":"Creates a byte-based string value that can be passed to polyglot languages."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a byte-based string value that can be passed to polyglot languages."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The returned value is guaranteed to return "},{"kind":"code","text":"true"},{"kind":"text","text":" for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isString()"},"code":true,"children":[{"kind":"text","text":"Value.isString()"}]},{"kind":"text","text":". The string can later be retrieved as a byte array using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asStringBytes(org.graalvm.polyglot.Value.StringEncoding)"},"code":true,"children":[{"kind":"text","text":"Value.asStringBytes(StringEncoding)"}]},{"kind":"text","text":". This method ensures immutability by conservatively copying the byte array before passing it to the underlying implementation."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Performance Note:"}]},{"kind":"text","text":" Copying the byte array can have a performance impact. Use this method when immutability is required, or use the more flexible overloaded method "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#fromByteBasedString(byte[],int,int,org.graalvm.polyglot.Value.StringEncoding,boolean)"},"code":true,"children":[{"kind":"text","text":"fromByteBasedString(byte[], int, int, StringEncoding, boolean)"}]},{"kind":"text","text":" to control copying behavior."}]}]},"since":"24.2","source":{"path":"org/graalvm/polyglot/Value.java","line":2684}},{"id":"org.graalvm.polyglot.Value#fromByteBasedString(byte[],int,int,org.graalvm.polyglot.Value.StringEncoding,boolean)","anchor":"fromByteBasedString(byte[],int,int,org.graalvm.polyglot.Value.StringEncoding,boolean)","kind":"method","name":"fromByteBasedString","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"fromByteBasedString"},{"kind":"punct","text":"("},{"kind":"keyword","text":"byte"},{"kind":"punct","text":"[] "},{"kind":"param","text":"bytes"},{"kind":"punct","text":", "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"param","text":"offset"},{"kind":"punct","text":", "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"param","text":"length"},{"kind":"punct","text":", "},{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"},{"kind":"punct","text":" "},{"kind":"param","text":"encoding"},{"kind":"punct","text":", "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"copy"},{"kind":"punct","text":")"}],"params":[{"name":"bytes","type":[{"kind":"keyword","text":"byte"},{"kind":"punct","text":"[]"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the byte array representing the string"}]}]},{"name":"offset","type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the starting offset in the byte array"}]}]},{"name":"length","type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the number of bytes to include starting from "},{"kind":"code","text":"offset"}]}]},{"name":"encoding","type":[{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the encoding of the byte array"}]}]},{"name":"copy","type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"whether to copy the byte array to ensure immutability"}]}]}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a polyglot string "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"Value"}]}]}]},"doc":{"summary":[{"kind":"text","text":"Creates a byte-based string value with more granular control over the byte array's usage."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a byte-based string value with more granular control over the byte array's usage."}]},{"kind":"paragraph","children":[{"kind":"text","text":"This method provides additional flexibility by allowing a subset of the byte array to be passed and controlling whether the byte array should be copied to ensure immutability."}]}]},"since":"24.2","source":{"path":"org/graalvm/polyglot/Value.java","line":2704}},{"id":"org.graalvm.polyglot.Value#fromNativeString(long,int,int,org.graalvm.polyglot.Value.StringEncoding,boolean)","anchor":"fromNativeString(long,int,int,org.graalvm.polyglot.Value.StringEncoding,boolean)","kind":"method","name":"fromNativeString","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"fromNativeString"},{"kind":"punct","text":"("},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"basePointer"},{"kind":"punct","text":", "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"param","text":"byteOffset"},{"kind":"punct","text":", "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"param","text":"byteLength"},{"kind":"punct","text":", "},{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"},{"kind":"punct","text":" "},{"kind":"param","text":"encoding"},{"kind":"punct","text":", "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"copy"},{"kind":"punct","text":")"}],"params":[{"name":"basePointer","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the raw base pointer to the native string in memory"}]}]},{"name":"byteOffset","type":[{"kind":"keyword","text":"int"}]},{"name":"byteLength","type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the length of the string in bytes"}]}]},{"name":"encoding","type":[{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the encoding of the native string"}]}]},{"name":"copy","type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"whether to copy the native string bytes for additional safety"}]}]}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a polyglot string "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"Value"}]}]}]},"doc":{"summary":[{"kind":"text","text":"Creates a native string object that can be passed to polyglot languages."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a native string object that can be passed to polyglot languages."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Native strings avoid copying, offering better performance for certain use cases. However, clients must guarantee the lifetime of the native string as long as the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"Value"}]},{"kind":"text","text":" is alive. The returned value is guaranteed to return "},{"kind":"code","text":"true"},{"kind":"text","text":" for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isString()"},"code":true,"children":[{"kind":"text","text":"Value.isString()"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Usage Warning:"}]},{"kind":"text","text":" The polyglot context or engine does not manage the lifetime of the native pointer. Clients must ensure that the pointer remains valid and that the memory is not deallocated while the string is in use. Passing a deallocated or invalid pointer can result in crashes or undefined behavior."}]},{"kind":"paragraph","children":[{"kind":"strong","children":[{"kind":"text","text":"Note:"}]},{"kind":"text","text":" Whenever possible, use "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#fromByteBasedString(byte[],org.graalvm.polyglot.Value.StringEncoding)"},"code":true,"children":[{"kind":"text","text":"fromByteBasedString(byte[], StringEncoding)"}]},{"kind":"text","text":" to avoid the risks associated with native memory management."}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"text","text":"The native string's memory must remain valid for the lifetime of the context it is passed to."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The native bytes must not be mutated after being passed to this method."}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"The bytes must already be encoded with the specified encoding."}]}]]}]},"since":"24.2","source":{"path":"org/graalvm/polyglot/Value.java","line":2749}},{"id":"org.graalvm.polyglot.Value#fromNativeString(long,int,org.graalvm.polyglot.Value.StringEncoding)","anchor":"fromNativeString(long,int,org.graalvm.polyglot.Value.StringEncoding)","kind":"method","name":"fromNativeString","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"fromNativeString"},{"kind":"punct","text":"("},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"basePointer"},{"kind":"punct","text":", "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"param","text":"byteLength"},{"kind":"punct","text":", "},{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"},{"kind":"punct","text":" "},{"kind":"param","text":"encoding"},{"kind":"punct","text":")"}],"params":[{"name":"basePointer","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the raw base pointer to the native string in memory"}]}]},{"name":"byteLength","type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the length of the string in bytes"}]}]},{"name":"encoding","type":[{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the encoding of the native string"}]}]}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a polyglot string "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"Value"}]}]}]},"doc":{"summary":[{"kind":"text","text":"Creates a native string object with default safety settings."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a native string object with default safety settings."}]},{"kind":"paragraph","children":[{"kind":"text","text":"This method is equivalent to calling "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#fromNativeString(long,int,int,org.graalvm.polyglot.Value.StringEncoding,boolean)"},"code":true,"children":[{"kind":"text","text":"fromNativeString(long, int, int, StringEncoding, boolean)"}]},{"kind":"text","text":" with "},{"kind":"code","text":"copy"},{"kind":"text","text":" set to "},{"kind":"code","text":"true"},{"kind":"text","text":"."}]}]},"since":"24.2","source":{"path":"org/graalvm/polyglot/Value.java","line":2777}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Represents a polyglot value that can be accessed using a set of language agnostic operations."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Represents a polyglot value that can be accessed using a set of language agnostic operations. Polyglot values represent values from "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isHostObject()"},"code":true,"children":[{"kind":"text","text":"host"}]},{"kind":"text","text":" or guest language. Polyglot values are bound to a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"context"}]},{"kind":"text","text":". If the context is closed then all value operations throw an "},{"kind":"link","target":{"id":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"},"code":true,"children":[{"kind":"text","text":"IllegalStateException"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Polyglot values have one of the following type combinations:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNull()"},"code":true,"children":[{"kind":"text","text":"Null"}]},{"kind":"text","text":": This value represents a "},{"kind":"code","text":"null"},{"kind":"text","text":" like value. Certain languages might use a different name or use multiple values to represent "},{"kind":"code","text":"null"},{"kind":"text","text":" like values."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNumber()"},"code":true,"children":[{"kind":"text","text":"Number"}]},{"kind":"text","text":": This value represents a floating or fixed point number. The number value may be accessed as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asByte()"},"code":true,"children":[{"kind":"text","text":"byte"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asShort()"},"code":true,"children":[{"kind":"text","text":"short"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asInt()"},"code":true,"children":[{"kind":"text","text":"int"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asLong()"},"code":true,"children":[{"kind":"text","text":"long"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asBigInteger()"},"code":true,"children":[{"kind":"text","text":"asBigInteger()"}]},{"kind":"text","text":" BigInteger}, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asFloat()"},"code":true,"children":[{"kind":"text","text":"float"}]},{"kind":"text","text":", or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asDouble()"},"code":true,"children":[{"kind":"text","text":"double"}]},{"kind":"text","text":" value."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isBoolean()"},"code":true,"children":[{"kind":"text","text":"Boolean"}]},{"kind":"text","text":". This value represents a boolean value. The boolean value can be accessed using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asBoolean()"},"code":true,"children":[{"kind":"text","text":"asBoolean()"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isString()"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":": This value represents a string value. The string value can be accessed using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asString()"},"code":true,"children":[{"kind":"text","text":"asString()"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isDate()"},"code":true,"children":[{"kind":"text","text":"Date"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTime()"},"code":true,"children":[{"kind":"text","text":"Time"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTimeZone()"},"code":true,"children":[{"kind":"text","text":"Timezone"}]},{"kind":"text","text":": This value represents a date, time or timezone. Multiple types may return "},{"kind":"code","text":"true"},{"kind":"text","text":" at the same time."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isDuration()"},"code":true,"children":[{"kind":"text","text":"Duration"}]},{"kind":"text","text":": This value represents a duration value. The duration value can be accessed using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asDuration()"},"code":true,"children":[{"kind":"text","text":"asDuration()"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isHostObject()"},"code":true,"children":[{"kind":"text","text":"Host Object"}]},{"kind":"text","text":": This value represents a value of the host language (Java). The original Java value can be accessed using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asHostObject()"},"code":true,"children":[{"kind":"text","text":"asHostObject()"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isProxyObject()"},"code":true,"children":[{"kind":"text","text":"Proxy Object"}]},{"kind":"text","text":": This value represents a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"proxy"}]},{"kind":"text","text":" value."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isNativePointer()"},"code":true,"children":[{"kind":"text","text":"Native Pointer"}]},{"kind":"text","text":": This value represents a native pointer. The native pointer value can be accessed using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asNativePointer()"},"code":true,"children":[{"kind":"text","text":"asNativePointer()"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isException()"},"code":true,"children":[{"kind":"text","text":"Exception"}]},{"kind":"text","text":": This value represents an exception object. The exception can be thrown using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#throwException()"},"code":true,"children":[{"kind":"text","text":"throwException()"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isMetaObject()"},"code":true,"children":[{"kind":"text","text":"Meta-Object"}]},{"kind":"text","text":": This value represents a metaobject. Access metaobject operations using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMetaSimpleName()"},"code":true,"children":[{"kind":"text","text":"getMetaSimpleName()"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMetaQualifiedName()"},"code":true,"children":[{"kind":"text","text":"getMetaQualifiedName()"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isMetaInstance(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"isMetaInstance(Object)"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isIterator()"},"code":true,"children":[{"kind":"text","text":"Iterator"}]},{"kind":"text","text":": This value represents an iterator. The iterator can be iterated using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasIteratorNextElement()"},"code":true,"children":[{"kind":"text","text":"hasIteratorNextElement()"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getIteratorNextElement()"},"code":true,"children":[{"kind":"text","text":"getIteratorNextElement()"}]},{"kind":"text","text":"."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"In addition any value may have one or more of the following traits:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasArrayElements()"},"code":true,"children":[{"kind":"text","text":"Array Elements"}]},{"kind":"text","text":": This value may contain array elements. The array indices always start with "},{"kind":"code","text":"0"},{"kind":"text","text":", also if the language uses a different style."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMembers()"},"code":true,"children":[{"kind":"text","text":"Members"}]},{"kind":"text","text":": This value may contain members. Members are structural elements of an object. For example, the members of a Java object are all public methods and fields. Members are accessible using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"getMember(String)"}]},{"kind":"text","text":"."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canExecute()"},"code":true,"children":[{"kind":"text","text":"Executable"}]},{"kind":"text","text":": This value can be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#execute(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"executed"}]},{"kind":"text","text":". This indicates that the value represents an element that can be executed. Guest language examples for executable elements are functions, methods, closures or promises."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#canInstantiate()"},"code":true,"children":[{"kind":"text","text":"Instantiable"}]},{"kind":"text","text":": This value can be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#newInstance(java.lang.Object...)"},"code":true,"children":[{"kind":"text","text":"instantiated"}]},{"kind":"text","text":". For example, Java classes are instantiable."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasBufferElements()"},"code":true,"children":[{"kind":"text","text":"Buffer Elements"}]},{"kind":"text","text":": This value may contain buffer elements. The buffer indices always start with "},{"kind":"code","text":"0"},{"kind":"text","text":", also if the language uses a different style."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasIterator()"},"code":true,"children":[{"kind":"text","text":"Iterable"}]},{"kind":"text","text":": This value "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getIterator()"},"code":true,"children":[{"kind":"text","text":"provides"}]},{"kind":"text","text":" an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isIterator()"},"code":true,"children":[{"kind":"text","text":"iterator"}]},{"kind":"text","text":" which can be used to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getIteratorNextElement()"},"code":true,"children":[{"kind":"text","text":"iterate"}]},{"kind":"text","text":" value elements. For example, Guest language arrays are iterable."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasHashEntries()"},"code":true,"children":[{"kind":"text","text":"hasHashEntries()"}]},{"kind":"text","text":" Hash Entries}: This value represents a map."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#hasMetaParents()"},"code":true,"children":[{"kind":"text","text":"hasMetaParents()"}]},{"kind":"text","text":" Meta Parents}: This value represents Array Elements of Meta Objects."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"In addition to the language agnostic types, the language specific type can be accessed using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getMetaObject()"},"code":true,"children":[{"kind":"text","text":"getMetaObject()"}]},{"kind":"text","text":". The identity of value objects is unspecified and should not be relied upon. For example, multiple calls to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#getArrayElement(long)"},"code":true,"children":[{"kind":"text","text":"getArrayElement(long)"}]},{"kind":"text","text":" with the same index might return the same or different instances of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"Value"}]},{"kind":"text","text":". The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#equals(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"equality"}]},{"kind":"text","text":" of values is based on the identity of the value instance. All values return a human-readable "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#toString()"},"code":true,"children":[{"kind":"text","text":"string"}]},{"kind":"text","text":" for debugging, formatted by the original language."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Polyglot values may be converted to host objects using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"as(Class)"}]},{"kind":"text","text":". In addition values may be created from Java values using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]},{"kind":"text","text":"."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Naive and aware dates and times"}]},{"kind":"paragraph","children":[{"kind":"text","text":"If a date or time value has a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isTimeZone()"},"code":true,"children":[{"kind":"text","text":"timezone"}]},{"kind":"text","text":" then it is called "},{"kind":"emphasis","children":[{"kind":"text","text":"aware"}]},{"kind":"text","text":", otherwise "},{"kind":"emphasis","children":[{"kind":"text","text":"naive"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"An aware time and date has sufficient knowledge of applicable algorithmic and political time adjustments, such as time zone and daylight saving time information, to locate itself relative to other aware objects. An aware object is used to represent a specific moment in time that is not open to interpretation."}]},{"kind":"paragraph","children":[{"kind":"text","text":"A naive time and date does not contain enough information to unambiguously locate itself relative to other date/time objects. Whether a naive object represents Coordinated Universal Time (UTC), local time, or time in some other timezone is purely up to the program, just like it is up to the program whether a particular number represents metres, miles, or mass. Naive objects are easy to understand and to work with, at the cost of ignoring some aspects of reality."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Scoped Values"}]},{"kind":"paragraph","children":[{"kind":"text","text":"In the case of a guest-to-host callback, a value may be passed as a parameter. These values may represent objects that are only valid during the invocation of the callback function, i.e. they are scoped, with the scope being the callback function. If enabled via the corresponding settings in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"HostAccess"}]},{"kind":"text","text":", such values are released when the function returns, with all future invocations of value operations throwing an exception. If an embedder wishes to extend the scope of the value beyond the callback's return, the value can be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#pin()"},"children":[{"kind":"text","text":"pinned"}]},{"kind":"text","text":", such that it is not released automatically."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine"},"code":true,"children":[{"kind":"text","text":"Engine"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/Value.java","line":172}},{"id":"org.graalvm.polyglot.Value$StringEncoding","name":"Value.StringEncoding","kind":"class","language":"java","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"Value.StringEncoding"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"enclosing":"org.graalvm.polyglot.Value","members":[{"id":"org.graalvm.polyglot.Value$StringEncoding#UTF_8","anchor":"UTF_8","kind":"field","name":"UTF_8","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"},{"kind":"punct","text":" "},{"kind":"name","text":"UTF_8"}],"type":[{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"}],"since":"24.2","source":{"path":"org/graalvm/polyglot/Value.java","line":2793}},{"id":"org.graalvm.polyglot.Value$StringEncoding#UTF_16_LITTLE_ENDIAN","anchor":"UTF_16_LITTLE_ENDIAN","kind":"field","name":"UTF_16_LITTLE_ENDIAN","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"},{"kind":"punct","text":" "},{"kind":"name","text":"UTF_16_LITTLE_ENDIAN"}],"type":[{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"}],"since":"24.2","source":{"path":"org/graalvm/polyglot/Value.java","line":2798}},{"id":"org.graalvm.polyglot.Value$StringEncoding#UTF_16_BIG_ENDIAN","anchor":"UTF_16_BIG_ENDIAN","kind":"field","name":"UTF_16_BIG_ENDIAN","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"},{"kind":"punct","text":" "},{"kind":"name","text":"UTF_16_BIG_ENDIAN"}],"type":[{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"}],"since":"24.2","source":{"path":"org/graalvm/polyglot/Value.java","line":2802}},{"id":"org.graalvm.polyglot.Value$StringEncoding#UTF_32_LITTLE_ENDIAN","anchor":"UTF_32_LITTLE_ENDIAN","kind":"field","name":"UTF_32_LITTLE_ENDIAN","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"},{"kind":"punct","text":" "},{"kind":"name","text":"UTF_32_LITTLE_ENDIAN"}],"type":[{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"}],"since":"24.2","source":{"path":"org/graalvm/polyglot/Value.java","line":2806}},{"id":"org.graalvm.polyglot.Value$StringEncoding#UTF_32_BIG_ENDIAN","anchor":"UTF_32_BIG_ENDIAN","kind":"field","name":"UTF_32_BIG_ENDIAN","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"},{"kind":"punct","text":" "},{"kind":"name","text":"UTF_32_BIG_ENDIAN"}],"type":[{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"}],"since":"24.2","source":{"path":"org/graalvm/polyglot/Value.java","line":2810}},{"id":"org.graalvm.polyglot.Value$StringEncoding#UTF_16","anchor":"UTF_16","kind":"field","name":"UTF_16","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"},{"kind":"punct","text":" "},{"kind":"name","text":"UTF_16"}],"type":[{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"}],"doc":{"summary":[{"kind":"text","text":"The native UTF 16 encoding for the current platform."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"The native UTF 16 encoding for the current platform."}]}],"see":[[{"kind":"link","target":{"id":"java.nio.ByteOrder#nativeOrder()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html#nativeOrder()"},"code":true,"children":[{"kind":"text","text":"ByteOrder.nativeOrder()"}]}]]},"since":"24.2","source":{"path":"org/graalvm/polyglot/Value.java","line":2818}},{"id":"org.graalvm.polyglot.Value$StringEncoding#UTF_32","anchor":"UTF_32","kind":"field","name":"UTF_32","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"},{"kind":"punct","text":" "},{"kind":"name","text":"UTF_32"}],"type":[{"kind":"type","text":"Value.StringEncoding","ref":"org.graalvm.polyglot.Value$StringEncoding"}],"doc":{"summary":[{"kind":"text","text":"The native UTF 32 encoding for the current platform."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"The native UTF 32 encoding for the current platform."}]}],"see":[[{"kind":"link","target":{"id":"java.nio.ByteOrder#nativeOrder()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteOrder.html#nativeOrder()"},"code":true,"children":[{"kind":"text","text":"ByteOrder.nativeOrder()"}]}]]},"since":"24.2","source":{"path":"org/graalvm/polyglot/Value.java","line":2826}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#toString()","text":"toString","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Enum like class representing the supported string encodings."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Enum like class representing the supported string encodings. The encodings determine how byte arrays or native strings are interpreted when creating or retrieving string values. This class is not directly a enum to support compatible evolution."}]}]},"since":"24.2","source":{"path":"org/graalvm/polyglot/Value.java","line":2788}}]},{"id":"org.graalvm.polyglot.io","name":"org.graalvm.polyglot.io","doc":{"summary":[{"kind":"text","text":"Input/Output support for the GraalVM SDK polyglot API."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Input/Output support for the GraalVM SDK polyglot API."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"org.graalvm.polyglot.io.FileSystem"}]},{"kind":"text","text":" allows an embedder to virtualize Input/Output operations done by the "},{"kind":"code","text":"TruffleLanguage"},{"kind":"text","text":"s. A custom filesystem is registered using an IOAccess configuration "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess$Builder#fileSystem(org.graalvm.polyglot.io.FileSystem)"},"code":true,"children":[{"kind":"text","text":"builder"}]},{"kind":"text","text":"."}]}]},"since":"19.0","types":[{"id":"org.graalvm.polyglot.io.ByteSequence","name":"ByteSequence","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"ByteSequence"}],"members":[{"id":"org.graalvm.polyglot.io.ByteSequence#length()","anchor":"length()","kind":"method","name":"length","signature":[{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"length"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the number of "},{"kind":"code","text":"byte"},{"kind":"text","text":"s in this sequence"}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the length of this byte sequence."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the length of this byte sequence."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/ByteSequence.java","line":74}},{"id":"org.graalvm.polyglot.io.ByteSequence#byteAt(int)","anchor":"byteAt(int)","kind":"method","name":"byteAt","signature":[{"kind":"keyword","text":"byte"},{"kind":"punct","text":" "},{"kind":"name","text":"byteAt"},{"kind":"punct","text":"("},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"param","text":"index"},{"kind":"punct","text":")"}],"params":[{"name":"index","type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the index of the "},{"kind":"code","text":"byte"},{"kind":"text","text":" value to be returned"}]}]}],"returns":{"type":[{"kind":"keyword","text":"byte"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the specified "},{"kind":"code","text":"byte"},{"kind":"text","text":" value"}]}]},"throws":[{"type":[{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the "},{"kind":"code","text":"index"},{"kind":"text","text":" argument is negative or not less than "},{"kind":"code","text":"length()"}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the "},{"kind":"code","text":"byte"},{"kind":"text","text":" value at the specified index."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the "},{"kind":"code","text":"byte"},{"kind":"text","text":" value at the specified index. An index ranges from zero to "},{"kind":"code","text":"length() - 1"},{"kind":"text","text":". The first "},{"kind":"code","text":"char"},{"kind":"text","text":" value of the sequence is at index zero, the next at index one, and so on, as for array indexing."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/ByteSequence.java","line":87}},{"id":"org.graalvm.polyglot.io.ByteSequence#subSequence(int,int)","anchor":"subSequence(int,int)","kind":"method","name":"subSequence","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"type","text":"ByteSequence","ref":"org.graalvm.polyglot.io.ByteSequence"},{"kind":"punct","text":" "},{"kind":"name","text":"subSequence"},{"kind":"punct","text":"("},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"param","text":"startIndex"},{"kind":"punct","text":", "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"param","text":"endIndex"},{"kind":"punct","text":")"}],"params":[{"name":"startIndex","type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the start index, inclusive"}]}]},{"name":"endIndex","type":[{"kind":"keyword","text":"int"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the end index, exclusive"}]}]}],"returns":{"type":[{"kind":"type","text":"ByteSequence","ref":"org.graalvm.polyglot.io.ByteSequence"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the specified subsequence"}]}]},"throws":[{"type":[{"kind":"type","text":"IndexOutOfBoundsException","ref":"java.lang.IndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"start"},{"kind":"text","text":" or "},{"kind":"code","text":"end"},{"kind":"text","text":" are negative, if "},{"kind":"code","text":"end"},{"kind":"text","text":" is greater than "},{"kind":"code","text":"length()"},{"kind":"text","text":", or if "},{"kind":"code","text":"start"},{"kind":"text","text":" is greater than "},{"kind":"code","text":"end"}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns a "},{"kind":"code","text":"ByteSequence"},{"kind":"text","text":" that is a subsequence of this sequence."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns a "},{"kind":"code","text":"ByteSequence"},{"kind":"text","text":" that is a subsequence of this sequence. The subsequence starts with the "},{"kind":"code","text":"byte"},{"kind":"text","text":" value at the specified index and ends with the "},{"kind":"code","text":"byte"},{"kind":"text","text":" value at index "},{"kind":"code","text":"end - 1"},{"kind":"text","text":". The length (in "},{"kind":"code","text":"byte"},{"kind":"text","text":"s) of the returned sequence is "},{"kind":"code","text":"end - start"},{"kind":"text","text":", so if "},{"kind":"code","text":"start == end"},{"kind":"text","text":" then an empty sequence is returned."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/ByteSequence.java","line":104}},{"id":"org.graalvm.polyglot.io.ByteSequence#toByteArray()","anchor":"toByteArray()","kind":"method","name":"toByteArray","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"keyword","text":"byte"},{"kind":"punct","text":"[] "},{"kind":"name","text":"toByteArray"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"byte"},{"kind":"punct","text":"[]"}]},"doc":{"summary":[{"kind":"text","text":"Returns a "},{"kind":"code","text":"byte[]"},{"kind":"text","text":" containing the bytes in this sequence in the same order as this sequence."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns a "},{"kind":"code","text":"byte[]"},{"kind":"text","text":" containing the bytes in this sequence in the same order as this sequence. The length of the byte array will be the length of this sequence. Creates a new byte array with every invocation."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/ByteSequence.java","line":133}},{"id":"org.graalvm.polyglot.io.ByteSequence#bytes()","anchor":"bytes()","kind":"method","name":"bytes","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"type","text":"IntStream","ref":"java.util.stream.IntStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/stream/IntStream.html"},{"kind":"punct","text":" "},{"kind":"name","text":"bytes"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"IntStream","ref":"java.util.stream.IntStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/stream/IntStream.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"an IntStream of byte values from this sequence"}]}]},"doc":{"summary":[{"kind":"text","text":"Returns a stream of "},{"kind":"code","text":"int"},{"kind":"text","text":" zero-extending the "},{"kind":"code","text":"byte"},{"kind":"text","text":" values from this sequence."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns a stream of "},{"kind":"code","text":"int"},{"kind":"text","text":" zero-extending the "},{"kind":"code","text":"byte"},{"kind":"text","text":" values from this sequence."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/ByteSequence.java","line":147}},{"id":"org.graalvm.polyglot.io.ByteSequence#create(byte[])","anchor":"create(byte[])","kind":"method","name":"create","modifiers":["static"],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"ByteSequence","ref":"org.graalvm.polyglot.io.ByteSequence"},{"kind":"punct","text":" "},{"kind":"name","text":"create"},{"kind":"punct","text":"("},{"kind":"keyword","text":"byte"},{"kind":"punct","text":"[] "},{"kind":"param","text":"buffer"},{"kind":"punct","text":")"}],"params":[{"name":"buffer","type":[{"kind":"keyword","text":"byte"},{"kind":"punct","text":"[]"}]}],"returns":{"type":[{"kind":"type","text":"ByteSequence","ref":"org.graalvm.polyglot.io.ByteSequence"}]},"doc":{"summary":[{"kind":"text","text":"Creates a "},{"kind":"code","text":"ByteSequence"},{"kind":"text","text":" from an existing "},{"kind":"code","text":"byte[]"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a "},{"kind":"code","text":"ByteSequence"},{"kind":"text","text":" from an existing "},{"kind":"code","text":"byte[]"},{"kind":"text","text":". The byte array is not defensively copied, therefore the given bytes must not mutate to ensure the contract of an immutable ByteSequence."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/ByteSequence.java","line":185}}],"doc":{"summary":[{"kind":"text","text":"A "},{"kind":"code","text":"ByteSequence"},{"kind":"text","text":" is a readable sequence of "},{"kind":"code","text":"byte"},{"kind":"text","text":" values."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"A "},{"kind":"code","text":"ByteSequence"},{"kind":"text","text":" is a readable sequence of "},{"kind":"code","text":"byte"},{"kind":"text","text":" values. This interface provides uniform, read-only access to many different kinds of "},{"kind":"code","text":"byte"},{"kind":"text","text":" sequences."}]},{"kind":"paragraph","children":[{"kind":"text","text":"This interface does not refine the general contracts of the "},{"kind":"link","target":{"id":"java.lang.Object#equals(java.lang.Object)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"equals"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"java.lang.Object#hashCode()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},"code":true,"children":[{"kind":"text","text":"hashCode"}]},{"kind":"text","text":" methods. The result of comparing two objects that implement "},{"kind":"code","text":"ByteSequence"},{"kind":"text","text":" is therefore, in general, undefined. Each object may be implemented by a different class, and there is no guarantee that each class will be capable of testing its instances for equality with those of the other. It is therefore inappropriate to use arbitrary "},{"kind":"code","text":"ByteSequence"},{"kind":"text","text":" instances as elements in a set or as keys in a map."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/ByteSequence.java","line":66}},{"id":"org.graalvm.polyglot.io.FileChannel","name":"FileChannel","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"FileChannel"},{"kind":"punct","text":" "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"SeekableByteChannel","ref":"java.nio.channels.SeekableByteChannel","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/SeekableByteChannel.html"}],"interfaces":[[{"kind":"type","text":"SeekableByteChannel","ref":"java.nio.channels.SeekableByteChannel","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/SeekableByteChannel.html"}]],"members":[{"id":"org.graalvm.polyglot.io.FileChannel#position(long)","anchor":"position(long)","kind":"method","name":"position","signature":[{"kind":"type","text":"FileChannel","ref":"org.graalvm.polyglot.io.FileChannel"},{"kind":"punct","text":" "},{"kind":"name","text":"position"},{"kind":"punct","text":"("},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"newPosition"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"newPosition","type":[{"kind":"keyword","text":"long"}]}],"returns":{"type":[{"kind":"type","text":"FileChannel","ref":"org.graalvm.polyglot.io.FileChannel"}]},"throws":[{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true}],"overrides":{"id":"java.nio.channels.SeekableByteChannel#position(long)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/SeekableByteChannel.html#position(long)"},"since":"25.5","source":{"path":"org/graalvm/polyglot/io/FileChannel.java","line":72}},{"id":"org.graalvm.polyglot.io.FileChannel#truncate(long)","anchor":"truncate(long)","kind":"method","name":"truncate","signature":[{"kind":"type","text":"FileChannel","ref":"org.graalvm.polyglot.io.FileChannel"},{"kind":"punct","text":" "},{"kind":"name","text":"truncate"},{"kind":"punct","text":"("},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"size"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"size","type":[{"kind":"keyword","text":"long"}]}],"returns":{"type":[{"kind":"type","text":"FileChannel","ref":"org.graalvm.polyglot.io.FileChannel"}]},"throws":[{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true}],"overrides":{"id":"java.nio.channels.SeekableByteChannel#truncate(long)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/SeekableByteChannel.html#truncate(long)"},"since":"25.5","source":{"path":"org/graalvm/polyglot/io/FileChannel.java","line":79}},{"id":"org.graalvm.polyglot.io.FileChannel#lock()","anchor":"lock()","kind":"method","name":"lock","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"type","text":"FileLock","ref":"org.graalvm.polyglot.io.FileLock"},{"kind":"punct","text":" "},{"kind":"name","text":"lock"},{"kind":"punct","text":"() "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"returns":{"type":[{"kind":"type","text":"FileLock","ref":"org.graalvm.polyglot.io.FileLock"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a newly acquired exclusive lock"}]}]},"throws":[{"type":[{"kind":"type","text":"ClosedChannelException","ref":"java.nio.channels.ClosedChannelException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/ClosedChannelException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this channel is closed"}]}]},{"type":[{"kind":"type","text":"AsynchronousCloseException","ref":"java.nio.channels.AsynchronousCloseException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/AsynchronousCloseException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if another thread closes this channel while the invoking thread is blocked"}]}]},{"type":[{"kind":"type","text":"FileLockInterruptionException","ref":"java.nio.channels.FileLockInterruptionException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/FileLockInterruptionException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the invoking thread is interrupted while blocked"}]}]},{"type":[{"kind":"type","text":"OverlappingFileLockException","ref":"java.nio.channels.OverlappingFileLockException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/OverlappingFileLockException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if an overlapping lock is already held by this Java virtual machine, or another thread is waiting for an overlapping lock"}]}]},{"type":[{"kind":"type","text":"NonWritableChannelException","ref":"java.nio.channels.NonWritableChannelException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/NonWritableChannelException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this channel was not opened for writing"}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this channel does not support file locking"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if another I/O error occurs"}]}]}],"doc":{"summary":[{"kind":"text","text":"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."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"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. This method is equivalent to invoking "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileChannel#lock(long,long,boolean)"},"code":true,"children":[{"kind":"text","text":"lock(0, Long.MAX_VALUE, false)"}]},{"kind":"text","text":"."}]}]},"since":"25.5","source":{"path":"org/graalvm/polyglot/io/FileChannel.java","line":98}},{"id":"org.graalvm.polyglot.io.FileChannel#lock(long,long,boolean)","anchor":"lock(long,long,boolean)","kind":"method","name":"lock","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"type","text":"FileLock","ref":"org.graalvm.polyglot.io.FileLock"},{"kind":"punct","text":" "},{"kind":"name","text":"lock"},{"kind":"punct","text":"("},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"position"},{"kind":"punct","text":", "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"size"},{"kind":"punct","text":", "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"shared"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"position","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the position of the first byte in the region; must be non-negative"}]}]},{"name":"size","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the size of the region; must be non-negative and "},{"kind":"code","text":"position + size"},{"kind":"text","text":" must not overflow"}]}]},{"name":"shared","type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" to request a shared lock, or "},{"kind":"code","text":"false"},{"kind":"text","text":" to request an exclusive lock"}]}]}],"returns":{"type":[{"kind":"type","text":"FileLock","ref":"org.graalvm.polyglot.io.FileLock"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the newly acquired lock"}]}]},"throws":[{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"position"},{"kind":"text","text":" or "},{"kind":"code","text":"size"},{"kind":"text","text":" is negative or their sum overflows"}]}]},{"type":[{"kind":"type","text":"ClosedChannelException","ref":"java.nio.channels.ClosedChannelException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/ClosedChannelException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this channel is closed"}]}]},{"type":[{"kind":"type","text":"AsynchronousCloseException","ref":"java.nio.channels.AsynchronousCloseException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/AsynchronousCloseException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if another thread closes this channel while the invoking thread is blocked"}]}]},{"type":[{"kind":"type","text":"FileLockInterruptionException","ref":"java.nio.channels.FileLockInterruptionException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/FileLockInterruptionException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the invoking thread is interrupted while blocked"}]}]},{"type":[{"kind":"type","text":"OverlappingFileLockException","ref":"java.nio.channels.OverlappingFileLockException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/OverlappingFileLockException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if an overlapping lock is already held by this Java virtual machine, or another thread is waiting for an overlapping lock"}]}]},{"type":[{"kind":"type","text":"NonReadableChannelException","ref":"java.nio.channels.NonReadableChannelException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/NonReadableChannelException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a shared lock is requested and this channel was not opened for reading"}]}]},{"type":[{"kind":"type","text":"NonWritableChannelException","ref":"java.nio.channels.NonWritableChannelException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/NonWritableChannelException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if an exclusive lock is requested and this channel was not opened for writing"}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this channel does not support file locking"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if another I/O error occurs"}]}]}],"doc":{"summary":[{"kind":"text","text":"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."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"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. The region need not be contained within or overlap the current file contents. A requested shared lock may be converted to an exclusive lock when shared locks are not supported by the operating system."}]}]},"since":"25.5","source":{"path":"org/graalvm/polyglot/io/FileChannel.java","line":130}},{"id":"org.graalvm.polyglot.io.FileChannel#tryLock()","anchor":"tryLock()","kind":"method","name":"tryLock","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"type","text":"FileLock","ref":"org.graalvm.polyglot.io.FileLock"},{"kind":"punct","text":" "},{"kind":"name","text":"tryLock"},{"kind":"punct","text":"() "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"returns":{"type":[{"kind":"type","text":"FileLock","ref":"org.graalvm.polyglot.io.FileLock"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a newly acquired exclusive lock, or "},{"kind":"code","text":"null"},{"kind":"text","text":" if another program holds an overlapping lock"}]}]},"throws":[{"type":[{"kind":"type","text":"ClosedChannelException","ref":"java.nio.channels.ClosedChannelException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/ClosedChannelException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this channel is closed"}]}]},{"type":[{"kind":"type","text":"OverlappingFileLockException","ref":"java.nio.channels.OverlappingFileLockException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/OverlappingFileLockException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if an overlapping lock is already held by this Java virtual machine, or another thread is waiting for an overlapping lock"}]}]},{"type":[{"kind":"type","text":"NonWritableChannelException","ref":"java.nio.channels.NonWritableChannelException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/NonWritableChannelException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this channel was not opened for writing"}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this channel does not support file locking"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if another I/O error occurs"}]}]}],"doc":{"summary":[{"kind":"text","text":"Attempts to acquire an exclusive lock on this channel's file without blocking."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Attempts to acquire an exclusive lock on this channel's file without blocking. This method is equivalent to invoking "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileChannel#tryLock(long,long,boolean)"},"code":true,"children":[{"kind":"text","text":"tryLock(0, Long.MAX_VALUE, false)"}]},{"kind":"text","text":"."}]}]},"since":"25.5","source":{"path":"org/graalvm/polyglot/io/FileChannel.java","line":148}},{"id":"org.graalvm.polyglot.io.FileChannel#tryLock(long,long,boolean)","anchor":"tryLock(long,long,boolean)","kind":"method","name":"tryLock","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"type","text":"FileLock","ref":"org.graalvm.polyglot.io.FileLock"},{"kind":"punct","text":" "},{"kind":"name","text":"tryLock"},{"kind":"punct","text":"("},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"position"},{"kind":"punct","text":", "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"size"},{"kind":"punct","text":", "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"shared"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"position","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the position of the first byte in the region; must be non-negative"}]}]},{"name":"size","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the size of the region; must be non-negative and "},{"kind":"code","text":"position + size"},{"kind":"text","text":" must not overflow"}]}]},{"name":"shared","type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" to request a shared lock, or "},{"kind":"code","text":"false"},{"kind":"text","text":" to request an exclusive lock"}]}]}],"returns":{"type":[{"kind":"type","text":"FileLock","ref":"org.graalvm.polyglot.io.FileLock"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the newly acquired lock, or "},{"kind":"code","text":"null"},{"kind":"text","text":" if another program holds an overlapping lock"}]}]},"throws":[{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"position"},{"kind":"text","text":" or "},{"kind":"code","text":"size"},{"kind":"text","text":" is negative or their sum overflows"}]}]},{"type":[{"kind":"type","text":"ClosedChannelException","ref":"java.nio.channels.ClosedChannelException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/ClosedChannelException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this channel is closed"}]}]},{"type":[{"kind":"type","text":"OverlappingFileLockException","ref":"java.nio.channels.OverlappingFileLockException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/OverlappingFileLockException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if an overlapping lock is already held by this Java virtual machine, or another thread is waiting for an overlapping lock"}]}]},{"type":[{"kind":"type","text":"NonReadableChannelException","ref":"java.nio.channels.NonReadableChannelException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/NonReadableChannelException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a shared lock is requested and this channel was not opened for reading"}]}]},{"type":[{"kind":"type","text":"NonWritableChannelException","ref":"java.nio.channels.NonWritableChannelException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/NonWritableChannelException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if an exclusive lock is requested and this channel was not opened for writing"}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this channel does not support file locking"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if another I/O error occurs"}]}]}],"doc":{"summary":[{"kind":"text","text":"Attempts to acquire a lock on a region of this channel's file without blocking."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Attempts to acquire a lock on a region of this channel's file without blocking. The region need not be contained within or overlap the current file contents. A requested shared lock may be converted to an exclusive lock when shared locks are not supported by the operating system."}]}]},"since":"25.5","source":{"path":"org/graalvm/polyglot/io/FileChannel.java","line":177}},{"id":"org.graalvm.polyglot.io.FileChannel#map(java.nio.channels.FileChannel.MapMode,long,long,java.lang.Object)","anchor":"map(java.nio.channels.FileChannel.MapMode,long,long,java.lang.Object)","kind":"method","name":"map","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"name","text":"map"},{"kind":"punct","text":"("},{"kind":"type","text":"FileChannel.MapMode","ref":"java.nio.channels.FileChannel$MapMode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/FileChannel.MapMode.html"},{"kind":"punct","text":" "},{"kind":"param","text":"mode"},{"kind":"punct","text":", "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"offset"},{"kind":"punct","text":", "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"size"},{"kind":"punct","text":", "},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"arena"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"mode","type":[{"kind":"type","text":"FileChannel.MapMode","ref":"java.nio.channels.FileChannel$MapMode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/FileChannel.MapMode.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the mode in which the file region is mapped"}]}]},{"name":"offset","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the offset within the file at which the mapped region starts; must be non-negative"}]}]},{"name":"size","type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the size of the mapped region, in bytes; must be non-negative"}]}]},{"name":"arena","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"code","text":"java.lang.foreign.Arena"},{"kind":"text","text":" associated with the returned segment"}]}]}],"returns":{"type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a "},{"kind":"code","text":"java.lang.foreign.MemorySegment"},{"kind":"text","text":" whose lifetime is controlled by "},{"kind":"code","text":"arena"}]}]},"throws":[{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if an I/O error occurs"}]}]},{"type":[{"kind":"type","text":"NonReadableChannelException","ref":"java.nio.channels.NonReadableChannelException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/NonReadableChannelException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"mode"},{"kind":"text","text":" requires read access and this channel was not opened for reading"}]}]},{"type":[{"kind":"type","text":"NonWritableChannelException","ref":"java.nio.channels.NonWritableChannelException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/NonWritableChannelException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"mode"},{"kind":"text","text":" requires write access and this channel was not opened for writing"}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this channel does not support memory mapping or the requested "},{"kind":"code","text":"mode"}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"offset"},{"kind":"text","text":" or "},{"kind":"code","text":"size"},{"kind":"text","text":" is negative or their sum overflows the range of "},{"kind":"code","text":"long"}]}]},{"type":[{"kind":"type","text":"IllegalStateException","ref":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"arena"},{"kind":"text","text":" has already been closed"}]}]},{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"arena"},{"kind":"text","text":" is not a "},{"kind":"code","text":"java.lang.foreign.Arena"}]}]},{"type":[{"kind":"type","text":"RuntimeException","ref":"java.lang.RuntimeException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/RuntimeException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"arena"},{"kind":"text","text":" is confined and this method is called from a thread other than the arena's owner thread; on JDK 22 and later, the concrete exception is "},{"kind":"code","text":"java.lang.WrongThreadException"}]}]},{"type":[{"kind":"type","text":"NullPointerException","ref":"java.lang.NullPointerException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"mode"},{"kind":"text","text":" or "},{"kind":"code","text":"arena"},{"kind":"text","text":" is "},{"kind":"code","text":"null"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Maps a region of this channel's file into a memory segment associated with the given arena."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Maps a region of this channel's file into a memory segment associated with the given arena."}]},{"kind":"paragraph","children":[{"kind":"text","text":"This channel must have been opened for reading for a read-only mapping and for both reading and writing for a read/write or private mapping. Closing this channel does not invalidate the returned segment. Closing "},{"kind":"code","text":"arena"},{"kind":"text","text":" invalidates the segment and permits the mapped region to be unmapped."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The arena parameter and return type are intentionally erased to "},{"kind":"link","target":{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"code":true,"children":[{"kind":"text","text":"Object"}]},{"kind":"text","text":" to avoid a static dependency on the Foreign Function and Memory API, which is not available on all JDK versions supported by this API. The "},{"kind":"code","text":"arena"},{"kind":"text","text":" argument must be a "},{"kind":"code","text":"java.lang.foreign.Arena"},{"kind":"text","text":", and the returned object is a "},{"kind":"code","text":"java.lang.foreign.MemorySegment"},{"kind":"text","text":". When JDK 22 or later becomes the minimum supported version, this method is expected to be deprecated and replaced by a strongly typed variant."}]}]},"since":"25.5","source":{"path":"org/graalvm/polyglot/io/FileChannel.java","line":221}}],"inherited":[{"from":{"id":"java.nio.channels.SeekableByteChannel","text":"SeekableByteChannel","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/SeekableByteChannel.html"},"kind":"interface","members":[{"id":"java.nio.channels.SeekableByteChannel#position()","text":"position","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/SeekableByteChannel.html#position()"},{"id":"java.nio.channels.SeekableByteChannel#read(java.nio.ByteBuffer)","text":"read","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/SeekableByteChannel.html#read(java.nio.ByteBuffer)"},{"id":"java.nio.channels.SeekableByteChannel#size()","text":"size","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/SeekableByteChannel.html#size()"},{"id":"java.nio.channels.SeekableByteChannel#write(java.nio.ByteBuffer)","text":"write","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/SeekableByteChannel.html#write(java.nio.ByteBuffer)"}]},{"from":{"id":"java.nio.channels.Channel","text":"Channel","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/Channel.html"},"kind":"interface","members":[{"id":"java.nio.channels.Channel#close()","text":"close","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/Channel.html#close()"},{"id":"java.nio.channels.Channel#isOpen()","text":"isOpen","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/Channel.html#isOpen()"}]}],"doc":{"summary":[{"kind":"text","text":"A seekable byte channel that supports file locking and, on JDK 22 and later, mapping regions of its file into memory."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"A seekable byte channel that supports file locking and, on JDK 22 and later, mapping regions of its file into memory."}]},{"kind":"paragraph","children":[{"kind":"text","text":"File system implementations can support locking and memory mapping by returning either a "},{"kind":"link","target":{"id":"java.nio.channels.FileChannel","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/FileChannel.html"},"code":true,"children":[{"kind":"text","text":"java.nio.channels.FileChannel"}]},{"kind":"text","text":" or a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileChannel"},"code":true,"children":[{"kind":"text","text":"FileChannel"}]},{"kind":"text","text":" from "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#newByteChannel(java.nio.file.Path,java.util.Set,java.nio.file.attribute.FileAttribute...)"},"code":true,"children":[{"kind":"text","text":"FileSystem.newByteChannel(Path, Set, FileAttribute[])"}]},{"kind":"text","text":"."}]}]},"since":"25.5","source":{"path":"org/graalvm/polyglot/io/FileChannel.java","line":65}},{"id":"org.graalvm.polyglot.io.FileLock","name":"FileLock","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"FileLock"},{"kind":"punct","text":" "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"AutoCloseable","ref":"java.lang.AutoCloseable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AutoCloseable.html"}],"interfaces":[[{"kind":"type","text":"AutoCloseable","ref":"java.lang.AutoCloseable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AutoCloseable.html"}]],"members":[{"id":"org.graalvm.polyglot.io.FileLock#acquiredBy()","anchor":"acquiredBy()","kind":"method","name":"acquiredBy","signature":[{"kind":"type","text":"FileChannel","ref":"org.graalvm.polyglot.io.FileChannel"},{"kind":"punct","text":" "},{"kind":"name","text":"acquiredBy"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"FileChannel","ref":"org.graalvm.polyglot.io.FileChannel"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the channel through which this lock was acquired"}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the channel through which this lock was acquired."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the channel through which this lock was acquired."}]}]},"since":"25.5","source":{"path":"org/graalvm/polyglot/io/FileLock.java","line":63}},{"id":"org.graalvm.polyglot.io.FileLock#position()","anchor":"position()","kind":"method","name":"position","signature":[{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"name","text":"position"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the position of the first byte in the locked region"}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the position of the first byte in the locked region."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the position of the first byte in the locked region. The position may exceed the current size of the file."}]}]},"since":"25.5","source":{"path":"org/graalvm/polyglot/io/FileLock.java","line":72}},{"id":"org.graalvm.polyglot.io.FileLock#size()","anchor":"size()","kind":"method","name":"size","signature":[{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"name","text":"size"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the size of the locked region in bytes"}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the size of the locked region in bytes."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the size of the locked region in bytes. The locked region need not be contained within or overlap the current file contents."}]}]},"since":"25.5","source":{"path":"org/graalvm/polyglot/io/FileLock.java","line":81}},{"id":"org.graalvm.polyglot.io.FileLock#isShared()","anchor":"isShared()","kind":"method","name":"isShared","signature":[{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isShared"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" if this lock is shared, or "},{"kind":"code","text":"false"},{"kind":"text","text":" if it is exclusive"}]}]},"doc":{"summary":[{"kind":"text","text":"Returns whether this lock is shared."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns whether this lock is shared. A request for a shared lock may be converted to an exclusive lock when shared locks are not supported by the operating system."}]}]},"since":"25.5","source":{"path":"org/graalvm/polyglot/io/FileLock.java","line":90}},{"id":"org.graalvm.polyglot.io.FileLock#isValid()","anchor":"isValid()","kind":"method","name":"isValid","signature":[{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isValid"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" if this lock is valid"}]}]},"doc":{"summary":[{"kind":"text","text":"Returns whether this lock is valid."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns whether this lock is valid."}]}]},"since":"25.5","source":{"path":"org/graalvm/polyglot/io/FileLock.java","line":98}},{"id":"org.graalvm.polyglot.io.FileLock#close()","anchor":"close()","kind":"method","name":"close","signature":[{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"close"},{"kind":"punct","text":"() "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"throws":[{"type":[{"kind":"type","text":"ClosedChannelException","ref":"java.nio.channels.ClosedChannelException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/ClosedChannelException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the channel used to acquire this lock is closed"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if an I/O error occurs"}]}]}],"overrides":{"id":"java.lang.AutoCloseable#close()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AutoCloseable.html#close()"},"doc":{"summary":[{"kind":"text","text":"Releases this lock."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Releases this lock. If the lock is already invalid, invoking this method has no effect."}]}]},"since":"25.5","source":{"path":"org/graalvm/polyglot/io/FileLock.java","line":107}}],"doc":{"summary":[{"kind":"text","text":"Represents a lock on a region of a file acquired through a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileChannel"},"code":true,"children":[{"kind":"text","text":"FileChannel"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Represents a lock on a region of a file acquired through a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileChannel"},"code":true,"children":[{"kind":"text","text":"FileChannel"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"A lock remains valid until it is released by "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileLock#close()"},"code":true,"children":[{"kind":"text","text":"close()"}]},{"kind":"text","text":" or its associated channel is closed, whichever occurs first. File locks are held on behalf of the entire Java virtual machine and are not suitable for coordinating access between threads in the same virtual machine."}]}]},"since":"25.5","source":{"path":"org/graalvm/polyglot/io/FileLock.java","line":55}},{"id":"org.graalvm.polyglot.io.FileSystem","name":"FileSystem","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"FileSystem"}],"members":[{"id":"org.graalvm.polyglot.io.FileSystem#parsePath(java.net.URI)","anchor":"parsePath(java.net.URI)","kind":"method","name":"parsePath","signature":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"name","text":"parsePath"},{"kind":"punct","text":"("},{"kind":"type","text":"URI","ref":"java.net.URI","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URI.html"},{"kind":"punct","text":" "},{"kind":"param","text":"uri"},{"kind":"punct","text":")"}],"params":[{"name":"uri","type":[{"kind":"type","text":"URI","ref":"java.net.URI","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URI.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"java.net.URI","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URI.html"},"code":true,"children":[{"kind":"text","text":"URI"}]},{"kind":"text","text":" to be converted to "},{"kind":"link","target":{"id":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},"code":true,"children":[{"kind":"text","text":"Path"}]}]}]}],"returns":{"type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},"code":true,"children":[{"kind":"text","text":"Path"}]},{"kind":"text","text":" representing given "},{"kind":"link","target":{"id":"java.net.URI","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URI.html"},"code":true,"children":[{"kind":"text","text":"URI"}]}]}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"when "},{"kind":"link","target":{"id":"java.net.URI","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URI.html"},"code":true,"children":[{"kind":"text","text":"URI"}]},{"kind":"text","text":" scheme is not supported"}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if preconditions on the "},{"kind":"code","text":"uri"},{"kind":"text","text":" do not hold. The format of the URI is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" specific."}]}]}],"doc":{"summary":[{"kind":"text","text":"Parses a path from an "},{"kind":"link","target":{"id":"java.net.URI","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URI.html"},"code":true,"children":[{"kind":"text","text":"URI"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Parses a path from an "},{"kind":"link","target":{"id":"java.net.URI","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URI.html"},"code":true,"children":[{"kind":"text","text":"URI"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":92}},{"id":"org.graalvm.polyglot.io.FileSystem#parsePath(java.lang.String)","anchor":"parsePath(java.lang.String)","kind":"method","name":"parsePath","signature":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"name","text":"parsePath"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"path"},{"kind":"punct","text":")"}],"params":[{"name":"path","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the string path to be converted to "},{"kind":"link","target":{"id":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},"code":true,"children":[{"kind":"text","text":"Path"}]}]}]}],"returns":{"type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},"code":true,"children":[{"kind":"text","text":"Path"}]}]}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"when the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" supports only "},{"kind":"link","target":{"id":"java.net.URI","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URI.html"},"code":true,"children":[{"kind":"text","text":"URI"}]}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the "},{"kind":"code","text":"path"},{"kind":"text","text":" string cannot be converted to a "},{"kind":"link","target":{"id":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},"code":true,"children":[{"kind":"text","text":"Path"}]}]}]}],"doc":{"summary":[{"kind":"text","text":"Parses a path from a "},{"kind":"link","target":{"id":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Parses a path from a "},{"kind":"link","target":{"id":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":". This method is called only on the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" with "},{"kind":"code","text":"file"},{"kind":"text","text":" scheme."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":105}},{"id":"org.graalvm.polyglot.io.FileSystem#checkAccess(java.nio.file.Path,java.util.Set,java.nio.file.LinkOption...)","anchor":"checkAccess(java.nio.file.Path,java.util.Set,java.nio.file.LinkOption...)","kind":"method","name":"checkAccess","signature":[{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"checkAccess"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"path"},{"kind":"punct","text":", "},{"kind":"type","text":"Set","ref":"java.util.Set","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Set.html"},{"kind":"punct","text":"<? "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"AccessMode","ref":"java.nio.file.AccessMode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/AccessMode.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"modes"},{"kind":"punct","text":", "},{"kind":"type","text":"LinkOption","ref":"java.nio.file.LinkOption","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/LinkOption.html"},{"kind":"punct","text":"... "},{"kind":"param","text":"linkOptions"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"path","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path to the file to check"}]}]},{"name":"modes","type":[{"kind":"type","text":"Set","ref":"java.util.Set","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Set.html"},{"kind":"punct","text":"<? "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"AccessMode","ref":"java.nio.file.AccessMode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/AccessMode.html"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the access modes to check, possibly empty to check existence only."}]}]},{"name":"linkOptions","type":[{"kind":"type","text":"LinkOption","ref":"java.nio.file.LinkOption","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/LinkOption.html"},{"kind":"punct","text":"..."}],"varargs":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"options determining how the symbolic links should be handled"}]}]}],"throws":[{"type":[{"kind":"type","text":"NoSuchFileException","ref":"java.nio.file.NoSuchFileException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/NoSuchFileException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the file denoted by the path does not exist"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case of IO error"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Checks existence and accessibility of a file."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Checks existence and accessibility of a file."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":118}},{"id":"org.graalvm.polyglot.io.FileSystem#createDirectory(java.nio.file.Path,java.nio.file.attribute.FileAttribute...)","anchor":"createDirectory(java.nio.file.Path,java.nio.file.attribute.FileAttribute...)","kind":"method","name":"createDirectory","signature":[{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"createDirectory"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"dir"},{"kind":"punct","text":", "},{"kind":"type","text":"FileAttribute","ref":"java.nio.file.attribute.FileAttribute","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/attribute/FileAttribute.html"},{"kind":"punct","text":"<?>... "},{"kind":"param","text":"attrs"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"dir","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the directory to create"}]}]},{"name":"attrs","type":[{"kind":"type","text":"FileAttribute","ref":"java.nio.file.attribute.FileAttribute","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/attribute/FileAttribute.html"},{"kind":"punct","text":"<?>..."}],"varargs":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the optional attributes to set atomically when creating the directory"}]}]}],"throws":[{"type":[{"kind":"type","text":"FileAlreadyExistsException","ref":"java.nio.file.FileAlreadyExistsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/FileAlreadyExistsException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a file on given path already exists"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case of IO error"}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the attributes contain an attribute which cannot be set atomically"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Creates a directory."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a directory."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":132}},{"id":"org.graalvm.polyglot.io.FileSystem#delete(java.nio.file.Path)","anchor":"delete(java.nio.file.Path)","kind":"method","name":"delete","signature":[{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"delete"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"path"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"path","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path to the file to delete"}]}]}],"throws":[{"type":[{"kind":"type","text":"NoSuchFileException","ref":"java.nio.file.NoSuchFileException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/NoSuchFileException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a file on given path does not exist"}]}]},{"type":[{"kind":"type","text":"DirectoryNotEmptyException","ref":"java.nio.file.DirectoryNotEmptyException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/DirectoryNotEmptyException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the path denotes a non empty directory"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case of IO error"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Deletes a file."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Deletes a file."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":144}},{"id":"org.graalvm.polyglot.io.FileSystem#newByteChannel(java.nio.file.Path,java.util.Set,java.nio.file.attribute.FileAttribute...)","anchor":"newByteChannel(java.nio.file.Path,java.util.Set,java.nio.file.attribute.FileAttribute...)","kind":"method","name":"newByteChannel","signature":[{"kind":"type","text":"SeekableByteChannel","ref":"java.nio.channels.SeekableByteChannel","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/SeekableByteChannel.html"},{"kind":"punct","text":" "},{"kind":"name","text":"newByteChannel"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"path"},{"kind":"punct","text":", "},{"kind":"type","text":"Set","ref":"java.util.Set","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Set.html"},{"kind":"punct","text":"<? "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"OpenOption","ref":"java.nio.file.OpenOption","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/OpenOption.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"options"},{"kind":"punct","text":", "},{"kind":"type","text":"FileAttribute","ref":"java.nio.file.attribute.FileAttribute","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/attribute/FileAttribute.html"},{"kind":"punct","text":"<?>... "},{"kind":"param","text":"attrs"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"path","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path to the file to open"}]}]},{"name":"options","type":[{"kind":"type","text":"Set","ref":"java.util.Set","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Set.html"},{"kind":"punct","text":"<? "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"OpenOption","ref":"java.nio.file.OpenOption","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/OpenOption.html"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the options specifying how the file should be opened"}]}]},{"name":"attrs","type":[{"kind":"type","text":"FileAttribute","ref":"java.nio.file.attribute.FileAttribute","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/attribute/FileAttribute.html"},{"kind":"punct","text":"<?>..."}],"varargs":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the optional attributes to set atomically when creating the new file"}]}]}],"returns":{"type":[{"kind":"type","text":"SeekableByteChannel","ref":"java.nio.channels.SeekableByteChannel","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/SeekableByteChannel.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the created "},{"kind":"link","target":{"id":"java.nio.channels.SeekableByteChannel","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/SeekableByteChannel.html"},"code":true,"children":[{"kind":"text","text":"SeekableByteChannel"}]}]}]},"throws":[{"type":[{"kind":"type","text":"FileAlreadyExistsException","ref":"java.nio.file.FileAlreadyExistsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/FileAlreadyExistsException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"link","target":{"id":"java.nio.file.StandardOpenOption#CREATE_NEW","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/StandardOpenOption.html#CREATE_NEW"},"code":true,"children":[{"kind":"text","text":"StandardOpenOption.CREATE_NEW"}]},{"kind":"text","text":" option is set and a file already exists on given path"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case of IO error"}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the attributes contain an attribute which cannot be set atomically"}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case of invalid options combination"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Opens or creates a file returning a "},{"kind":"link","target":{"id":"java.nio.channels.SeekableByteChannel","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/SeekableByteChannel.html"},"code":true,"children":[{"kind":"text","text":"SeekableByteChannel"}]},{"kind":"text","text":" to access the file content."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Opens or creates a file returning a "},{"kind":"link","target":{"id":"java.nio.channels.SeekableByteChannel","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/SeekableByteChannel.html"},"code":true,"children":[{"kind":"text","text":"SeekableByteChannel"}]},{"kind":"text","text":" to access the file content."}]},{"kind":"paragraph","children":[{"kind":"text","text":"To support file locking and, on JDK 22 and later, memory mapping, an implementation should return either a "},{"kind":"link","target":{"id":"java.nio.channels.FileChannel","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/channels/FileChannel.html"},"code":true,"children":[{"kind":"text","text":"java.nio.channels.FileChannel"}]},{"kind":"text","text":" or a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileChannel"},"code":true,"children":[{"kind":"text","text":"FileChannel"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":165}},{"id":"org.graalvm.polyglot.io.FileSystem#newDirectoryStream(java.nio.file.Path,java.nio.file.DirectoryStream.Filter)","anchor":"newDirectoryStream(java.nio.file.Path,java.nio.file.DirectoryStream.Filter)","kind":"method","name":"newDirectoryStream","signature":[{"kind":"type","text":"DirectoryStream","ref":"java.nio.file.DirectoryStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/DirectoryStream.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":"> "},{"kind":"name","text":"newDirectoryStream"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"dir"},{"kind":"punct","text":", "},{"kind":"type","text":"DirectoryStream.Filter","ref":"java.nio.file.DirectoryStream$Filter","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/DirectoryStream.Filter.html"},{"kind":"punct","text":"<? "},{"kind":"keyword","text":"super"},{"kind":"punct","text":" "},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"filter"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"dir","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path to the directory to iterate entries for"}]}]},{"name":"filter","type":[{"kind":"type","text":"DirectoryStream.Filter","ref":"java.nio.file.DirectoryStream$Filter","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/DirectoryStream.Filter.html"},{"kind":"punct","text":"<? "},{"kind":"keyword","text":"super"},{"kind":"punct","text":" "},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the filter"}]}]}],"returns":{"type":[{"kind":"type","text":"DirectoryStream","ref":"java.nio.file.DirectoryStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/DirectoryStream.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the new "},{"kind":"link","target":{"id":"java.nio.file.DirectoryStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/DirectoryStream.html"},"code":true,"children":[{"kind":"text","text":"DirectoryStream"}]}]}]},"throws":[{"type":[{"kind":"type","text":"NotDirectoryException","ref":"java.nio.file.NotDirectoryException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/NotDirectoryException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"when given path does not denote a directory"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case of IO error"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns directory entries."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns directory entries."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":178}},{"id":"org.graalvm.polyglot.io.FileSystem#toAbsolutePath(java.nio.file.Path)","anchor":"toAbsolutePath(java.nio.file.Path)","kind":"method","name":"toAbsolutePath","signature":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toAbsolutePath"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"path"},{"kind":"punct","text":")"}],"params":[{"name":"path","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path to resolve, may be a non normalized path"}]}]}],"returns":{"type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"an absolute "},{"kind":"link","target":{"id":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},"code":true,"children":[{"kind":"text","text":"Path"}]}]}]},"throws":[{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Resolves given path to an absolute path."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Resolves given path to an absolute path."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":188}},{"id":"org.graalvm.polyglot.io.FileSystem#toRealPath(java.nio.file.Path,java.nio.file.LinkOption...)","anchor":"toRealPath(java.nio.file.Path,java.nio.file.LinkOption...)","kind":"method","name":"toRealPath","signature":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toRealPath"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"path"},{"kind":"punct","text":", "},{"kind":"type","text":"LinkOption","ref":"java.nio.file.LinkOption","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/LinkOption.html"},{"kind":"punct","text":"... "},{"kind":"param","text":"linkOptions"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"path","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path to resolve, may be a non normalized path"}]}]},{"name":"linkOptions","type":[{"kind":"type","text":"LinkOption","ref":"java.nio.file.LinkOption","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/LinkOption.html"},{"kind":"punct","text":"..."}],"varargs":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"options determining how the symbolic links should be handled"}]}]}],"returns":{"type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"an absolute canonical path"}]}]},"throws":[{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case of IO error"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the real (canonical) path of an existing file."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the real (canonical) path of an existing file."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":200}},{"id":"org.graalvm.polyglot.io.FileSystem#readAttributes(java.nio.file.Path,java.lang.String,java.nio.file.LinkOption...)","anchor":"readAttributes(java.nio.file.Path,java.lang.String,java.nio.file.LinkOption...)","kind":"method","name":"readAttributes","signature":[{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":"> "},{"kind":"name","text":"readAttributes"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"path"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"attributes"},{"kind":"punct","text":", "},{"kind":"type","text":"LinkOption","ref":"java.nio.file.LinkOption","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/LinkOption.html"},{"kind":"punct","text":"... "},{"kind":"param","text":"options"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"path","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path to file to read attributes for"}]}]},{"name":"attributes","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the attributes to read. The "},{"kind":"code","text":"attributes"},{"kind":"text","text":" parameter has the form: "},{"kind":"code","text":"[view-name:]attribute-list"},{"kind":"text","text":". The optional "},{"kind":"code","text":"view-name"},{"kind":"text","text":" corresponds to "},{"kind":"link","target":{"id":"java.nio.file.attribute.AttributeView#name()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/attribute/AttributeView.html#name()"},"code":true,"children":[{"kind":"text","text":"FileAttributeView.name()"}]},{"kind":"text","text":" and determines the set of attributes, the default value is "},{"kind":"code","text":"\"basic\""},{"kind":"text","text":". The "},{"kind":"code","text":"attribute-list"},{"kind":"text","text":" is a comma separated list of attributes. If the "},{"kind":"code","text":"attribute-list"},{"kind":"text","text":" contains "},{"kind":"code","text":"'*'"},{"kind":"text","text":" then all the attributes from given view are read."}]}]},{"name":"options","type":[{"kind":"type","text":"LinkOption","ref":"java.nio.file.LinkOption","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/LinkOption.html"},{"kind":"punct","text":"..."}],"varargs":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the options determining how the symbolic links should be handled"}]}]}],"returns":{"type":[{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"Map"}]},{"kind":"text","text":" containing the file attributes. The map's keys are attribute names, map's values are the attribute values. The map may contain a subset of required attributes in case when the "},{"kind":"code","text":"FileSystem"},{"kind":"text","text":" does not support some of the required attributes."}]}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the attribute view is not supported. At least the "},{"kind":"code","text":"\"basic\""},{"kind":"text","text":" attribute view has to be supported by the file system."}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"is the "},{"kind":"code","text":"attribute-list"},{"kind":"text","text":" is empty or contains an unknown attribute"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case of IO error"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Reads a file's attributes as a bulk operation."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Reads a file's attributes as a bulk operation."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":225}},{"id":"org.graalvm.polyglot.io.FileSystem#setAttribute(java.nio.file.Path,java.lang.String,java.lang.Object,java.nio.file.LinkOption...)","anchor":"setAttribute(java.nio.file.Path,java.lang.String,java.lang.Object,java.nio.file.LinkOption...)","kind":"method","name":"setAttribute","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"setAttribute"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"path"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"attribute"},{"kind":"punct","text":", "},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":", "},{"kind":"type","text":"LinkOption","ref":"java.nio.file.LinkOption","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/LinkOption.html"},{"kind":"punct","text":"... "},{"kind":"param","text":"options"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"path","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path to file to set an attribute to"}]}]},{"name":"attribute","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the attribute to set. The "},{"kind":"code","text":"attribute"},{"kind":"text","text":" parameter has the form: "},{"kind":"code","text":"[view-name:]attribute-name"},{"kind":"text","text":". The optional "},{"kind":"code","text":"view-name"},{"kind":"text","text":" corresponds to "},{"kind":"link","target":{"id":"java.nio.file.attribute.AttributeView#name()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/attribute/AttributeView.html#name()"},"code":true,"children":[{"kind":"text","text":"FileAttributeView.name()"}]},{"kind":"text","text":" and determines the set of attributes, the default value is "},{"kind":"code","text":"\"basic\""},{"kind":"text","text":". The "},{"kind":"code","text":"attribute-name"},{"kind":"text","text":" is a name of an attribute."}]}]},{"name":"value","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the attribute value"}]}]},{"name":"options","type":[{"kind":"type","text":"LinkOption","ref":"java.nio.file.LinkOption","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/LinkOption.html"},{"kind":"punct","text":"..."}],"varargs":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the options determining how the symbolic links should be handled"}]}]}],"throws":[{"type":[{"kind":"type","text":"ClassCastException","ref":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"value"},{"kind":"text","text":" is not of the expected type or "},{"kind":"code","text":"value"},{"kind":"text","text":" is a "},{"kind":"link","target":{"id":"java.util.Collection","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Collection.html"},"code":true,"children":[{"kind":"text","text":"Collection"}]},{"kind":"text","text":" containing element of a non expected type"}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the attribute view is not supported."}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"is the "},{"kind":"code","text":"attribute-name"},{"kind":"text","text":" is an unknown attribute or "},{"kind":"code","text":"value"},{"kind":"text","text":" has an inappropriate value"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case of IO error"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Sets a file's attribute."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets a file's attribute."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":246}},{"id":"org.graalvm.polyglot.io.FileSystem#copy(java.nio.file.Path,java.nio.file.Path,java.nio.file.CopyOption...)","anchor":"copy(java.nio.file.Path,java.nio.file.Path,java.nio.file.CopyOption...)","kind":"method","name":"copy","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"copy"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"source"},{"kind":"punct","text":", "},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"target"},{"kind":"punct","text":", "},{"kind":"type","text":"CopyOption","ref":"java.nio.file.CopyOption","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/CopyOption.html"},{"kind":"punct","text":"... "},{"kind":"param","text":"options"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"source","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path to file to copy"}]}]},{"name":"target","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path to the target file"}]}]},{"name":"options","type":[{"kind":"type","text":"CopyOption","ref":"java.nio.file.CopyOption","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/CopyOption.html"},{"kind":"punct","text":"..."}],"varargs":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the options specifying how the copy should be performed, see "},{"kind":"link","target":{"id":"java.nio.file.StandardCopyOption","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/StandardCopyOption.html"},"code":true,"children":[{"kind":"text","text":"StandardCopyOption"}]}]}]}],"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"options"},{"kind":"text","text":" contains unsupported option"}]}]},{"type":[{"kind":"type","text":"FileAlreadyExistsException","ref":"java.nio.file.FileAlreadyExistsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/FileAlreadyExistsException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the target path already exists and the "},{"kind":"code","text":"options"},{"kind":"text","text":" don't contain "},{"kind":"link","target":{"id":"java.nio.file.StandardCopyOption#REPLACE_EXISTING","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/StandardCopyOption.html#REPLACE_EXISTING"},"code":true,"children":[{"kind":"text","text":"StandardCopyOption.REPLACE_EXISTING"}]},{"kind":"text","text":" option"}]}]},{"type":[{"kind":"type","text":"DirectoryNotEmptyException","ref":"java.nio.file.DirectoryNotEmptyException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/DirectoryNotEmptyException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the "},{"kind":"code","text":"options"},{"kind":"text","text":" contain "},{"kind":"link","target":{"id":"java.nio.file.StandardCopyOption#REPLACE_EXISTING","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/StandardCopyOption.html#REPLACE_EXISTING"},"code":true,"children":[{"kind":"text","text":"StandardCopyOption.REPLACE_EXISTING"}]},{"kind":"text","text":" but the "},{"kind":"code","text":"target"},{"kind":"text","text":" is a non empty directory"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case of IO error"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Copies source file to target file."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Copies source file to target file."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":267}},{"id":"org.graalvm.polyglot.io.FileSystem#move(java.nio.file.Path,java.nio.file.Path,java.nio.file.CopyOption...)","anchor":"move(java.nio.file.Path,java.nio.file.Path,java.nio.file.CopyOption...)","kind":"method","name":"move","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"move"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"source"},{"kind":"punct","text":", "},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"target"},{"kind":"punct","text":", "},{"kind":"type","text":"CopyOption","ref":"java.nio.file.CopyOption","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/CopyOption.html"},{"kind":"punct","text":"... "},{"kind":"param","text":"options"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"source","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path to file to move"}]}]},{"name":"target","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path to the target file"}]}]},{"name":"options","type":[{"kind":"type","text":"CopyOption","ref":"java.nio.file.CopyOption","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/CopyOption.html"},{"kind":"punct","text":"..."}],"varargs":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the options specifying how the move should be performed, see "},{"kind":"link","target":{"id":"java.nio.file.StandardCopyOption","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/StandardCopyOption.html"},"code":true,"children":[{"kind":"text","text":"StandardCopyOption"}]}]}]}],"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"options"},{"kind":"text","text":" contains unsupported option"}]}]},{"type":[{"kind":"type","text":"FileAlreadyExistsException","ref":"java.nio.file.FileAlreadyExistsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/FileAlreadyExistsException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the target path already exists and the "},{"kind":"code","text":"options"},{"kind":"text","text":" don't contain "},{"kind":"link","target":{"id":"java.nio.file.StandardCopyOption#REPLACE_EXISTING","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/StandardCopyOption.html#REPLACE_EXISTING"},"code":true,"children":[{"kind":"text","text":"StandardCopyOption.REPLACE_EXISTING"}]},{"kind":"text","text":" option"}]}]},{"type":[{"kind":"type","text":"DirectoryNotEmptyException","ref":"java.nio.file.DirectoryNotEmptyException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/DirectoryNotEmptyException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the "},{"kind":"code","text":"options"},{"kind":"text","text":" contain "},{"kind":"link","target":{"id":"java.nio.file.StandardCopyOption#REPLACE_EXISTING","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/StandardCopyOption.html#REPLACE_EXISTING"},"code":true,"children":[{"kind":"text","text":"StandardCopyOption.REPLACE_EXISTING"}]},{"kind":"text","text":" but the "},{"kind":"code","text":"target"},{"kind":"text","text":" is a non empty directory"}]}]},{"type":[{"kind":"type","text":"AtomicMoveNotSupportedException","ref":"java.nio.file.AtomicMoveNotSupportedException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/AtomicMoveNotSupportedException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the "},{"kind":"code","text":"options"},{"kind":"text","text":" contain "},{"kind":"link","target":{"id":"java.nio.file.StandardCopyOption#ATOMIC_MOVE","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/StandardCopyOption.html#ATOMIC_MOVE"},"code":true,"children":[{"kind":"text","text":"StandardCopyOption.ATOMIC_MOVE"}]},{"kind":"text","text":" but file cannot be moved atomically"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case of IO error"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Moves (renames) source file to target file."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Moves (renames) source file to target file."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":290}},{"id":"org.graalvm.polyglot.io.FileSystem#createLink(java.nio.file.Path,java.nio.file.Path)","anchor":"createLink(java.nio.file.Path,java.nio.file.Path)","kind":"method","name":"createLink","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"createLink"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"link"},{"kind":"punct","text":", "},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"existing"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"link","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path to link to create"}]}]},{"name":"existing","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path to existing file"}]}]}],"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if links are not supported by file system"}]}]},{"type":[{"kind":"type","text":"FileAlreadyExistsException","ref":"java.nio.file.FileAlreadyExistsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/FileAlreadyExistsException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a file on given link path already exists"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case of IO error"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Creates a new link for an existing file."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new link for an existing file."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":305}},{"id":"org.graalvm.polyglot.io.FileSystem#createSymbolicLink(java.nio.file.Path,java.nio.file.Path,java.nio.file.attribute.FileAttribute...)","anchor":"createSymbolicLink(java.nio.file.Path,java.nio.file.Path,java.nio.file.attribute.FileAttribute...)","kind":"method","name":"createSymbolicLink","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"createSymbolicLink"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"link"},{"kind":"punct","text":", "},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"target"},{"kind":"punct","text":", "},{"kind":"type","text":"FileAttribute","ref":"java.nio.file.attribute.FileAttribute","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/attribute/FileAttribute.html"},{"kind":"punct","text":"<?>... "},{"kind":"param","text":"attrs"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"link","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path to symbolic link to create"}]}]},{"name":"target","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the target path of the symbolic link"}]}]},{"name":"attrs","type":[{"kind":"type","text":"FileAttribute","ref":"java.nio.file.attribute.FileAttribute","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/attribute/FileAttribute.html"},{"kind":"punct","text":"<?>..."}],"varargs":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the optional attributes to set atomically when creating the new symbolic link"}]}]}],"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if symbolic links are not supported by file system"}]}]},{"type":[{"kind":"type","text":"FileAlreadyExistsException","ref":"java.nio.file.FileAlreadyExistsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/FileAlreadyExistsException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if a file on given link path already exists"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case of IO error"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Creates a new symbolic link."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new symbolic link."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":321}},{"id":"org.graalvm.polyglot.io.FileSystem#readSymbolicLink(java.nio.file.Path)","anchor":"readSymbolicLink(java.nio.file.Path)","kind":"method","name":"readSymbolicLink","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"name","text":"readSymbolicLink"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"link"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"link","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path to symbolic link to read"}]}]}],"returns":{"type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},"code":true,"children":[{"kind":"text","text":"Path"}]},{"kind":"text","text":" representing the symbolic link target"}]}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if symbolic links are not supported by file system"}]}]},{"type":[{"kind":"type","text":"NotLinkException","ref":"java.nio.file.NotLinkException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/NotLinkException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the "},{"kind":"code","text":"link"},{"kind":"text","text":" does not denote a symbolic link"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case of IO error"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Reads the target of the symbolic link."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Reads the target of the symbolic link."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":336}},{"id":"org.graalvm.polyglot.io.FileSystem#setCurrentWorkingDirectory(java.nio.file.Path)","anchor":"setCurrentWorkingDirectory(java.nio.file.Path)","kind":"method","name":"setCurrentWorkingDirectory","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"setCurrentWorkingDirectory"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"currentWorkingDirectory"},{"kind":"punct","text":")"}],"params":[{"name":"currentWorkingDirectory","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the new current working directory"}]}]}],"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if setting of the current working directory is not supported"}]}]},{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the "},{"kind":"code","text":"currentWorkingDirectory"},{"kind":"text","text":" is not a valid current working directory"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if "},{"kind":"code","text":"currentWorkingDirectory"},{"kind":"text","text":" is not readable"}]}]}],"doc":{"summary":[{"kind":"text","text":"Sets the current working directory."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets the current working directory. The current working directory is used to resolve non absolute paths in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" operations."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":352}},{"id":"org.graalvm.polyglot.io.FileSystem#getSeparator()","anchor":"getSeparator()","kind":"method","name":"getSeparator","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getSeparator"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the name separator"}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the name separator used to separate names in a path string."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the name separator used to separate names in a path string. The separator is used when creating path strings by invoking the "},{"kind":"link","target":{"id":"java.nio.file.Path#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html#toString()"},"code":true,"children":[{"kind":"text","text":"toString()"}]},{"kind":"text","text":" method."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":363}},{"id":"org.graalvm.polyglot.io.FileSystem#getPathSeparator()","anchor":"getPathSeparator()","kind":"method","name":"getPathSeparator","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getPathSeparator"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path separator"}]}]},"doc":{"summary":[{"kind":"text","text":"Returns the path separator used to separate filenames in a path list."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the path separator used to separate filenames in a path list. On UNIX the path separator is "},{"kind":"code","text":"':'"},{"kind":"text","text":". On Windows it's "},{"kind":"code","text":"';'"},{"kind":"text","text":"."}]}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":374}},{"id":"org.graalvm.polyglot.io.FileSystem#getMimeType(java.nio.file.Path)","anchor":"getMimeType(java.nio.file.Path)","kind":"method","name":"getMimeType","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getMimeType"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"path"},{"kind":"punct","text":")"}],"params":[{"name":"path","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the file to find a MIME type for"}]}]}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the MIME type or "},{"kind":"code","text":"null"},{"kind":"text","text":" if the MIME type is not recognized or the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"filesystem"}]},{"kind":"text","text":" does not support MIME type detection"}]}]},"doc":{"summary":[{"kind":"text","text":"Returns a MIME type for given path."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns a MIME type for given path. An optional operation for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"filesystem"}]},{"kind":"text","text":" implementations which can provide MIME types in an efficient way."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":387}},{"id":"org.graalvm.polyglot.io.FileSystem#getEncoding(java.nio.file.Path)","anchor":"getEncoding(java.nio.file.Path)","kind":"method","name":"getEncoding","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"type","text":"Charset","ref":"java.nio.charset.Charset","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/charset/Charset.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getEncoding"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"path"},{"kind":"punct","text":")"}],"params":[{"name":"path","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the file to find an file encoding for"}]}]}],"returns":{"type":[{"kind":"type","text":"Charset","ref":"java.nio.charset.Charset","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/charset/Charset.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the file encoding or "},{"kind":"code","text":"null"},{"kind":"text","text":" if the file encoding is not detected or the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"filesystem"}]},{"kind":"text","text":" does not support file encoding detection"}]}]},"doc":{"summary":[{"kind":"text","text":"Returns an file encoding for given path."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns an file encoding for given path. An optional operation for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"filesystem"}]},{"kind":"text","text":" implementations which can provide file encodings in an efficient way."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":401}},{"id":"org.graalvm.polyglot.io.FileSystem#getTempDirectory()","anchor":"getTempDirectory()","kind":"method","name":"getTempDirectory","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getTempDirectory"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns the default temporary directory."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the default temporary directory."}]}]},"since":"19.3.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":411}},{"id":"org.graalvm.polyglot.io.FileSystem#isSameFile(java.nio.file.Path,java.nio.file.Path,java.nio.file.LinkOption...)","anchor":"isSameFile(java.nio.file.Path,java.nio.file.Path,java.nio.file.LinkOption...)","kind":"method","name":"isSameFile","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isSameFile"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"path1"},{"kind":"punct","text":", "},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"path2"},{"kind":"punct","text":", "},{"kind":"type","text":"LinkOption","ref":"java.nio.file.LinkOption","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/LinkOption.html"},{"kind":"punct","text":"... "},{"kind":"param","text":"options"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"path1","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path to the file"}]}]},{"name":"path2","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the other path"}]}]},{"name":"options","type":[{"kind":"type","text":"LinkOption","ref":"java.nio.file.LinkOption","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/LinkOption.html"},{"kind":"punct","text":"..."}],"varargs":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the options determining how the symbolic links should be handled"}]}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" if the given paths refer to the same physical file"}]}]},"throws":[{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"in case of IO error"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if this "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Tests if the given paths refer to the same physical file."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Tests if the given paths refer to the same physical file. The default implementation firstly converts the paths into absolute paths. If the absolute paths are equal it returns "},{"kind":"code","text":"true"},{"kind":"text","text":" without checking if the file exists. Otherwise, this method converts the paths into canonical representations and tests the canonical paths for equality. The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" may re-implement the method with a more efficient test. When re-implemented the method must have the same security privileges as the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#toAbsolutePath(java.nio.file.Path)"},"code":true,"children":[{"kind":"text","text":"toAbsolutePath"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#toRealPath(java.nio.file.Path,java.nio.file.LinkOption...)"},"code":true,"children":[{"kind":"text","text":"toRealPath"}]},{"kind":"text","text":"."}]}]},"since":"20.2.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":434}},{"id":"org.graalvm.polyglot.io.FileSystem#getFileStoreTotalSpace(java.nio.file.Path)","anchor":"getFileStoreTotalSpace(java.nio.file.Path)","kind":"method","name":"getFileStoreTotalSpace","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"name","text":"getFileStoreTotalSpace"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"path"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"path","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path whose file store size is to be determined"}]}]}],"returns":{"type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the size of the file store in bytes"}]}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the file system does not support retrieving file store information"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if an I/O error occurs while accessing the file store"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" implementation denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the size, in bytes, of the file store that contains the given "},{"kind":"code","text":"path"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the size, in bytes, of the file store that contains the given "},{"kind":"code","text":"path"},{"kind":"text","text":". If the file store's size exceeds "},{"kind":"link","target":{"id":"java.lang.Long#MAX_VALUE","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Long.html#MAX_VALUE"},"code":true,"children":[{"kind":"text","text":"Long.MAX_VALUE"}]},{"kind":"text","text":", "},{"kind":"code","text":"Long.MAX_VALUE"},{"kind":"text","text":" is returned."}]}]},"since":"25.0.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":453}},{"id":"org.graalvm.polyglot.io.FileSystem#getFileStoreUnallocatedSpace(java.nio.file.Path)","anchor":"getFileStoreUnallocatedSpace(java.nio.file.Path)","kind":"method","name":"getFileStoreUnallocatedSpace","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"name","text":"getFileStoreUnallocatedSpace"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"path"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"path","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path whose file store is to be queried"}]}]}],"returns":{"type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the number of unallocated bytes"}]}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the file system does not support retrieving file store information"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if an I/O error occurs while accessing the file store"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" implementation denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the number of unallocated bytes in the file store that contains the given "},{"kind":"code","text":"path"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the number of unallocated bytes in the file store that contains the given "},{"kind":"code","text":"path"},{"kind":"text","text":". The returned value represents the raw free space on the storage device, regardless of access permissions or user quotas. If the number of unallocated bytes exceeds "},{"kind":"link","target":{"id":"java.lang.Long#MAX_VALUE","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Long.html#MAX_VALUE"},"code":true,"children":[{"kind":"text","text":"Long.MAX_VALUE"}]},{"kind":"text","text":", "},{"kind":"code","text":"Long.MAX_VALUE"},{"kind":"text","text":" is returned. Note that the value may be imprecise, as it can change at any time due to external I/O operations, including those performed outside this virtual machine."}]}]},"since":"25.0.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":473}},{"id":"org.graalvm.polyglot.io.FileSystem#getFileStoreUsableSpace(java.nio.file.Path)","anchor":"getFileStoreUsableSpace(java.nio.file.Path)","kind":"method","name":"getFileStoreUsableSpace","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"name","text":"getFileStoreUsableSpace"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"path"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"path","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path whose file store is to be queried"}]}]}],"returns":{"type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the number of usable bytes available to this Java virtual machine"}]}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the file system does not support retrieving file store information"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if an I/O error occurs while accessing the file store"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" implementation denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the number of bytes available to this Java virtual machine on the file store that contains the given "},{"kind":"code","text":"path"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the number of bytes available to this Java virtual machine on the file store that contains the given "},{"kind":"code","text":"path"},{"kind":"text","text":". Unlike "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#getFileStoreUnallocatedSpace(java.nio.file.Path)"},"code":true,"children":[{"kind":"text","text":"getFileStoreUnallocatedSpace(Path)"}]},{"kind":"text","text":", this method accounts for operating system level restrictions, user quotas, and file system permissions, and therefore may return a smaller value. If the available space exceeds "},{"kind":"link","target":{"id":"java.lang.Long#MAX_VALUE","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Long.html#MAX_VALUE"},"code":true,"children":[{"kind":"text","text":"Long.MAX_VALUE"}]},{"kind":"text","text":", "},{"kind":"code","text":"Long.MAX_VALUE"},{"kind":"text","text":" is returned. Note that the returned value may be imprecise, as it can change at any time due to external I/O activity, including operations performed outside this virtual machine."}]}]},"since":"25.0.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":494}},{"id":"org.graalvm.polyglot.io.FileSystem#getFileStoreBlockSize(java.nio.file.Path)","anchor":"getFileStoreBlockSize(java.nio.file.Path)","kind":"method","name":"getFileStoreBlockSize","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"name","text":"getFileStoreBlockSize"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"path"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"path","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path whose file store is to be queried"}]}]}],"returns":{"type":[{"kind":"keyword","text":"long"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the block size"}]}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the file system does not support retrieving file store information"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if an I/O error occurs while accessing the file store"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" implementation denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the number of bytes per block in the file store that contains the given "},{"kind":"code","text":"path"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the number of bytes per block in the file store that contains the given "},{"kind":"code","text":"path"},{"kind":"text","text":"."}]}]},"since":"25.0.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":509}},{"id":"org.graalvm.polyglot.io.FileSystem#isFileStoreReadOnly(java.nio.file.Path)","anchor":"isFileStoreReadOnly(java.nio.file.Path)","kind":"method","name":"isFileStoreReadOnly","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isFileStoreReadOnly"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"path"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"path","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path whose file store is to be queried"}]}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the file system does not support retrieving file store information"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if an I/O error occurs while accessing the file store"}]}]},{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" implementation denied the operation"}]}]}],"doc":{"summary":[{"kind":"text","text":"Determines whether the file store containing the given "},{"kind":"code","text":"path"},{"kind":"text","text":" is read-only."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Determines whether the file store containing the given "},{"kind":"code","text":"path"},{"kind":"text","text":" is read-only."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Note that even if the file store is not read-only, individual write operations may still be denied due to restrictions imposed by the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" implementation, operating system level policies, user quotas, or file system permissions."}]}]},"since":"25.0.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":527}},{"id":"org.graalvm.polyglot.io.FileSystem#newDefaultFileSystem()","anchor":"newDefaultFileSystem()","kind":"method","name":"newDefaultFileSystem","modifiers":["static"],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"},{"kind":"punct","text":" "},{"kind":"name","text":"newDefaultFileSystem"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"}]},"doc":{"summary":[{"kind":"text","text":"Creates a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" implementation based on the host Java NIO."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" implementation based on the host Java NIO. The returned instance can be used as a delegate by a decorating "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"For an untrusted code execution, access to the host filesystem should be prevented either by using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess#NONE"},"code":true,"children":[{"kind":"text","text":"IOAccess.NONE"}]},{"kind":"text","text":" or an "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#newFileSystem(java.nio.file.FileSystem)"},"code":true,"children":[{"kind":"text","text":"newFileSystem(java.nio.file.FileSystem)"}]},{"kind":"text","text":" in-memory filesystem}. For more details on executing untrusted code, see the "},{"kind":"link","url":"https://www.graalvm.org/dev/security-guide/polyglot-sandbox/","children":[{"kind":"text","text":"Polyglot Sandboxing Security Guide"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The following example shows a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" logging filesystem operations."}]},{"kind":"code","text":"class TracingFileSystem implements FileSystem {\n\n    private static final Logger LOGGER = Logger.getLogger(TracingFileSystem.class.getName());\n\n    private final FileSystem delegate;\n\n    TracingFileSystem() {\n        this.delegate = FileSystem.newDefaultFileSystem();\n    }\n\n    @Override\n    public Path parsePath(String path) {\n        return delegate.parsePath(path);\n    }\n\n    @Override\n    public Path parsePath(URI uri) {\n        return delegate.parsePath(uri);\n    }\n\n    @Override\n    public SeekableByteChannel newByteChannel(Path path,\n                                              Set<? extends OpenOption> options,\n                                              FileAttribute<?>... attrs) throws IOException {\n        boolean success = false;\n        try {\n            SeekableByteChannel result =  delegate.newByteChannel(path, options, attrs);\n            success = true;\n            return result;\n        } finally {\n            trace(\"newByteChannel\", path, success);\n        }\n    }\n\n    ...\n\n    private void trace(String operation, Path path, boolean success) {\n        LOGGER.log(Level.FINE, \"The {0} request for the path {1} {2}.\",new Object[] {\n                        operation, path, success ? \"was successful\" : \"failed\"\n                });\n    }\n}"}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess$Builder#fileSystem(org.graalvm.polyglot.io.FileSystem)"},"code":true,"children":[{"kind":"text","text":"Builder.fileSystem(FileSystem)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowIO(org.graalvm.polyglot.io.IOAccess)"},"code":true,"children":[{"kind":"text","text":"org.graalvm.polyglot.Context.Builder.allowIO(IOAccess)"}]}]]},"since":"20.2.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":593}},{"id":"org.graalvm.polyglot.io.FileSystem#allowLanguageHomeAccess(org.graalvm.polyglot.io.FileSystem)","anchor":"allowLanguageHomeAccess(org.graalvm.polyglot.io.FileSystem)","kind":"method","name":"allowLanguageHomeAccess","modifiers":["static"],"annotations":[[{"kind":"annotation","text":"@Deprecated","ref":"java.lang.Deprecated","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Deprecated.html"}]],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"},{"kind":"punct","text":" "},{"kind":"name","text":"allowLanguageHomeAccess"},{"kind":"punct","text":"("},{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"},{"kind":"punct","text":" "},{"kind":"param","text":"fileSystem"},{"kind":"punct","text":")"}],"params":[{"name":"fileSystem","type":[{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"}]}],"returns":{"type":[{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"}]},"throws":[{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"when the "},{"kind":"code","text":"fileSystem"},{"kind":"text","text":" does not use the same "},{"kind":"link","target":{"id":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},"code":true,"children":[{"kind":"text","text":"Path"}]},{"kind":"text","text":" type or has a different "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#getSeparator()"},"code":true,"children":[{"kind":"text","text":"separator"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#getPathSeparator()"},"code":true,"children":[{"kind":"text","text":"path separator"}]},{"kind":"text","text":" as the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#newDefaultFileSystem()"},"code":true,"children":[{"kind":"text","text":"default file system"}]},{"kind":"text","text":"."}]}]}],"doc":{"summary":[{"kind":"text","text":"Decorates the given "},{"kind":"code","text":"fileSystem"},{"kind":"text","text":" by an implementation that forwards access to files in the language home to the default file system."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Decorates the given "},{"kind":"code","text":"fileSystem"},{"kind":"text","text":" by an implementation that forwards access to files in the language home to the default file system. The method is intended to be used by custom filesystem implementations with non default storage to allow guest languages to access files in the languages homes. As the returned filesystem uses a default file system to access files in the language home, the "},{"kind":"code","text":"fileSystem"},{"kind":"text","text":" has to use the same "},{"kind":"link","target":{"id":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},"code":true,"children":[{"kind":"text","text":"Path"}]},{"kind":"text","text":" type, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#getSeparator()"},"code":true,"children":[{"kind":"text","text":"separator"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#getPathSeparator()"},"code":true,"children":[{"kind":"text","text":"path separator"}]},{"kind":"text","text":" as the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#newDefaultFileSystem()"},"code":true,"children":[{"kind":"text","text":"default filesystem"}]},{"kind":"text","text":"."}]}]},"deprecated":{"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"Use "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#allowInternalResources(org.graalvm.polyglot.io.FileSystem)"},"code":true,"children":[{"kind":"text","text":"allowInternalResources(FileSystem)"}]},{"kind":"text","text":" instead to expose language homes and other internal resources through a read-only view."}]}]},"since":"22.2","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":614}},{"id":"org.graalvm.polyglot.io.FileSystem#allowInternalResourceAccess(org.graalvm.polyglot.io.FileSystem)","anchor":"allowInternalResourceAccess(org.graalvm.polyglot.io.FileSystem)","kind":"method","name":"allowInternalResourceAccess","modifiers":["static"],"annotations":[[{"kind":"annotation","text":"@Deprecated","ref":"java.lang.Deprecated","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Deprecated.html"},{"kind":"punct","text":"("},{"kind":"param","text":"since"},{"kind":"punct","text":" = "},{"kind":"literal","text":"\"25.1\""},{"kind":"punct","text":")"}]],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"},{"kind":"punct","text":" "},{"kind":"name","text":"allowInternalResourceAccess"},{"kind":"punct","text":"("},{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"},{"kind":"punct","text":" "},{"kind":"param","text":"fileSystem"},{"kind":"punct","text":")"}],"params":[{"name":"fileSystem","type":[{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the file system used to access files that are not internal resources"}]}]}],"returns":{"type":[{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"}]},"throws":[{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"when the "},{"kind":"code","text":"fileSystem"},{"kind":"text","text":" does not use the same "},{"kind":"link","target":{"id":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},"code":true,"children":[{"kind":"text","text":"Path"}]},{"kind":"text","text":" type or has a different "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#getSeparator()"},"code":true,"children":[{"kind":"text","text":"separator"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#getPathSeparator()"},"code":true,"children":[{"kind":"text","text":"path separator"}]},{"kind":"text","text":" as the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#newDefaultFileSystem()"},"code":true,"children":[{"kind":"text","text":"default file system"}]},{"kind":"text","text":"."}]}]}],"doc":{"summary":[{"kind":"text","text":"Decorates the given "},{"kind":"code","text":"fileSystem"},{"kind":"text","text":" by an implementation that forwards access to the internal resources, including language homes, to the default file system."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Decorates the given "},{"kind":"code","text":"fileSystem"},{"kind":"text","text":" by an implementation that forwards access to the internal resources, including language homes, to the default file system. The method is intended to be used by custom file system implementations with non-default storage to allow guest languages to access internal resources. As the returned file system uses a default file system to access internal resources, the "},{"kind":"code","text":"fileSystem"},{"kind":"text","text":" has to use the same "},{"kind":"link","target":{"id":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},"code":true,"children":[{"kind":"text","text":"Path"}]},{"kind":"text","text":" type, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#getSeparator()"},"code":true,"children":[{"kind":"text","text":"separator"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#getPathSeparator()"},"code":true,"children":[{"kind":"text","text":"path separator"}]},{"kind":"text","text":" as the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#newDefaultFileSystem()"},"code":true,"children":[{"kind":"text","text":"default file system"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"This method preserves the historical behavior and does not make internal resources read-only: write operations for internal resource paths are forwarded to the default file system and are subject to its permissions."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#copyResources(java.nio.file.Path,java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"Engine.copyResources(Path, String...)"}]}]]},"deprecated":{"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"Use "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#allowInternalResources(org.graalvm.polyglot.io.FileSystem)"},"code":true,"children":[{"kind":"text","text":"allowInternalResources(FileSystem)"}]},{"kind":"text","text":" instead when migrating code that only reads internal resources. The replacement exposes internal resources and language homes through a read-only view. Code that needs mutable files based on internal resources should copy the resources to an application-controlled location, for example with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#copyResources(java.nio.file.Path,java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"Engine.copyResources(Path, String...)"}]},{"kind":"text","text":", and expose that location through its configured "},{"kind":"code","text":"fileSystem"},{"kind":"text","text":"."}]}],"since":"25.1"},"since":"24.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":646}},{"id":"org.graalvm.polyglot.io.FileSystem#allowInternalResources(org.graalvm.polyglot.io.FileSystem)","anchor":"allowInternalResources(org.graalvm.polyglot.io.FileSystem)","kind":"method","name":"allowInternalResources","modifiers":["static"],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"},{"kind":"punct","text":" "},{"kind":"name","text":"allowInternalResources"},{"kind":"punct","text":"("},{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"},{"kind":"punct","text":" "},{"kind":"param","text":"fileSystem"},{"kind":"punct","text":")"}],"params":[{"name":"fileSystem","type":[{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the file system used to access files that are not internal resources"}]}]}],"returns":{"type":[{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"}]},"throws":[{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"when the "},{"kind":"code","text":"fileSystem"},{"kind":"text","text":" does not use the same "},{"kind":"link","target":{"id":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},"code":true,"children":[{"kind":"text","text":"Path"}]},{"kind":"text","text":" type or has a different "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#getSeparator()"},"code":true,"children":[{"kind":"text","text":"separator"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#getPathSeparator()"},"code":true,"children":[{"kind":"text","text":"path separator"}]},{"kind":"text","text":" as the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#newDefaultFileSystem()"},"code":true,"children":[{"kind":"text","text":"default file system"}]},{"kind":"text","text":"."}]}]}],"doc":{"summary":[{"kind":"text","text":"Decorates the given "},{"kind":"code","text":"fileSystem"},{"kind":"text","text":" by an implementation that forwards access to the internal resources, including language homes, to the default file system."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Decorates the given "},{"kind":"code","text":"fileSystem"},{"kind":"text","text":" by an implementation that forwards access to the internal resources, including language homes, to the default file system. The method is intended to be used by custom file system implementations with non-default storage to allow guest languages to access internal resources. As the returned file system uses a default file system to access internal resources, the "},{"kind":"code","text":"fileSystem"},{"kind":"text","text":" has to use the same "},{"kind":"link","target":{"id":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},"code":true,"children":[{"kind":"text","text":"Path"}]},{"kind":"text","text":" type, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#getSeparator()"},"code":true,"children":[{"kind":"text","text":"separator"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#getPathSeparator()"},"code":true,"children":[{"kind":"text","text":"path separator"}]},{"kind":"text","text":" as the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#newDefaultFileSystem()"},"code":true,"children":[{"kind":"text","text":"default file system"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Internal resources and language homes are exposed through a read-only view of the default file system. Write operations, such as creating, deleting, or modifying files or directories, are rejected for internal resource paths. Paths that are not internal resources continue to be handled by "},{"kind":"code","text":"fileSystem"},{"kind":"text","text":" and retain its access permissions."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#copyResources(java.nio.file.Path,java.lang.String...)"},"code":true,"children":[{"kind":"text","text":"Engine.copyResources(Path, String...)"}]}]]},"since":"25.1","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":673}},{"id":"org.graalvm.polyglot.io.FileSystem#newReadOnlyFileSystem(org.graalvm.polyglot.io.FileSystem)","anchor":"newReadOnlyFileSystem(org.graalvm.polyglot.io.FileSystem)","kind":"method","name":"newReadOnlyFileSystem","modifiers":["static"],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"},{"kind":"punct","text":" "},{"kind":"name","text":"newReadOnlyFileSystem"},{"kind":"punct","text":"("},{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"},{"kind":"punct","text":" "},{"kind":"param","text":"fileSystem"},{"kind":"punct","text":")"}],"params":[{"name":"fileSystem","type":[{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"}]}],"returns":{"type":[{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"}]},"doc":{"summary":[{"kind":"text","text":"Decorates the given "},{"kind":"code","text":"fileSystem"},{"kind":"text","text":" by an implementation that makes the passed "},{"kind":"code","text":"fileSystem"},{"kind":"text","text":" read-only by forbidding all write operations."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Decorates the given "},{"kind":"code","text":"fileSystem"},{"kind":"text","text":" by an implementation that makes the passed "},{"kind":"code","text":"fileSystem"},{"kind":"text","text":" read-only by forbidding all write operations. This method can be used to make an existing file system, such as the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#newDefaultFileSystem()"},"code":true,"children":[{"kind":"text","text":"default filesystem"}]},{"kind":"text","text":", read-only."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Making the default file system read-only still exposes host files and does not make it suitable for a sandbox policy that prohibits host file access."}]}]},"since":"22.2","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":688}},{"id":"org.graalvm.polyglot.io.FileSystem#newFileSystem(java.nio.file.FileSystem)","anchor":"newFileSystem(java.nio.file.FileSystem)","kind":"method","name":"newFileSystem","modifiers":["static"],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"},{"kind":"punct","text":" "},{"kind":"name","text":"newFileSystem"},{"kind":"punct","text":"("},{"kind":"type","text":"FileSystem","ref":"java.nio.file.FileSystem","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/FileSystem.html"},{"kind":"punct","text":" "},{"kind":"param","text":"fileSystem"},{"kind":"punct","text":")"}],"params":[{"name":"fileSystem","type":[{"kind":"type","text":"FileSystem","ref":"java.nio.file.FileSystem","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/FileSystem.html"}]}],"returns":{"type":[{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"}]},"doc":{"summary":[{"kind":"text","text":"Creates a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" implementation based on the given Java NIO filesystem."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" implementation based on the given Java NIO filesystem. The returned "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" delegates all operations to "},{"kind":"code","text":"fileSystem"},{"kind":"text","text":"'s "},{"kind":"link","target":{"id":"java.nio.file.spi.FileSystemProvider","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/spi/FileSystemProvider.html"},"code":true,"children":[{"kind":"text","text":"provider"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The returned file system has access to all resources exposed by the supplied Java NIO file system. In particular, passing "},{"kind":"link","target":{"id":"java.nio.file.FileSystems#getDefault()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/FileSystems.html#getDefault()"},"code":true,"children":[{"kind":"text","text":"java.nio.file.FileSystems.getDefault()"}]},{"kind":"text","text":" exposes the host file system and is not suitable for a sandbox policy that prohibits host file access."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The following example shows how to configure "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]},{"kind":"text","text":" so that languages read files from a prepared zip file."}]},{"kind":"code","text":"Path zipFile = Paths.get(\"filesystem.zip\");\ntry (java.nio.file.FileSystem nioFs = FileSystems.newFileSystem(zipFile)) {\n    IOAccess ioAccess = IOAccess.newBuilder().fileSystem(FileSystem.newFileSystem(nioFs)).build();\n    try (Context ctx = Context.newBuilder().allowIO(ioAccess).build()) {\n        Value result = ctx.eval(\"js\", \"load('scripts/app.sh'); execute()\");\n    }\n}"}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess"},"code":true,"children":[{"kind":"text","text":"IOAccess"}]}]]},"since":"23.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":718}},{"id":"org.graalvm.polyglot.io.FileSystem#newDenyIOFileSystem()","anchor":"newDenyIOFileSystem()","kind":"method","name":"newDenyIOFileSystem","modifiers":["static"],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"},{"kind":"punct","text":" "},{"kind":"name","text":"newDenyIOFileSystem"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"}]},"doc":{"summary":[{"kind":"text","text":"Creates a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" that denies all file operations except for path parsing."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" that denies all file operations except for path parsing. Any attempt to perform file operations such as reading, writing, or deletion will result in a "},{"kind":"link","target":{"id":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"},"code":true,"children":[{"kind":"text","text":"SecurityException"}]},{"kind":"text","text":" being thrown."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Typically, this file system does not need to be explicitly installed to restrict access to host file systems. Instead, use "},{"kind":"code","text":"Context.newBuilder().allowIO(IOAccess.NONE)"},{"kind":"text","text":". This method is intended primarily for use as a fallback file system in a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#newCompositeFileSystem(org.graalvm.polyglot.io.FileSystem,org.graalvm.polyglot.io.FileSystem.Selector...)"},"code":true,"children":[{"kind":"text","text":"composite file system"}]},{"kind":"text","text":"."}]}]},"since":"24.2","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":734}},{"id":"org.graalvm.polyglot.io.FileSystem#newCompositeFileSystem(org.graalvm.polyglot.io.FileSystem,org.graalvm.polyglot.io.FileSystem.Selector...)","anchor":"newCompositeFileSystem(org.graalvm.polyglot.io.FileSystem,org.graalvm.polyglot.io.FileSystem.Selector...)","kind":"method","name":"newCompositeFileSystem","modifiers":["static"],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"},{"kind":"punct","text":" "},{"kind":"name","text":"newCompositeFileSystem"},{"kind":"punct","text":"("},{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"},{"kind":"punct","text":" "},{"kind":"param","text":"fallbackFileSystem"},{"kind":"punct","text":", "},{"kind":"type","text":"FileSystem.Selector","ref":"org.graalvm.polyglot.io.FileSystem$Selector"},{"kind":"punct","text":"... "},{"kind":"param","text":"delegates"},{"kind":"punct","text":")"}],"params":[{"name":"fallbackFileSystem","type":[{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"}]},{"name":"delegates","type":[{"kind":"type","text":"FileSystem.Selector","ref":"org.graalvm.polyglot.io.FileSystem$Selector"},{"kind":"punct","text":"..."}],"varargs":true}],"returns":{"type":[{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"}]},"throws":[{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the file systems do not use the same "},{"kind":"link","target":{"id":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},"code":true,"children":[{"kind":"text","text":"Path"}]},{"kind":"text","text":" type, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#getSeparator()"},"code":true,"children":[{"kind":"text","text":"separator"}]},{"kind":"text","text":", or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#getPathSeparator()"},"code":true,"children":[{"kind":"text","text":"path separator"}]}]}]}],"doc":{"summary":[{"kind":"text","text":"Creates a composite "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" that delegates operations to the provided "},{"kind":"code","text":"delegates"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a composite "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" that delegates operations to the provided "},{"kind":"code","text":"delegates"},{"kind":"text","text":". The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" of the first "},{"kind":"code","text":"delegate"},{"kind":"text","text":" whose "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem$Selector#test(java.nio.file.Path)"},"code":true,"children":[{"kind":"text","text":"Selector.test(Path)"}]},{"kind":"text","text":" method accepts the path is used for the file system operation. If no "},{"kind":"code","text":"delegate"},{"kind":"text","text":" accepts the path, the "},{"kind":"code","text":"fallbackFileSystem"},{"kind":"text","text":" is used."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The "},{"kind":"code","text":"fallbackFileSystem"},{"kind":"text","text":" is responsible for parsing "},{"kind":"link","target":{"id":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},"code":true,"children":[{"kind":"text","text":"Path"}]},{"kind":"text","text":" objects. All provided file systems must use the same "},{"kind":"link","target":{"id":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},"code":true,"children":[{"kind":"text","text":"Path"}]},{"kind":"text","text":" type, "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#getSeparator()"},"code":true,"children":[{"kind":"text","text":"separator"}]},{"kind":"text","text":", and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#getPathSeparator()"},"code":true,"children":[{"kind":"text","text":"path separator"}]},{"kind":"text","text":". If any file system does not meet this requirement, an "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" is thrown."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The composite file system maintains its own notion of the current working directory and ensures that the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem#setCurrentWorkingDirectory(java.nio.file.Path)"},"code":true,"children":[{"kind":"text","text":"setCurrentWorkingDirectory(Path)"}]},{"kind":"text","text":" method is not invoked on any of the delegates. When a request to set the current working directory is received, the composite file system verifies that the specified path corresponds to an existing directory by consulting either the appropriate delegate or the "},{"kind":"code","text":"fallbackFileSystem"},{"kind":"text","text":". If an explicit current working directory has been set, the composite file system normalizes and resolves all relative paths to absolute paths prior to delegating operations. Conversely, if no explicit current working directory is set, the composite file system directly forwards the incoming path, whether relative or absolute, to the appropriate delegate. Furthermore, when an explicit current working directory is set, the composite file system does not delegate "},{"kind":"code","text":"toAbsolutePath"},{"kind":"text","text":" operations, as delegates do not maintain an independent notion of the current working directory. If the current working directory is unset, "},{"kind":"code","text":"toAbsolutePath"},{"kind":"text","text":" operations are delegated to the "},{"kind":"code","text":"fallbackFileSystem"},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Operations that are independent of path context, including "},{"kind":"code","text":"getTempDirectory"},{"kind":"text","text":", "},{"kind":"code","text":"getSeparator"},{"kind":"text","text":", and "},{"kind":"code","text":"getPathSeparator"},{"kind":"text","text":", are handled exclusively by the "},{"kind":"code","text":"fallbackFileSystem"},{"kind":"text","text":"."}]}]},"since":"24.2","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":771}}],"doc":{"summary":[{"kind":"text","text":"Service-provider for "},{"kind":"code","text":"Truffle"},{"kind":"text","text":" files."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Service-provider for "},{"kind":"code","text":"Truffle"},{"kind":"text","text":" files."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":80}},{"id":"org.graalvm.polyglot.io.FileSystem$Selector","name":"FileSystem.Selector","kind":"class","language":"java","modifiers":["public","abstract"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"abstract"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"FileSystem.Selector"},{"kind":"punct","text":" "},{"kind":"keyword","text":"implements"},{"kind":"punct","text":" "},{"kind":"type","text":"Predicate","ref":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":">"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"interfaces":[[{"kind":"type","text":"Predicate","ref":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":">"}]],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"enclosing":"org.graalvm.polyglot.io.FileSystem","members":[{"id":"org.graalvm.polyglot.io.FileSystem$Selector#<init>(org.graalvm.polyglot.io.FileSystem)","anchor":"<init>(org.graalvm.polyglot.io.FileSystem)","kind":"constructor","name":"Selector","modifiers":["protected"],"signature":[{"kind":"keyword","text":"protected"},{"kind":"punct","text":" "},{"kind":"name","text":"Selector"},{"kind":"punct","text":"("},{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"},{"kind":"punct","text":" "},{"kind":"param","text":"fileSystem"},{"kind":"punct","text":")"}],"params":[{"name":"fileSystem","type":[{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"}]}],"doc":{"summary":[{"kind":"text","text":"Creates a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem$Selector"},"code":true,"children":[{"kind":"text","text":"Selector"}]},{"kind":"text","text":" for the specified "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem$Selector"},"code":true,"children":[{"kind":"text","text":"Selector"}]},{"kind":"text","text":" for the specified "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":"."}]}]},"since":"24.2","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":791}},{"id":"org.graalvm.polyglot.io.FileSystem$Selector#getFileSystem()","anchor":"getFileSystem()","kind":"method","name":"getFileSystem","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"},{"kind":"punct","text":" "},{"kind":"name","text":"getFileSystem"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"}]},"doc":{"summary":[{"kind":"text","text":"Returns the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" associated with this selector."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" associated with this selector."}]}]},"since":"24.2","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":800}},{"id":"org.graalvm.polyglot.io.FileSystem$Selector#test(java.nio.file.Path)","anchor":"test(java.nio.file.Path)","kind":"method","name":"test","modifiers":["public","abstract"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"abstract"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"test"},{"kind":"punct","text":"("},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":" "},{"kind":"param","text":"path"},{"kind":"punct","text":")"}],"params":[{"name":"path","type":[{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the path to test, provided as a normalized absolute path. The given "},{"kind":"code","text":"path"},{"kind":"text","text":" has no path components equal to "},{"kind":"code","text":"\".\""},{"kind":"text","text":" or "},{"kind":"code","text":"\"..\""},{"kind":"text","text":"."}]}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" if the associated "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" can handle the "},{"kind":"code","text":"path"},{"kind":"text","text":"; "},{"kind":"code","text":"false"},{"kind":"text","text":" otherwise"}]}]},"overrides":{"id":"java.util.function.Predicate#test(T)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html#test(T)"},"doc":{"summary":[{"kind":"text","text":"Tests whether the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" associated with this selector can handle operations on the specified "},{"kind":"link","target":{"id":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},"code":true,"children":[{"kind":"text","text":"Path"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Tests whether the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" associated with this selector can handle operations on the specified "},{"kind":"link","target":{"id":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},"code":true,"children":[{"kind":"text","text":"Path"}]},{"kind":"text","text":"."}]}]},"since":"24.2","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":814}},{"id":"org.graalvm.polyglot.io.FileSystem$Selector#of(org.graalvm.polyglot.io.FileSystem,java.util.function.Predicate)","anchor":"of(org.graalvm.polyglot.io.FileSystem,java.util.function.Predicate)","kind":"method","name":"of","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"FileSystem.Selector","ref":"org.graalvm.polyglot.io.FileSystem$Selector"},{"kind":"punct","text":" "},{"kind":"name","text":"of"},{"kind":"punct","text":"("},{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"},{"kind":"punct","text":" "},{"kind":"param","text":"fileSystem"},{"kind":"punct","text":", "},{"kind":"type","text":"Predicate","ref":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"predicate"},{"kind":"punct","text":")"}],"params":[{"name":"fileSystem","type":[{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" to associate with the selector"}]}]},{"name":"predicate","type":[{"kind":"type","text":"Predicate","ref":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Path","ref":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the condition to determine if the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" can handle a given path"}]}]}],"returns":{"type":[{"kind":"type","text":"FileSystem.Selector","ref":"org.graalvm.polyglot.io.FileSystem$Selector"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"a new "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem$Selector"},"code":true,"children":[{"kind":"text","text":"Selector"}]},{"kind":"text","text":" that delegates path testing to the "},{"kind":"code","text":"predicate"}]}]},"doc":{"summary":[{"kind":"text","text":"Creates a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem$Selector"},"code":true,"children":[{"kind":"text","text":"Selector"}]},{"kind":"text","text":" for the specified "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" using the provided "},{"kind":"link","target":{"id":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},"code":true,"children":[{"kind":"text","text":"Predicate"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem$Selector"},"code":true,"children":[{"kind":"text","text":"Selector"}]},{"kind":"text","text":" for the specified "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" using the provided "},{"kind":"link","target":{"id":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},"code":true,"children":[{"kind":"text","text":"Predicate"}]},{"kind":"text","text":"."}]}]},"since":"24.2","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":826}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#toString()","text":"toString","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]},{"from":{"id":"java.util.function.Predicate","text":"Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},"kind":"interface","members":[{"id":"java.util.function.Predicate#and(java.util.function.Predicate)","text":"and","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html#and(java.util.function.Predicate)"},{"id":"java.util.function.Predicate#negate()","text":"negate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html#negate()"},{"id":"java.util.function.Predicate#or(java.util.function.Predicate)","text":"or","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html#or(java.util.function.Predicate)"}]}],"doc":{"summary":[{"kind":"text","text":"A selector for determining which "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" should handle operations on a given "},{"kind":"link","target":{"id":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},"code":true,"children":[{"kind":"text","text":"Path"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"A selector for determining which "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" should handle operations on a given "},{"kind":"link","target":{"id":"java.nio.file.Path","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/file/Path.html"},"code":true,"children":[{"kind":"text","text":"Path"}]},{"kind":"text","text":". This class encapsulates a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":" and defines a condition for selecting it."}]}]},"since":"24.2","source":{"path":"org/graalvm/polyglot/io/FileSystem.java","line":782}},{"id":"org.graalvm.polyglot.io.IOAccess","name":"IOAccess","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"IOAccess"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.polyglot.io.IOAccess#NONE","anchor":"NONE","kind":"field","name":"NONE","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"IOAccess","ref":"org.graalvm.polyglot.io.IOAccess"},{"kind":"punct","text":" "},{"kind":"name","text":"NONE"}],"type":[{"kind":"type","text":"IOAccess","ref":"org.graalvm.polyglot.io.IOAccess"}],"doc":{"summary":[{"kind":"text","text":"Provides guest language no access to IO."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Provides guest language no access to IO. Guest language only has read-only access to the language's home files. The "},{"kind":"code","text":"NONE"},{"kind":"text","text":" is a default value for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]},{"kind":"text","text":"s created without "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"all access"}]},{"kind":"text","text":". If you are using this preset, the newly added privileges will default to "},{"kind":"code","text":"false"},{"kind":"text","text":" for this preset."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Equivalent of using the following builder configuration:"}]},{"kind":"code","text":"\nIOAccess.newBuilder().build();"}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/io/IOAccess.java","line":76}},{"id":"org.graalvm.polyglot.io.IOAccess#ALL","anchor":"ALL","kind":"field","name":"ALL","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"IOAccess","ref":"org.graalvm.polyglot.io.IOAccess"},{"kind":"punct","text":" "},{"kind":"name","text":"ALL"}],"type":[{"kind":"type","text":"IOAccess","ref":"org.graalvm.polyglot.io.IOAccess"}],"doc":{"summary":[{"kind":"text","text":"Provides guest language full access to host IO."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Provides guest language full access to host IO. Guest language have full access to host file system and host sockets. The "},{"kind":"code","text":"ALL"},{"kind":"text","text":" is a default value for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context"},"code":true,"children":[{"kind":"text","text":"Context"}]},{"kind":"text","text":"s created with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowAllAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"all access"}]},{"kind":"text","text":" set to "},{"kind":"code","text":"true"},{"kind":"text","text":". If you are using this preset, the newly added privileges will default to "},{"kind":"code","text":"true"},{"kind":"text","text":" for this preset."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Equivalent of using the following builder configuration:"}]},{"kind":"code","text":"\nIOAccess.newBuilder()\n          .allowHostFileAccess(true)\n          .allowHostSocketAccess(true)\n          .build();"}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/io/IOAccess.java","line":99}},{"id":"org.graalvm.polyglot.io.IOAccess#newBuilder()","anchor":"newBuilder()","kind":"method","name":"newBuilder","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"IOAccess.Builder","ref":"org.graalvm.polyglot.io.IOAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"newBuilder"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"IOAccess.Builder","ref":"org.graalvm.polyglot.io.IOAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Creates a new builder that allows to create a custom IO access configuration."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new builder that allows to create a custom IO access configuration. The builder configuration needs to be completed using the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess$Builder#build()"},"code":true,"children":[{"kind":"text","text":"method"}]},{"kind":"text","text":"."}]}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/io/IOAccess.java","line":134}},{"id":"org.graalvm.polyglot.io.IOAccess#newBuilder(org.graalvm.polyglot.io.IOAccess)","anchor":"newBuilder(org.graalvm.polyglot.io.IOAccess)","kind":"method","name":"newBuilder","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"IOAccess.Builder","ref":"org.graalvm.polyglot.io.IOAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"newBuilder"},{"kind":"punct","text":"("},{"kind":"type","text":"IOAccess","ref":"org.graalvm.polyglot.io.IOAccess"},{"kind":"punct","text":" "},{"kind":"param","text":"prototype"},{"kind":"punct","text":")"}],"params":[{"name":"prototype","type":[{"kind":"type","text":"IOAccess","ref":"org.graalvm.polyglot.io.IOAccess"}]}],"returns":{"type":[{"kind":"type","text":"IOAccess.Builder","ref":"org.graalvm.polyglot.io.IOAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Creates a new builder that allows to create a custom IO access configuration based of a preset configuration."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new builder that allows to create a custom IO access configuration based of a preset configuration. The preset configuration is copied and used as a template for the returned builder. The builder configuration needs to be completed using the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess$Builder#build()"},"code":true,"children":[{"kind":"text","text":"method"}]},{"kind":"text","text":"."}]}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/io/IOAccess.java","line":146}},{"id":"org.graalvm.polyglot.io.IOAccess#hashCode()","anchor":"hashCode()","kind":"method","name":"hashCode","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"hashCode"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"overrides":{"id":"java.lang.Object#hashCode()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},"since":"23.0","source":{"path":"org/graalvm/polyglot/io/IOAccess.java","line":155}},{"id":"org.graalvm.polyglot.io.IOAccess#equals(java.lang.Object)","anchor":"equals(java.lang.Object)","kind":"method","name":"equals","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"equals"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"obj"},{"kind":"punct","text":")"}],"params":[{"name":"obj","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"overrides":{"id":"java.lang.Object#equals(java.lang.Object)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},"since":"23.0","source":{"path":"org/graalvm/polyglot/io/IOAccess.java","line":165}},{"id":"org.graalvm.polyglot.io.IOAccess#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"23.0","source":{"path":"org/graalvm/polyglot/io/IOAccess.java","line":181}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Represents an IO access configuration of a polyglot context."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Represents an IO access configuration of a polyglot context. The IO access configuration determines how a guest language can access the host IO. The access to host IO can be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess#NONE"},"code":true,"children":[{"kind":"text","text":"disabled"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess#ALL"},"code":true,"children":[{"kind":"text","text":"enabled"}]},{"kind":"text","text":", or virtualized using a custom "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"file system"}]},{"kind":"text","text":"."}]}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/io/IOAccess.java","line":56}},{"id":"org.graalvm.polyglot.io.IOAccess$Builder","name":"IOAccess.Builder","kind":"class","language":"java","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"IOAccess.Builder"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"enclosing":"org.graalvm.polyglot.io.IOAccess","members":[{"id":"org.graalvm.polyglot.io.IOAccess$Builder#allowHostFileAccess(boolean)","anchor":"allowHostFileAccess(boolean)","kind":"method","name":"allowHostFileAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"IOAccess.Builder","ref":"org.graalvm.polyglot.io.IOAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowHostFileAccess"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"allow"},{"kind":"punct","text":")"}],"params":[{"name":"allow","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"IOAccess.Builder","ref":"org.graalvm.polyglot.io.IOAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"If "},{"kind":"code","text":"true"},{"kind":"text","text":", it allows the guest language unrestricted access to files on the host system."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"If "},{"kind":"code","text":"true"},{"kind":"text","text":", it allows the guest language unrestricted access to files on the host system."}]}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/io/IOAccess.java","line":222}},{"id":"org.graalvm.polyglot.io.IOAccess$Builder#allowHostSocketAccess(boolean)","anchor":"allowHostSocketAccess(boolean)","kind":"method","name":"allowHostSocketAccess","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"IOAccess.Builder","ref":"org.graalvm.polyglot.io.IOAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"allowHostSocketAccess"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"allow"},{"kind":"punct","text":")"}],"params":[{"name":"allow","type":[{"kind":"keyword","text":"boolean"}]}],"returns":{"type":[{"kind":"type","text":"IOAccess.Builder","ref":"org.graalvm.polyglot.io.IOAccess$Builder"}]},"doc":{"summary":[{"kind":"text","text":"If "},{"kind":"code","text":"true"},{"kind":"text","text":", it allows the guest language unrestricted access to host system sockets."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"If "},{"kind":"code","text":"true"},{"kind":"text","text":", it allows the guest language unrestricted access to host system sockets."}]}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/io/IOAccess.java","line":232}},{"id":"org.graalvm.polyglot.io.IOAccess$Builder#fileSystem(org.graalvm.polyglot.io.FileSystem)","anchor":"fileSystem(org.graalvm.polyglot.io.FileSystem)","kind":"method","name":"fileSystem","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"IOAccess.Builder","ref":"org.graalvm.polyglot.io.IOAccess$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"fileSystem"},{"kind":"punct","text":"("},{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"},{"kind":"punct","text":" "},{"kind":"param","text":"fileSystem"},{"kind":"punct","text":")"}],"params":[{"name":"fileSystem","type":[{"kind":"type","text":"FileSystem","ref":"org.graalvm.polyglot.io.FileSystem"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the file system to use in the guest language"}]}]}],"returns":{"type":[{"kind":"type","text":"IOAccess.Builder","ref":"org.graalvm.polyglot.io.IOAccess$Builder"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess$Builder"},"code":true,"children":[{"kind":"text","text":"Builder"}]}]}]},"doc":{"summary":[{"kind":"text","text":"Sets a new "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets a new "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":". Access to the file system in the guest language will be virtualized using the "},{"kind":"code","text":"fileSystem"},{"kind":"text","text":". A file system can restrict access to files or fully virtualize file system operations. An example of virtualization is a "},{"kind":"link","url":"https://github.com/oracle/graal/blob/master/truffle/src/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/polyglot/MemoryFileSystem.java","children":[{"kind":"text","text":"memory-based file system"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"GraalVM trusts a custom file system supplied by the embedder. Its methods may be invoked with guest-controlled input, so the embedder must ensure that the implementation is safe for use with the selected "},{"kind":"link","target":{"id":"org.graalvm.polyglot.SandboxPolicy"},"code":true,"children":[{"kind":"text","text":"sandbox policy"}]},{"kind":"text","text":". Sandbox validation rejects file systems known to expose the default host file system, but it does not inspect the behavior of arbitrary custom implementations."}]}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/io/IOAccess.java","line":254}},{"id":"org.graalvm.polyglot.io.IOAccess$Builder#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"25.3","source":{"path":"org/graalvm/polyglot/io/IOAccess.java","line":264}},{"id":"org.graalvm.polyglot.io.IOAccess$Builder#build()","anchor":"build()","kind":"method","name":"build","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"IOAccess","ref":"org.graalvm.polyglot.io.IOAccess"},{"kind":"punct","text":" "},{"kind":"name","text":"build"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"IOAccess","ref":"org.graalvm.polyglot.io.IOAccess"}]},"throws":[{"type":[{"kind":"type","text":"IllegalArgumentException","ref":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if host file access is enabled and a custom file system is set."}]}]}],"doc":{"summary":[{"kind":"text","text":"Creates an instance of the custom IO access configuration."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates an instance of the custom IO access configuration."}]}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/io/IOAccess.java","line":295}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Builder to create a custom "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess"},"code":true,"children":[{"kind":"text","text":"IO access configuration"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Builder to create a custom "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.IOAccess"},"code":true,"children":[{"kind":"text","text":"IO access configuration"}]},{"kind":"text","text":"."}]}]},"since":"23.0","source":{"path":"org/graalvm/polyglot/io/IOAccess.java","line":195}},{"id":"org.graalvm.polyglot.io.MessageEndpoint","name":"MessageEndpoint","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"MessageEndpoint"}],"members":[{"id":"org.graalvm.polyglot.io.MessageEndpoint#sendText(java.lang.String)","anchor":"sendText(java.lang.String)","kind":"method","name":"sendText","signature":[{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"sendText"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"text"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"text","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"throws":[{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true}],"doc":{"summary":[{"kind":"text","text":"Send a text message."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Send a text message."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/MessageEndpoint.java","line":60}},{"id":"org.graalvm.polyglot.io.MessageEndpoint#sendBinary(java.nio.ByteBuffer)","anchor":"sendBinary(java.nio.ByteBuffer)","kind":"method","name":"sendBinary","signature":[{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"sendBinary"},{"kind":"punct","text":"("},{"kind":"type","text":"ByteBuffer","ref":"java.nio.ByteBuffer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteBuffer.html"},{"kind":"punct","text":" "},{"kind":"param","text":"data"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"data","type":[{"kind":"type","text":"ByteBuffer","ref":"java.nio.ByteBuffer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteBuffer.html"}]}],"throws":[{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true}],"doc":{"summary":[{"kind":"text","text":"Send a binary message."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Send a binary message."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/MessageEndpoint.java","line":67}},{"id":"org.graalvm.polyglot.io.MessageEndpoint#sendPing(java.nio.ByteBuffer)","anchor":"sendPing(java.nio.ByteBuffer)","kind":"method","name":"sendPing","signature":[{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"sendPing"},{"kind":"punct","text":"("},{"kind":"type","text":"ByteBuffer","ref":"java.nio.ByteBuffer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteBuffer.html"},{"kind":"punct","text":" "},{"kind":"param","text":"data"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"data","type":[{"kind":"type","text":"ByteBuffer","ref":"java.nio.ByteBuffer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteBuffer.html"}]}],"throws":[{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true}],"doc":{"summary":[{"kind":"text","text":"Send a ping request."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Send a ping request."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/MessageEndpoint.java","line":74}},{"id":"org.graalvm.polyglot.io.MessageEndpoint#sendPong(java.nio.ByteBuffer)","anchor":"sendPong(java.nio.ByteBuffer)","kind":"method","name":"sendPong","signature":[{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"sendPong"},{"kind":"punct","text":"("},{"kind":"type","text":"ByteBuffer","ref":"java.nio.ByteBuffer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteBuffer.html"},{"kind":"punct","text":" "},{"kind":"param","text":"data"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"data","type":[{"kind":"type","text":"ByteBuffer","ref":"java.nio.ByteBuffer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/nio/ByteBuffer.html"}]}],"throws":[{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true}],"doc":{"summary":[{"kind":"text","text":"Send a pong reply as a response to ping."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Send a pong reply as a response to ping."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/MessageEndpoint.java","line":81}},{"id":"org.graalvm.polyglot.io.MessageEndpoint#sendClose()","anchor":"sendClose()","kind":"method","name":"sendClose","signature":[{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"sendClose"},{"kind":"punct","text":"() "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"throws":[{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true}],"doc":{"summary":[{"kind":"text","text":"Close the connection."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Close the connection."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/MessageEndpoint.java","line":88}}],"doc":{"summary":[{"kind":"text","text":"An endpoint representing one side of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.MessageTransport"},"code":true,"children":[{"kind":"text","text":"message transport"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"An endpoint representing one side of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.MessageTransport"},"code":true,"children":[{"kind":"text","text":"message transport"}]},{"kind":"text","text":". The methods throw "},{"kind":"link","target":{"id":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"},"code":true,"children":[{"kind":"text","text":"IOException"}]},{"kind":"text","text":" when an I/O issue occurs or when the endpoint is closed."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.io.MessageTransport"},"code":true,"children":[{"kind":"text","text":"MessageTransport"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/MessageEndpoint.java","line":53}},{"id":"org.graalvm.polyglot.io.MessageTransport","name":"MessageTransport","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"MessageTransport"}],"members":[{"id":"org.graalvm.polyglot.io.MessageTransport#open(java.net.URI,org.graalvm.polyglot.io.MessageEndpoint)","anchor":"open(java.net.URI,org.graalvm.polyglot.io.MessageEndpoint)","kind":"method","name":"open","signature":[{"kind":"type","text":"MessageEndpoint","ref":"org.graalvm.polyglot.io.MessageEndpoint"},{"kind":"punct","text":" "},{"kind":"name","text":"open"},{"kind":"punct","text":"("},{"kind":"type","text":"URI","ref":"java.net.URI","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URI.html"},{"kind":"punct","text":" "},{"kind":"param","text":"uri"},{"kind":"punct","text":", "},{"kind":"type","text":"MessageEndpoint","ref":"org.graalvm.polyglot.io.MessageEndpoint"},{"kind":"punct","text":" "},{"kind":"param","text":"peerEndpoint"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"},{"kind":"punct","text":", "},{"kind":"type","text":"MessageTransport.VetoException","ref":"org.graalvm.polyglot.io.MessageTransport$VetoException"}],"params":[{"name":"uri","type":[{"kind":"type","text":"URI","ref":"java.net.URI","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URI.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the connection URI"}]}]},{"name":"peerEndpoint","type":[{"kind":"type","text":"MessageEndpoint","ref":"org.graalvm.polyglot.io.MessageEndpoint"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the peer endpoint representation"}]}]}],"returns":{"type":[{"kind":"type","text":"MessageEndpoint","ref":"org.graalvm.polyglot.io.MessageEndpoint"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"an implementation of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.MessageEndpoint"},"code":true,"children":[{"kind":"text","text":"MessageEndpoint"}]},{"kind":"text","text":" call back, or "},{"kind":"code","text":"null"},{"kind":"text","text":"."}]}]},"throws":[{"type":[{"kind":"type","text":"MessageTransport.VetoException","ref":"org.graalvm.polyglot.io.MessageTransport$VetoException"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"to veto connection to the URL."}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true}],"doc":{"summary":[{"kind":"text","text":"Called when a connection to an URI is to be established."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Called when a connection to an URI is to be established. The virtualized connection is either opened and an endpoint call back is returned, or the connection is not virtualized in which case "},{"kind":"code","text":"null"},{"kind":"text","text":" is returned."}]},{"kind":"paragraph","children":[{"kind":"text","text":"This method can be called concurrently from multiple threads. However, the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.MessageEndpoint"},"code":true,"children":[{"kind":"text","text":"MessageEndpoint"}]},{"kind":"text","text":" ought to be called on one thread at a time, unless you're sure that the particular implementation can handle concurrent calls. The same holds true for the returned endpoint, it's called synchronously."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/MessageTransport.java","line":148}}],"doc":{"summary":[{"kind":"text","text":"Allows to take over transport of message communication initiated by an instrument."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Allows to take over transport of message communication initiated by an instrument. Implement this interface to provide a transport of message communication. When an instrument is about to create a server endpoint, it calls the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.MessageTransport#open(java.net.URI,org.graalvm.polyglot.io.MessageEndpoint)"},"code":true,"children":[{"kind":"text","text":"MessageTransport.open(URI, MessageEndpoint)"}]},{"kind":"text","text":" method with the server URI. Usage example:"}]},{"kind":"code","text":"class RoutedServer implements MessageEndpoint {\n\n    private final MessageEndpoint remoteEndpoint;\n    private final OutputStream routerOut = getRouterOutputStream();\n    private final WritableByteChannel routerOutChannel;\n\n    RoutedServer(MessageEndpoint remoteEndpoint) {\n        this.remoteEndpoint = remoteEndpoint;\n        this.routerOutChannel = Channels.newChannel(routerOut);\n        new Thread(() -> {\n            try {\n                runInputLoop();\n            } catch (IOException ex) {\n            }\n        }).start();\n    }\n\n    @Override\n    public void sendText(String text) throws IOException {\n        routerOut.write(text.getBytes());\n        routerOut.flush();\n    }\n\n    @Override\n    public void sendBinary(ByteBuffer data) throws IOException {\n        routerOutChannel.write(data);\n        routerOut.flush();\n    }\n\n    @Override\n    public void sendPing(ByteBuffer data) throws IOException {\n        remoteEndpoint.sendPong(data);\n    }\n\n    @Override\n    public void sendPong(ByteBuffer data) throws IOException {\n        // Did we send ping?\n    }\n\n    @Override\n    public void sendClose() throws IOException {\n        routerOut.close();\n    }\n\n    private void runInputLoop() throws IOException {\n        try (InputStream routerIn = getRouterInputStream()) {\n            byte[] buf = new byte[1024];\n            ByteBuffer bb = ByteBuffer.wrap(buf);\n            int l;\n            while ((l = routerIn.read(buf)) > 0) {\n                bb.limit(l);\n                remoteEndpoint.sendBinary(bb);\n                bb.rewind();\n            }\n        } finally {\n            remoteEndpoint.sendClose();\n        }\n    }\n}\n\nEngine.newBuilder().serverTransport(\n                (uri, peerEndpoint) -> {\n                    if (denyHost.equals(uri.getHost())) {\n                        throw new MessageTransport.VetoException(\"Denied access.\");\n                    } else if (routedURI.equals(uri)) {\n                        return new RoutedServer(peerEndpoint);\n                    } else {\n                        // Permit instruments to setup the servers themselves\n                        return null;\n                    }\n                }).build();"}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine$Builder#serverTransport(org.graalvm.polyglot.io.MessageTransport)"},"code":true,"children":[{"kind":"text","text":"org.graalvm.polyglot.Engine.Builder.serverTransport(MessageTransport)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#serverTransport(org.graalvm.polyglot.io.MessageTransport)"},"code":true,"children":[{"kind":"text","text":"org.graalvm.polyglot.Context.Builder.serverTransport(MessageTransport)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/MessageTransport.java","line":130}},{"id":"org.graalvm.polyglot.io.MessageTransport$VetoException","name":"MessageTransport.VetoException","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"MessageTransport.VetoException"},{"kind":"punct","text":" "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"Exception","ref":"java.lang.Exception","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Exception.html"}],"superclass":[{"kind":"type","text":"Exception","ref":"java.lang.Exception","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Exception.html"}],"ancestors":[{"id":"java.lang.Exception","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Exception.html"},{"id":"java.lang.Throwable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html"},{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"enclosing":"org.graalvm.polyglot.io.MessageTransport","members":[{"id":"org.graalvm.polyglot.io.MessageTransport$VetoException#<init>(java.lang.String)","anchor":"<init>(java.lang.String)","kind":"constructor","name":"VetoException","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"name","text":"VetoException"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"message"},{"kind":"punct","text":")"}],"params":[{"name":"message","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"doc":{"summary":[{"kind":"text","text":"Create a new VetoException."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Create a new VetoException."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/MessageTransport.java","line":163}}],"inherited":[{"from":{"id":"java.lang.Throwable","text":"Throwable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html"},"kind":"class","members":[{"id":"java.lang.Throwable#addSuppressed(java.lang.Throwable)","text":"addSuppressed","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#addSuppressed(java.lang.Throwable)"},{"id":"java.lang.Throwable#fillInStackTrace()","text":"fillInStackTrace","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#fillInStackTrace()"},{"id":"java.lang.Throwable#getCause()","text":"getCause","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#getCause()"},{"id":"java.lang.Throwable#getLocalizedMessage()","text":"getLocalizedMessage","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#getLocalizedMessage()"},{"id":"java.lang.Throwable#getMessage()","text":"getMessage","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#getMessage()"},{"id":"java.lang.Throwable#getStackTrace()","text":"getStackTrace","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#getStackTrace()"},{"id":"java.lang.Throwable#getSuppressed()","text":"getSuppressed","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#getSuppressed()"},{"id":"java.lang.Throwable#initCause(java.lang.Throwable)","text":"initCause","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#initCause(java.lang.Throwable)"},{"id":"java.lang.Throwable#printStackTrace()","text":"printStackTrace","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#printStackTrace()"},{"id":"java.lang.Throwable#printStackTrace(java.io.PrintStream)","text":"printStackTrace","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#printStackTrace(java.io.PrintStream)"},{"id":"java.lang.Throwable#printStackTrace(java.io.PrintWriter)","text":"printStackTrace","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#printStackTrace(java.io.PrintWriter)"},{"id":"java.lang.Throwable#setStackTrace(java.lang.StackTraceElement[])","text":"setStackTrace","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#setStackTrace(java.lang.StackTraceElement[])"},{"id":"java.lang.Throwable#toString()","text":"toString","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Throwable.html#toString()"}]},{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Thrown when a transport connection is vetoed."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Thrown when a transport connection is vetoed. The initiator of the connection is obliged to abandon it when this exception is thrown."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/io/MessageTransport.java","line":156}},{"id":"org.graalvm.polyglot.io.ProcessHandler","name":"ProcessHandler","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"ProcessHandler"}],"members":[{"id":"org.graalvm.polyglot.io.ProcessHandler#start(org.graalvm.polyglot.io.ProcessHandler.ProcessCommand)","anchor":"start(org.graalvm.polyglot.io.ProcessHandler.ProcessCommand)","kind":"method","name":"start","signature":[{"kind":"type","text":"Process","ref":"java.lang.Process","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Process.html"},{"kind":"punct","text":" "},{"kind":"name","text":"start"},{"kind":"punct","text":"("},{"kind":"type","text":"ProcessHandler.ProcessCommand","ref":"org.graalvm.polyglot.io.ProcessHandler$ProcessCommand"},{"kind":"punct","text":" "},{"kind":"param","text":"command"},{"kind":"punct","text":") "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"params":[{"name":"command","type":[{"kind":"type","text":"ProcessHandler.ProcessCommand","ref":"org.graalvm.polyglot.io.ProcessHandler$ProcessCommand"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the subprocess attributes"}]}]}],"returns":{"type":[{"kind":"type","text":"Process","ref":"java.lang.Process","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Process.html"}]},"throws":[{"type":[{"kind":"type","text":"SecurityException","ref":"java.lang.SecurityException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/SecurityException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the process creation was forbidden by this handler"}]}]},{"type":[{"kind":"type","text":"IOException","ref":"java.io.IOException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the process fails to execute"}]}]}],"doc":{"summary":[{"kind":"text","text":"A request to start a new subprocess with given attributes."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"A request to start a new subprocess with given attributes."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The default implementation uses "},{"kind":"link","target":{"id":"java.lang.ProcessBuilder","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ProcessBuilder.html"},"code":true,"children":[{"kind":"text","text":"ProcessBuilder"}]},{"kind":"text","text":" to create the new subprocess. The subprocess current working directory is set to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.ProcessHandler$ProcessCommand#getDirectory()"},"code":true,"children":[{"kind":"text","text":"ProcessCommand.getDirectory()"}]},{"kind":"text","text":". The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.ProcessHandler$ProcessCommand#getDirectory()"},"code":true,"children":[{"kind":"text","text":"ProcessCommand.getDirectory()"}]},{"kind":"text","text":" value was either explicitely set by the guest language or the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.FileSystem"},"code":true,"children":[{"kind":"text","text":"FileSystem"}]},{"kind":"text","text":"'s current working directory is used. The subprocess environment is set to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.ProcessHandler$ProcessCommand#getEnvironment()"},"code":true,"children":[{"kind":"text","text":"ProcessCommand.getEnvironment()"}]},{"kind":"text","text":", the initial value of "},{"kind":"link","target":{"id":"java.lang.ProcessBuilder#environment()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ProcessBuilder.html#environment()"},"code":true,"children":[{"kind":"text","text":"ProcessBuilder.environment()"}]},{"kind":"text","text":" is cleaned. The "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.ProcessHandler$ProcessCommand#getEnvironment()"},"code":true,"children":[{"kind":"text","text":"ProcessCommand.getEnvironment()"}]},{"kind":"text","text":" contains the environment variables set by guest language and possibly also the JVM process environment depending on value of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#allowEnvironmentAccess(org.graalvm.polyglot.EnvironmentAccess)"},"code":true,"children":[{"kind":"text","text":"Builder.allowEnvironmentAccess(org.graalvm.polyglot.EnvironmentAccess)"}]},{"kind":"text","text":". Implementation example:"}]},{"kind":"code","text":"public Process start(ProcessCommand command) throws IOException {\n    ProcessBuilder builder = new ProcessBuilder(command.getCommand()).redirectErrorStream(command.isRedirectErrorStream()).redirectInput(\n                    asProcessBuilderRedirect(command.getInputRedirect())).redirectOutput(asProcessBuilderRedirect(command.getOutputRedirect())).redirectError(\n                                    asProcessBuilderRedirect(command.getErrorRedirect()));\n    Map<String, String> env = builder.environment();\n    env.clear();\n    env.putAll(command.getEnvironment());\n    String cwd = command.getDirectory();\n    if (cwd != null) {\n        builder.directory(Paths.get(cwd).toFile());\n    }\n    return builder.start();\n}\n\nprivate static java.lang.ProcessBuilder.Redirect asProcessBuilderRedirect(ProcessHandler.Redirect redirect) {\n    if (redirect == ProcessHandler.Redirect.PIPE) {\n        return java.lang.ProcessBuilder.Redirect.PIPE;\n    } else if (redirect == ProcessHandler.Redirect.INHERIT) {\n        return java.lang.ProcessBuilder.Redirect.INHERIT;\n    } else {\n        throw new IllegalStateException(\"Unsupported redirect: \" + redirect);\n    }\n}"}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/io/ProcessHandler.java","line":107}}],"doc":{"summary":[{"kind":"text","text":"Service-provider for guest languages process builder."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Service-provider for guest languages process builder. This interface allows embedder to intercept subprocess creation done by guest languages."}]}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/io/ProcessHandler.java","line":60}},{"id":"org.graalvm.polyglot.io.ProcessHandler$ProcessCommand","name":"ProcessHandler.ProcessCommand","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"ProcessHandler.ProcessCommand"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"enclosing":"org.graalvm.polyglot.io.ProcessHandler","members":[{"id":"org.graalvm.polyglot.io.ProcessHandler$ProcessCommand#getCommand()","anchor":"getCommand()","kind":"method","name":"getCommand","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"List","ref":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"> "},{"kind":"name","text":"getCommand"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"List","ref":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":">"}]},"doc":{"summary":[{"kind":"text","text":"Returns the subprocess executable and arguments as an immutable list."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the subprocess executable and arguments as an immutable list."}]}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/io/ProcessHandler.java","line":146}},{"id":"org.graalvm.polyglot.io.ProcessHandler$ProcessCommand#getDirectory()","anchor":"getDirectory()","kind":"method","name":"getDirectory","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getDirectory"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns the subprocess working directory."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the subprocess working directory."}]}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/io/ProcessHandler.java","line":155}},{"id":"org.graalvm.polyglot.io.ProcessHandler$ProcessCommand#getEnvironment()","anchor":"getEnvironment()","kind":"method","name":"getEnvironment","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"> "},{"kind":"name","text":"getEnvironment"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":">"}]},"doc":{"summary":[{"kind":"text","text":"Returns the subprocess environment as an immutable map."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the subprocess environment as an immutable map."}]}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/io/ProcessHandler.java","line":164}},{"id":"org.graalvm.polyglot.io.ProcessHandler$ProcessCommand#isRedirectErrorStream()","anchor":"isRedirectErrorStream()","kind":"method","name":"isRedirectErrorStream","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isRedirectErrorStream"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Return whether the standard error output should be merged into standard output."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Return whether the standard error output should be merged into standard output."}]}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/io/ProcessHandler.java","line":173}},{"id":"org.graalvm.polyglot.io.ProcessHandler$ProcessCommand#getInputRedirect()","anchor":"getInputRedirect()","kind":"method","name":"getInputRedirect","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"ProcessHandler.Redirect","ref":"org.graalvm.polyglot.io.ProcessHandler$Redirect"},{"kind":"punct","text":" "},{"kind":"name","text":"getInputRedirect"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"ProcessHandler.Redirect","ref":"org.graalvm.polyglot.io.ProcessHandler$Redirect"}]},"doc":{"summary":[{"kind":"text","text":"Returns the standard input source."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the standard input source."}]}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/io/ProcessHandler.java","line":182}},{"id":"org.graalvm.polyglot.io.ProcessHandler$ProcessCommand#getOutputRedirect()","anchor":"getOutputRedirect()","kind":"method","name":"getOutputRedirect","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"ProcessHandler.Redirect","ref":"org.graalvm.polyglot.io.ProcessHandler$Redirect"},{"kind":"punct","text":" "},{"kind":"name","text":"getOutputRedirect"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"ProcessHandler.Redirect","ref":"org.graalvm.polyglot.io.ProcessHandler$Redirect"}]},"doc":{"summary":[{"kind":"text","text":"Returns the standard output destination."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the standard output destination."}]}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/io/ProcessHandler.java","line":191}},{"id":"org.graalvm.polyglot.io.ProcessHandler$ProcessCommand#getErrorRedirect()","anchor":"getErrorRedirect()","kind":"method","name":"getErrorRedirect","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"ProcessHandler.Redirect","ref":"org.graalvm.polyglot.io.ProcessHandler$Redirect"},{"kind":"punct","text":" "},{"kind":"name","text":"getErrorRedirect"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"ProcessHandler.Redirect","ref":"org.graalvm.polyglot.io.ProcessHandler$Redirect"}]},"doc":{"summary":[{"kind":"text","text":"Returns the standard error output destination."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the standard error output destination."}]}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/io/ProcessHandler.java","line":200}},{"id":"org.graalvm.polyglot.io.ProcessHandler$ProcessCommand#create(java.util.List,java.lang.String,java.util.Map,boolean,org.graalvm.polyglot.io.ProcessHandler.Redirect,org.graalvm.polyglot.io.ProcessHandler.Redirect,org.graalvm.polyglot.io.ProcessHandler.Redirect)","anchor":"create(java.util.List,java.lang.String,java.util.Map,boolean,org.graalvm.polyglot.io.ProcessHandler.Redirect,org.graalvm.polyglot.io.ProcessHandler.Redirect,org.graalvm.polyglot.io.ProcessHandler.Redirect)","kind":"method","name":"create","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"ProcessHandler.ProcessCommand","ref":"org.graalvm.polyglot.io.ProcessHandler$ProcessCommand"},{"kind":"punct","text":" "},{"kind":"name","text":"create"},{"kind":"punct","text":"("},{"kind":"type","text":"List","ref":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"cmd"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"cwd"},{"kind":"punct","text":", "},{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"environment"},{"kind":"punct","text":", "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"redirectErrorStream"},{"kind":"punct","text":", "},{"kind":"type","text":"ProcessHandler.Redirect","ref":"org.graalvm.polyglot.io.ProcessHandler$Redirect"},{"kind":"punct","text":" "},{"kind":"param","text":"inputRedirect"},{"kind":"punct","text":", "},{"kind":"type","text":"ProcessHandler.Redirect","ref":"org.graalvm.polyglot.io.ProcessHandler$Redirect"},{"kind":"punct","text":" "},{"kind":"param","text":"outputRedirect"},{"kind":"punct","text":", "},{"kind":"type","text":"ProcessHandler.Redirect","ref":"org.graalvm.polyglot.io.ProcessHandler$Redirect"},{"kind":"punct","text":" "},{"kind":"param","text":"errorRedirect"},{"kind":"punct","text":")"}],"params":[{"name":"cmd","type":[{"kind":"type","text":"List","ref":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":">"}]},{"name":"cwd","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},{"name":"environment","type":[{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":">"}]},{"name":"redirectErrorStream","type":[{"kind":"keyword","text":"boolean"}]},{"name":"inputRedirect","type":[{"kind":"type","text":"ProcessHandler.Redirect","ref":"org.graalvm.polyglot.io.ProcessHandler$Redirect"}]},{"name":"outputRedirect","type":[{"kind":"type","text":"ProcessHandler.Redirect","ref":"org.graalvm.polyglot.io.ProcessHandler$Redirect"}]},{"name":"errorRedirect","type":[{"kind":"type","text":"ProcessHandler.Redirect","ref":"org.graalvm.polyglot.io.ProcessHandler$Redirect"}]}],"returns":{"type":[{"kind":"type","text":"ProcessHandler.ProcessCommand","ref":"org.graalvm.polyglot.io.ProcessHandler$ProcessCommand"}]},"doc":{"summary":[{"kind":"text","text":"Creates a ProcessCommand."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a ProcessCommand. Not for direct use."}]}]},"since":"23.1.0","source":{"path":"org/graalvm/polyglot/io/ProcessHandler.java","line":209}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#toString()","text":"toString","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Subprocess attributes passed to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.ProcessHandler#start(org.graalvm.polyglot.io.ProcessHandler.ProcessCommand)"},"code":true,"children":[{"kind":"text","text":"start"}]},{"kind":"text","text":" method."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Subprocess attributes passed to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.io.ProcessHandler#start(org.graalvm.polyglot.io.ProcessHandler.ProcessCommand)"},"code":true,"children":[{"kind":"text","text":"start"}]},{"kind":"text","text":" method."}]}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/io/ProcessHandler.java","line":115}},{"id":"org.graalvm.polyglot.io.ProcessHandler$Redirect","name":"ProcessHandler.Redirect","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"ProcessHandler.Redirect"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"enclosing":"org.graalvm.polyglot.io.ProcessHandler","members":[{"id":"org.graalvm.polyglot.io.ProcessHandler$Redirect#PIPE","anchor":"PIPE","kind":"field","name":"PIPE","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"ProcessHandler.Redirect","ref":"org.graalvm.polyglot.io.ProcessHandler$Redirect"},{"kind":"punct","text":" "},{"kind":"name","text":"PIPE"}],"type":[{"kind":"type","text":"ProcessHandler.Redirect","ref":"org.graalvm.polyglot.io.ProcessHandler$Redirect"}],"doc":{"summary":[{"kind":"text","text":"Indicates that subprocess I/O will be connected to the current Java process using a pipe."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Indicates that subprocess I/O will be connected to the current Java process using a pipe."}]}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/io/ProcessHandler.java","line":228}},{"id":"org.graalvm.polyglot.io.ProcessHandler$Redirect#INHERIT","anchor":"INHERIT","kind":"field","name":"INHERIT","modifiers":["public","static","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"type","text":"ProcessHandler.Redirect","ref":"org.graalvm.polyglot.io.ProcessHandler$Redirect"},{"kind":"punct","text":" "},{"kind":"name","text":"INHERIT"}],"type":[{"kind":"type","text":"ProcessHandler.Redirect","ref":"org.graalvm.polyglot.io.ProcessHandler$Redirect"}],"doc":{"summary":[{"kind":"text","text":"Indicates that subprocess I/O source or destination will be the same as those of the current process."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Indicates that subprocess I/O source or destination will be the same as those of the current process."}]}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/io/ProcessHandler.java","line":236}},{"id":"org.graalvm.polyglot.io.ProcessHandler$Redirect#getOutputStream()","anchor":"getOutputStream()","kind":"method","name":"getOutputStream","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"OutputStream","ref":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getOutputStream"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"OutputStream","ref":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns the output stream to redirect to."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the output stream to redirect to."}]}]},"since":"23.1.0","source":{"path":"org/graalvm/polyglot/io/ProcessHandler.java","line":252}},{"id":"org.graalvm.polyglot.io.ProcessHandler$Redirect#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/io/ProcessHandler.java","line":261}},{"id":"org.graalvm.polyglot.io.ProcessHandler$Redirect#hashCode()","anchor":"hashCode()","kind":"method","name":"hashCode","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"int"},{"kind":"punct","text":" "},{"kind":"name","text":"hashCode"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"int"}]},"overrides":{"id":"java.lang.Object#hashCode()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/io/ProcessHandler.java","line":271}},{"id":"org.graalvm.polyglot.io.ProcessHandler$Redirect#equals(java.lang.Object)","anchor":"equals(java.lang.Object)","kind":"method","name":"equals","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"equals"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"param","text":"obj"},{"kind":"punct","text":")"}],"params":[{"name":"obj","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"overrides":{"id":"java.lang.Object#equals(java.lang.Object)","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/io/ProcessHandler.java","line":281}},{"id":"org.graalvm.polyglot.io.ProcessHandler$Redirect#createRedirectToStream(java.io.OutputStream)","anchor":"createRedirectToStream(java.io.OutputStream)","kind":"method","name":"createRedirectToStream","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"ProcessHandler.Redirect","ref":"org.graalvm.polyglot.io.ProcessHandler$Redirect"},{"kind":"punct","text":" "},{"kind":"name","text":"createRedirectToStream"},{"kind":"punct","text":"("},{"kind":"type","text":"OutputStream","ref":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"},{"kind":"punct","text":" "},{"kind":"param","text":"stream"},{"kind":"punct","text":")"}],"params":[{"name":"stream","type":[{"kind":"type","text":"OutputStream","ref":"java.io.OutputStream","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/OutputStream.html"}]}],"returns":{"type":[{"kind":"type","text":"ProcessHandler.Redirect","ref":"org.graalvm.polyglot.io.ProcessHandler$Redirect"}]},"doc":{"summary":[{"kind":"text","text":"Creates a ProcessCommand."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a ProcessCommand. Not for direct use."}]}]},"since":"23.1.0","source":{"path":"org/graalvm/polyglot/io/ProcessHandler.java","line":297}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Represents a source of subprocess input or a destination of subprocess output."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Represents a source of subprocess input or a destination of subprocess output."}]}]},"since":"19.1.0","source":{"path":"org/graalvm/polyglot/io/ProcessHandler.java","line":221}}]},{"id":"org.graalvm.polyglot.management","name":"org.graalvm.polyglot.management","doc":{"summary":[{"kind":"text","text":"The management package provides tools that monitor and instrument the behavior of guest language programs."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"The management package provides tools that monitor and instrument the behavior of guest language programs."}]},{"kind":"paragraph","children":[{"kind":"text","text":"See "},{"kind":"link","url":"http://www.graalvm.org/docs/graalvm-as-a-platform/embed/","children":[{"kind":"text","text":"graalvm.org"}]},{"kind":"text","text":" for more examples on how to use this API."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener"},"code":true,"children":[{"kind":"text","text":"Execution listeners allow to instrument the execution of guest languages."}]}]]},"since":"19.0","types":[{"id":"org.graalvm.polyglot.management.ExecutionEvent","name":"ExecutionEvent","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"ExecutionEvent"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.polyglot.management.ExecutionEvent#getLocation()","anchor":"getLocation()","kind":"method","name":"getLocation","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"SourceSection","ref":"org.graalvm.polyglot.SourceSection"},{"kind":"punct","text":" "},{"kind":"name","text":"getLocation"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"SourceSection","ref":"org.graalvm.polyglot.SourceSection"}]},"doc":{"summary":[{"kind":"text","text":"Returns the source location of the event that was triggered or "},{"kind":"code","text":"null"},{"kind":"text","text":" if no location source location is available."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the source location of the event that was triggered or "},{"kind":"code","text":"null"},{"kind":"text","text":" if no location source location is available."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionEvent.java","line":74}},{"id":"org.graalvm.polyglot.management.ExecutionEvent#getRootName()","anchor":"getRootName()","kind":"method","name":"getRootName","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getRootName"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns the root name or "},{"kind":"code","text":"null"},{"kind":"text","text":" if no name is available."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the root name or "},{"kind":"code","text":"null"},{"kind":"text","text":" if no name is available. The root name may also be available for events caused by expressions and statements. In this case the name of the containing root will be returned."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionEvent.java","line":85}},{"id":"org.graalvm.polyglot.management.ExecutionEvent#getInputValues()","anchor":"getInputValues()","kind":"method","name":"getInputValues","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"List","ref":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":"> "},{"kind":"name","text":"getInputValues"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"List","ref":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":">"}]},"doc":{"summary":[{"kind":"text","text":"Returns the input values provided to execute this source location."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the input values provided to execute this source location. This method returns "},{"kind":"code","text":"null"},{"kind":"text","text":" if input value collection is not "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#collectInputValues(boolean)"},"code":true,"children":[{"kind":"text","text":"enabled"}]},{"kind":"text","text":". Input values are available in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#onReturn(java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"OnReturn"}]},{"kind":"text","text":" events.The returned list may contain "},{"kind":"code","text":"null"},{"kind":"text","text":" values if input values were not evaluated or if an exception occurred executing input values. The returned list is unmodifiable. The returned input values may escape the event consumer and remain valid until the context is closed."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionEvent.java","line":101}},{"id":"org.graalvm.polyglot.management.ExecutionEvent#getReturnValue()","anchor":"getReturnValue()","kind":"method","name":"getReturnValue","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"name","text":"getReturnValue"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},"doc":{"summary":[{"kind":"text","text":"Returns the return value of this source location after it was executed."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the return value of this source location after it was executed. This method returns "},{"kind":"code","text":"null"},{"kind":"text","text":" if return value collection is not "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#collectReturnValue(boolean)"},"code":true,"children":[{"kind":"text","text":"enabled"}]},{"kind":"text","text":". Return values are available in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#onReturn(java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"OnReturn"}]},{"kind":"text","text":" events. The returned value is allowed to escape the event consumer and remain valid until the context is closed."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionEvent.java","line":116}},{"id":"org.graalvm.polyglot.management.ExecutionEvent#getException()","anchor":"getException()","kind":"method","name":"getException","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"},{"kind":"punct","text":" "},{"kind":"name","text":"getException"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}]},"doc":{"summary":[{"kind":"text","text":"Returns the exception of this source location after it was executed."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the exception of this source location after it was executed. This method returns "},{"kind":"code","text":"null"},{"kind":"text","text":" if exception collection is not "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#collectExceptions(boolean)"},"code":true,"children":[{"kind":"text","text":"enabled"}]},{"kind":"text","text":". Exceptions are only available in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#onReturn(java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"OnReturn"}]},{"kind":"text","text":" events if an exception was thrown when the location was executed. The returned value is allowed to escape the event consumer and remains valid until the context is closed."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionEvent.java","line":130}},{"id":"org.graalvm.polyglot.management.ExecutionEvent#isExpression()","anchor":"isExpression()","kind":"method","name":"isExpression","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isExpression"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the source location is marked as expression, else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the source location is marked as expression, else "},{"kind":"code","text":"false"},{"kind":"text","text":". The collection of expression events may be enabled by calling "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#expressions(boolean)"},"code":true,"children":[{"kind":"text","text":"ExecutionListener.Builder.expressions(boolean)"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionEvent.java","line":141}},{"id":"org.graalvm.polyglot.management.ExecutionEvent#isStatement()","anchor":"isStatement()","kind":"method","name":"isStatement","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isStatement"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the source location is marked as a statement, else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the source location is marked as a statement, else "},{"kind":"code","text":"false"},{"kind":"text","text":". The collection of statement events may be enabled by calling "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#statements(boolean)"},"code":true,"children":[{"kind":"text","text":"ExecutionListener.Builder.statements(boolean)"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionEvent.java","line":152}},{"id":"org.graalvm.polyglot.management.ExecutionEvent#isRoot()","anchor":"isRoot()","kind":"method","name":"isRoot","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"isRoot"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the source location is marked as a root of a function, method or closure, else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the source location is marked as a root of a function, method or closure, else "},{"kind":"code","text":"false"},{"kind":"text","text":". The collection of root events may be enabled by calling "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#roots(boolean)"},"code":true,"children":[{"kind":"text","text":"ExecutionListener.Builder.roots(boolean)"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionEvent.java","line":163}},{"id":"org.graalvm.polyglot.management.ExecutionEvent#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionEvent.java","line":172}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"An execution event object passed to an execution listener consumer."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"An execution event object passed to an execution listener consumer. Execution event instances remain valid until the engine is closed. Values and returned exceptions will only remain valid until the context was closed."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener"},"code":true,"children":[{"kind":"text","text":"For further details."}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionEvent.java","line":58}},{"id":"org.graalvm.polyglot.management.ExecutionListener","name":"ExecutionListener","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"ExecutionListener"},{"kind":"punct","text":" "},{"kind":"keyword","text":"implements"},{"kind":"punct","text":" "},{"kind":"type","text":"AutoCloseable","ref":"java.lang.AutoCloseable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AutoCloseable.html"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"interfaces":[[{"kind":"type","text":"AutoCloseable","ref":"java.lang.AutoCloseable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AutoCloseable.html"}]],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"members":[{"id":"org.graalvm.polyglot.management.ExecutionListener#close()","anchor":"close()","kind":"method","name":"close","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"close"},{"kind":"punct","text":"()"}],"overrides":{"id":"java.lang.AutoCloseable#close()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AutoCloseable.html#close()"},"doc":{"summary":[{"kind":"text","text":"Closes and detaches this execution listener from the engine."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Closes and detaches this execution listener from the engine. After an execution listener was closed no further events will be reported."}]},{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#attach(org.graalvm.polyglot.Engine)"},"code":true,"children":[{"kind":"text","text":"Attaching"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener#close()"},"code":true,"children":[{"kind":"text","text":"closing"}]},{"kind":"text","text":" execution listeners are expensive operations and typically require to traverse through all loaded code. Code that was previously optimized will be deoptimized in the process. It is most efficient to attach an execution listener before any code is executed and let execution listeners automatically close with the engine."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#attach(org.graalvm.polyglot.Engine)"},"code":true,"children":[{"kind":"text","text":"Builder.attach(Engine)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionListener.java","line":230}},{"id":"org.graalvm.polyglot.management.ExecutionListener#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"25.3","source":{"path":"org/graalvm/polyglot/management/ExecutionListener.java","line":239}},{"id":"org.graalvm.polyglot.management.ExecutionListener#newBuilder()","anchor":"newBuilder()","kind":"method","name":"newBuilder","modifiers":["public","static"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"newBuilder"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Creates a builder that can be used to attach execution listeners."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a builder that can be used to attach execution listeners. The returned Builder instance is not thread-safe."}]},{"kind":"paragraph","children":[{"kind":"text","text":"A minimal example on how to build and attach a listener: "},{"kind":"code","text":"\n"},{"kind":"code","text":"\nExecutionListeners listener = ExecutionListeners.newBuilder()\n         .onEnter((e) -> ...)\n         .statements(true)\n         .attach(context.getEngine());\n"},{"kind":"code","text":"\n"}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener"},"code":true,"children":[{"kind":"text","text":"ExecutionListener"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionListener.java","line":262}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"Execution listeners allow to instrument the execution of guest languages."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Execution listeners allow to instrument the execution of guest languages. For example, it is possible to attach an execution listeners that is invoked for every statement of the guest language program, similar to how a debugger would single-step through the program."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The following example prints the characters of every executed statement of simple JavaScript loop. "},{"kind":"code","text":"\n"},{"kind":"code","text":"\nContext context = Context.create(\"js\");\nExecutionListeners listener = ExecutionListeners.newBuilder()\n         .onEnter((e) -> System.out.println(\n                 e.getLocation().getCharacters()))\n         .statements(true)\n         .attach(context.getEngine());\ncontext.eval(\"js\", \"for (var i = 0; i "},{"kind":"code","text":"<"},{"kind":"code","text":" 2; i++);\");\nlistener.close();\n"},{"kind":"code","text":"\n"},{"kind":"text","text":" Prints the following result:"}]},{"kind":"code","text":"i = 0\ni < 2\ni++\ni < 2\ni++\ni < 2"},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Creation and Closing"}]},{"kind":"paragraph","children":[{"kind":"text","text":"An execution listener builder can be created by first invoking "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener#newBuilder()"},"code":true,"children":[{"kind":"text","text":"newBuilder()"}]},{"kind":"text","text":". At least one event consumer and one filtered source element needs to be enabled. To complete the listener attachment "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#attach(org.graalvm.polyglot.Engine)"},"code":true,"children":[{"kind":"text","text":"Builder.attach(Engine)"}]},{"kind":"text","text":" needs to be invoked. "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#attach(org.graalvm.polyglot.Engine)"},"code":true,"children":[{"kind":"text","text":"Attach"}]},{"kind":"text","text":" may be invoked multiple times for one builder."}]},{"kind":"paragraph","children":[{"kind":"text","text":"All execution listeners are automatically closed when the engine "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Engine#close()"},"code":true,"children":[{"kind":"text","text":"closed"}]},{"kind":"text","text":". To close a listener earlier "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener#close()"},"code":true,"children":[{"kind":"text","text":"close()"}]},{"kind":"text","text":" may be invoked. Execution listeners are "},{"kind":"link","target":{"id":"java.lang.AutoCloseable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AutoCloseable.html"},"code":true,"children":[{"kind":"text","text":"AutoCloseable"}]},{"kind":"text","text":" and can therefore be used in try-with-resources blocks."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Event Consumers"}]},{"kind":"paragraph","children":[{"kind":"text","text":"The following event consumers can be set for an execution listener:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#onEnter(java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"OnEnter"}]},{"kind":"text","text":": An event that is notified when an execution of an element is entered. This event is consumed before any input values are executed."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#onReturn(java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"OnReturn"}]},{"kind":"text","text":": An event that is notified when an execution of an element was entered and completed."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"At least one event consumer needs to be set otherwise an "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" will be thrown by the builder when it is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#attach(org.graalvm.polyglot.Engine)"},"code":true,"children":[{"kind":"text","text":"attached"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Event consumers may throw any Java host exception. Such exceptions will be reported to the context as "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" instances. The thrown exception may be accessed using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#asHostException()"},"code":true,"children":[{"kind":"text","text":"PolyglotException.asHostException()"}]},{"kind":"text","text":"."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Event Data"}]},{"kind":"paragraph","children":[{"kind":"text","text":"For every event that is consumed the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionEvent#getLocation()"},"code":true,"children":[{"kind":"text","text":"source location"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionEvent#getRootName()"},"code":true,"children":[{"kind":"text","text":"root name"}]},{"kind":"text","text":" data is available. Other event data will return "},{"kind":"code","text":"null"},{"kind":"text","text":" by default."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The collection of the following event data may be enabled:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#collectReturnValue(boolean)"},"code":true,"children":[{"kind":"text","text":"Return values"}]},{"kind":"text","text":": Enables access to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionEvent#getReturnValue()"},"code":true,"children":[{"kind":"text","text":"return values"}]},{"kind":"text","text":" in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#onReturn(java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"OnReturn"}]},{"kind":"text","text":" events."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#collectInputValues(boolean)"},"code":true,"children":[{"kind":"text","text":"Input values"}]},{"kind":"text","text":": Enables access to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionEvent#getInputValues()"},"code":true,"children":[{"kind":"text","text":"input values"}]},{"kind":"text","text":" in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#onReturn(java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"OnReturn"}]},{"kind":"text","text":" events."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#collectExceptions(boolean)"},"code":true,"children":[{"kind":"text","text":"Errors"}]},{"kind":"text","text":": Enables access to "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionEvent#getException()"},"code":true,"children":[{"kind":"text","text":"errors"}]},{"kind":"text","text":" in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#onReturn(java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"OnReturn"}]},{"kind":"text","text":" events."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"If additional event data is collected then the peak performance overhead of execution listeners is significant. It is not recommended to collect additional event data when running production workloads."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Provided event instances may escape the event consumer and remain usable until the engine is closed."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Event Filters"}]},{"kind":"paragraph","children":[{"kind":"text","text":"Execution listeners can be applied to the following source elements:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#roots(boolean)"},"code":true,"children":[{"kind":"text","text":"Roots"}]},{"kind":"text","text":": Filter for marked program locations that represent a root of a function, method or closure."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#statements(boolean)"},"code":true,"children":[{"kind":"text","text":"Statements"}]},{"kind":"text","text":": Filter for marked program locations that represent a statement."}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#expressions(boolean)"},"code":true,"children":[{"kind":"text","text":"Expressions"}]},{"kind":"text","text":": Filter for marked program locations that represent an expression."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"At least one source element needs to be enabled otherwise an "},{"kind":"link","target":{"id":"java.lang.IllegalArgumentException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html"},"code":true,"children":[{"kind":"text","text":"IllegalArgumentException"}]},{"kind":"text","text":" will be thrown by the builder when it is "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#attach(org.graalvm.polyglot.Engine)"},"code":true,"children":[{"kind":"text","text":"attached"}]},{"kind":"text","text":". Not all source elements may be supported by a language. If the language does not support listening to a source element then no events will be triggered."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If multiple source elements are enabled, multiple or one event may be reported per source location. If this behavior is not desirable than multiple execution listeners for each source element can be created and attached."}]},{"kind":"paragraph","children":[{"kind":"text","text":"By default the execution listener is applied to all "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Source"},"code":true,"children":[{"kind":"text","text":"sources"}]},{"kind":"text","text":" that were loaded. A "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#sourceFilter(java.util.function.Predicate)"},"code":true,"children":[{"kind":"text","text":"source filter"}]},{"kind":"text","text":" may be attached to limit the number of sources that will trigger events."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Performance"}]},{"kind":"paragraph","children":[{"kind":"text","text":"The peak performance overhead of execution listeners depend on the granularity of the filter. Roots can be collected more efficiently than statement or expression events due to their frequency. If additional event data is collected then the peak performance overhead of execution listeners is significant. It is not recommended to collect additional event data when running production workloads."}]},{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#attach(org.graalvm.polyglot.Engine)"},"code":true,"children":[{"kind":"text","text":"Attaching"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener#close()"},"code":true,"children":[{"kind":"text","text":"closing"}]},{"kind":"text","text":" execution listeners are expensive operations and typically require to traverse through all loaded code. Code that was previously optimized will be deoptimized in the process. It is most efficient to attach an execution listener before any code is executed and let execution listeners automatically close with the engine."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Compatibility"}]},{"kind":"paragraph","children":[{"kind":"text","text":"Event execution order and granularity of events are language specific and may change without notice. There are no compatibility guarantees for that provided by the polyglot SDK. Certain language implementations may do so. Please see the language implementation documentation for further details."}]},{"kind":"heading","level":3,"children":[{"kind":"text","text":"Use-cases"}]},{"kind":"paragraph","children":[{"kind":"text","text":"Execution listeners are designed as simple API for polyglot embedders to capture cross cutting concerns of the execution of programs. For example, it can be used to count all statements executed in order to detect potentially malicious code. It is not designed to be an API for implementing fully fledged tools. The "},{"kind":"link","url":"http://www.graalvm.org/docs/graalvm-as-a-platform/implement-instrument/","children":[{"kind":"text","text":"Truffle instrumentation framework"}]},{"kind":"text","text":" should be used for that purpose instead."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionListener.java","line":194}},{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder","name":"ExecutionListener.Builder","kind":"class","language":"java","modifiers":["public","final"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"final"},{"kind":"punct","text":" "},{"kind":"keyword","text":"class"},{"kind":"punct","text":" "},{"kind":"name","text":"ExecutionListener.Builder"}],"superclass":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"ancestors":[{"id":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}],"enclosing":"org.graalvm.polyglot.management.ExecutionListener","members":[{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#onEnter(java.util.function.Consumer)","anchor":"onEnter(java.util.function.Consumer)","kind":"method","name":"onEnter","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"onEnter"},{"kind":"punct","text":"("},{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"ExecutionEvent","ref":"org.graalvm.polyglot.management.ExecutionEvent"},{"kind":"punct","text":"> "},{"kind":"param","text":"listener"},{"kind":"punct","text":")"}],"params":[{"name":"listener","type":[{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"ExecutionEvent","ref":"org.graalvm.polyglot.management.ExecutionEvent"},{"kind":"punct","text":">"}]}],"returns":{"type":[{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Set a listener that is notified when an execution of an element is entered."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Set a listener that is notified when an execution of an element is entered."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionListener.java","line":295}},{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#onReturn(java.util.function.Consumer)","anchor":"onReturn(java.util.function.Consumer)","kind":"method","name":"onReturn","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"onReturn"},{"kind":"punct","text":"("},{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"ExecutionEvent","ref":"org.graalvm.polyglot.management.ExecutionEvent"},{"kind":"punct","text":"> "},{"kind":"param","text":"listener"},{"kind":"punct","text":")"}],"params":[{"name":"listener","type":[{"kind":"type","text":"Consumer","ref":"java.util.function.Consumer","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Consumer.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"ExecutionEvent","ref":"org.graalvm.polyglot.management.ExecutionEvent"},{"kind":"punct","text":">"}]}],"returns":{"type":[{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Set a listener that is notified when an execution of an element was entered and completed."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Set a listener that is notified when an execution of an element was entered and completed."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionListener.java","line":306}},{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#sourceFilter(java.util.function.Predicate)","anchor":"sourceFilter(java.util.function.Predicate)","kind":"method","name":"sourceFilter","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"sourceFilter"},{"kind":"punct","text":"("},{"kind":"type","text":"Predicate","ref":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"},{"kind":"punct","text":"> "},{"kind":"param","text":"predicate"},{"kind":"punct","text":")"}],"params":[{"name":"predicate","type":[{"kind":"type","text":"Predicate","ref":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Source","ref":"org.graalvm.polyglot.Source"},{"kind":"punct","text":">"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the source predicate that returns "},{"kind":"code","text":"true"},{"kind":"text","text":" for a source to be included and "},{"kind":"code","text":"false"},{"kind":"text","text":" otherwise."}]}]}],"returns":{"type":[{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Set an addition filter that filters execution events by source."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Set an addition filter that filters execution events by source. By default all sources are included. Source predicates must be stable, i.e. always return the same result for a source. The filter predicate may be invoked on multiple threads at the same time."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionListener.java","line":320}},{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#rootNameFilter(java.util.function.Predicate)","anchor":"rootNameFilter(java.util.function.Predicate)","kind":"method","name":"rootNameFilter","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"rootNameFilter"},{"kind":"punct","text":"("},{"kind":"type","text":"Predicate","ref":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"predicate"},{"kind":"punct","text":")"}],"params":[{"name":"predicate","type":[{"kind":"type","text":"Predicate","ref":"java.util.function.Predicate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/function/Predicate.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":">"}]}],"returns":{"type":[{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Set an addition filter execution events by root name."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Set an addition filter execution events by root name. By default all root names are included. Root name predicates must be stable and always return the same result for source. The filter predicate may be invoked on multiple threads at the same time."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionListener.java","line":332}},{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#roots(boolean)","anchor":"roots(boolean)","kind":"method","name":"roots","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"roots"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"enabled"},{"kind":"punct","text":")"}],"params":[{"name":"enabled","type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" if enabled, else "},{"kind":"code","text":"false"}]}]}],"returns":{"type":[{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Include program locations that are marked as root of a function, method or closure."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Include program locations that are marked as root of a function, method or closure. By default no source elements are included."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#expressions(boolean)"},"code":true,"children":[{"kind":"text","text":"expressions(boolean)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#statements(boolean)"},"code":true,"children":[{"kind":"text","text":"statements(boolean)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionListener.java","line":346}},{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#statements(boolean)","anchor":"statements(boolean)","kind":"method","name":"statements","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"statements"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"enabled"},{"kind":"punct","text":")"}],"params":[{"name":"enabled","type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" if enabled, else "},{"kind":"code","text":"false"}]}]}],"returns":{"type":[{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Include program locations that are marked as statements."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Include program locations that are marked as statements. By default no source elements are included."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#expressions(boolean)"},"code":true,"children":[{"kind":"text","text":"expressions(boolean)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#roots(boolean)"},"code":true,"children":[{"kind":"text","text":"roots(boolean)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionListener.java","line":360}},{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#expressions(boolean)","anchor":"expressions(boolean)","kind":"method","name":"expressions","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"expressions"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"enabled"},{"kind":"punct","text":")"}],"params":[{"name":"enabled","type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" if enabled, else "},{"kind":"code","text":"false"}]}]}],"returns":{"type":[{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Include program locations that are marked as expressions."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Include program locations that are marked as expressions. By default no source elements are included."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#statements(boolean)"},"code":true,"children":[{"kind":"text","text":"statements(boolean)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#roots(boolean)"},"code":true,"children":[{"kind":"text","text":"roots(boolean)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionListener.java","line":374}},{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#collectInputValues(boolean)","anchor":"collectInputValues(boolean)","kind":"method","name":"collectInputValues","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"collectInputValues"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"enabled"},{"kind":"punct","text":")"}],"params":[{"name":"enabled","type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" if enabled, else "},{"kind":"code","text":"false"}]}]}],"returns":{"type":[{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Collect additional execution event data for input values."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Collect additional execution event data for input values. The input values may be accessed in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#onReturn(java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"OnReturn"}]},{"kind":"text","text":" events with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionEvent#getInputValues()"},"code":true,"children":[{"kind":"text","text":"ExecutionEvent.getInputValues()"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If additional event data is collected then the peak performance overhead of execution listeners is significant. It is not recommended to collect additional event data when running production workloads."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionListener.java","line":391}},{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#collectReturnValue(boolean)","anchor":"collectReturnValue(boolean)","kind":"method","name":"collectReturnValue","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"collectReturnValue"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"enabled"},{"kind":"punct","text":")"}],"params":[{"name":"enabled","type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" if enabled, else "},{"kind":"code","text":"false"}]}]}],"returns":{"type":[{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Collect additional execution event data about return values."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Collect additional execution event data about return values. The return value may be accessed in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#onReturn(java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"OnReturn"}]},{"kind":"text","text":" events with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionEvent#getReturnValue()"},"code":true,"children":[{"kind":"text","text":"ExecutionEvent.getReturnValue()"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If additional event data is collected then the peak performance overhead of execution listeners is significant. It is not recommended to collect additional event data when running production workloads."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionListener.java","line":408}},{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#collectExceptions(boolean)","anchor":"collectExceptions(boolean)","kind":"method","name":"collectExceptions","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"},{"kind":"punct","text":" "},{"kind":"name","text":"collectExceptions"},{"kind":"punct","text":"("},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"param","text":"enabled"},{"kind":"punct","text":")"}],"params":[{"name":"enabled","type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" if enabled, else "},{"kind":"code","text":"false"}]}]}],"returns":{"type":[{"kind":"type","text":"ExecutionListener.Builder","ref":"org.graalvm.polyglot.management.ExecutionListener$Builder"}]},"doc":{"summary":[{"kind":"text","text":"Collect additional execution event data about errors."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Collect additional execution event data about errors. The error may be accessed in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#onReturn(java.util.function.Consumer)"},"code":true,"children":[{"kind":"text","text":"OnReturn"}]},{"kind":"text","text":" events with "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionEvent#getException()"},"code":true,"children":[{"kind":"text","text":"ExecutionEvent.getException()"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"If additional event data is collected then the peak performance overhead of execution listeners is significant. It is not recommended to collect additional event data when running production workloads."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionListener.java","line":424}},{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#toString()","anchor":"toString()","kind":"method","name":"toString","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"name","text":"toString"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},"overrides":{"id":"java.lang.Object#toString()","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()"},"since":"25.3","source":{"path":"org/graalvm/polyglot/management/ExecutionListener.java","line":434}},{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#attach(org.graalvm.polyglot.Engine)","anchor":"attach(org.graalvm.polyglot.Engine)","kind":"method","name":"attach","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"type","text":"ExecutionListener","ref":"org.graalvm.polyglot.management.ExecutionListener"},{"kind":"punct","text":" "},{"kind":"name","text":"attach"},{"kind":"punct","text":"("},{"kind":"type","text":"Engine","ref":"org.graalvm.polyglot.Engine"},{"kind":"punct","text":" "},{"kind":"param","text":"engine"},{"kind":"punct","text":")"}],"params":[{"name":"engine","type":[{"kind":"type","text":"Engine","ref":"org.graalvm.polyglot.Engine"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the engine to attach to"}]}]}],"returns":{"type":[{"kind":"type","text":"ExecutionListener","ref":"org.graalvm.polyglot.management.ExecutionListener"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the attached closable execution listener."}]}]},"throws":[{"type":[{"kind":"type","text":"PolyglotException","ref":"org.graalvm.polyglot.PolyglotException"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if one of the provided filter predicate fails."}]}]}],"doc":{"summary":[{"kind":"text","text":"Creates a new execution listener using the current builder configuration and attaches it to an engine."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new execution listener using the current builder configuration and attaches it to an engine. The same builder configuration may be used to attach multiple listeners."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Execution listeners cannot be attached to engines that were statically looked up using "},{"kind":"code","text":"\nContext."},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#getCurrent()"},"code":true,"children":[{"kind":"text","text":"getCurrent()"}]},{"kind":"code","text":"."},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#getEngine()"},"code":true,"children":[{"kind":"text","text":"getEngine()"}]},{"kind":"code","text":"\n"},{"kind":"text","text":". For security reasons only the original "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context$Builder#build()"},"code":true,"children":[{"kind":"text","text":"creator"}]},{"kind":"text","text":" of the context or engine is allowed to perform this action."}]},{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener$Builder#attach(org.graalvm.polyglot.Engine)"},"code":true,"children":[{"kind":"text","text":"Attaching"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionListener#close()"},"code":true,"children":[{"kind":"text","text":"closing"}]},{"kind":"text","text":" execution listeners are expensive operations and typically require to traverse through all loaded code. Code that was previously optimized will be deoptimized in the process. It is most efficient to attach an execution listener before any code is executed and let execution listeners automatically close with the engine."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionListener.java","line":501}}],"inherited":[{"from":{"id":"java.lang.Object","text":"Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},"kind":"class","members":[{"id":"java.lang.Object#clone()","text":"clone","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()"},{"id":"java.lang.Object#equals(java.lang.Object)","text":"equals","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"},{"id":"java.lang.Object#finalize()","text":"finalize","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()"},{"id":"java.lang.Object#getClass()","text":"getClass","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()"},{"id":"java.lang.Object#hashCode()","text":"hashCode","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()"},{"id":"java.lang.Object#notify()","text":"notify","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()"},{"id":"java.lang.Object#notifyAll()","text":"notifyAll","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()"},{"id":"java.lang.Object#wait()","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()"},{"id":"java.lang.Object#wait(long)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)"},{"id":"java.lang.Object#wait(long,int)","text":"wait","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)"}]}],"doc":{"summary":[{"kind":"text","text":"A builder used to construct execution events."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"A builder used to construct execution events. Builder instances are not thread-safe and may not be used from multiple threads at the same time."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.management.ExecutionEvent"},"code":true,"children":[{"kind":"text","text":"For further details."}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/management/ExecutionListener.java","line":273}}]},{"id":"org.graalvm.polyglot.proxy","name":"org.graalvm.polyglot.proxy","doc":{"summary":[{"kind":"text","text":"The GraalVM SDK proxy interfaces allow to mimic guest language objects, arrays, executables, primitives and native objects in Graal languages."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"The GraalVM SDK proxy interfaces allow to mimic guest language objects, arrays, executables, primitives and native objects in Graal languages. Every Graal language will treat instances of proxies like an object of that particular language. Multiple proxy interfaces can be implemented at the same time. For example, it is useful to provide proxy values that are objects with members and arrays at the same time."}]},{"kind":"paragraph","children":[{"kind":"text","text":"See "},{"kind":"link","url":"http://www.graalvm.org/docs/embed","children":[{"kind":"text","text":"graalvm.org"}]},{"kind":"text","text":" for more examples on how to use this API."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"for more an overview over all available proxy interfaces."}]}]]},"since":"19.0","types":[{"id":"org.graalvm.polyglot.proxy.Proxy","name":"Proxy","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"Proxy"}],"doc":{"summary":[{"kind":"text","text":"Proxy interfaces allow to mimic guest language objects, arrays, executables, primitives and native objects in Graal languages."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Proxy interfaces allow to mimic guest language objects, arrays, executables, primitives and native objects in Graal languages. Every Graal language will treat instances of proxies like an object of that particular language. Multiple proxy interfaces can be implemented at the same time. For example, it is useful to provide proxy values that are objects with members and arrays at the same time."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Exceptions thrown by proxies are wrapped with a "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" when the proxy is invoked in a guest language. It is possible to unwrap the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException"},"code":true,"children":[{"kind":"text","text":"PolyglotException"}]},{"kind":"text","text":" using "},{"kind":"link","target":{"id":"org.graalvm.polyglot.PolyglotException#asHostException()"},"code":true,"children":[{"kind":"text","text":"PolyglotException.asHostException()"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The interfaces "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"Proxy"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyArray"},"code":true,"children":[{"kind":"text","text":"ProxyArray"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyExecutable"},"code":true,"children":[{"kind":"text","text":"ProxyExecutable"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyInstantiable"},"code":true,"children":[{"kind":"text","text":"ProxyInstantiable"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyNativeObject"},"code":true,"children":[{"kind":"text","text":"ProxyNativeObject"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyObject"},"code":true,"children":[{"kind":"text","text":"ProxyObject"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyIterable"},"code":true,"children":[{"kind":"text","text":"ProxyIterable"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyIterator"},"code":true,"children":[{"kind":"text","text":"ProxyIterator"}]},{"kind":"text","text":" can be used in combination with any other proxy interfaces."}]},{"kind":"paragraph","children":[{"kind":"text","text":"The following proxy interface combinations are exclusive and throw an "},{"kind":"link","target":{"id":"java.lang.AssertionError","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AssertionError.html"},"code":true,"children":[{"kind":"text","text":"AssertionError"}]},{"kind":"text","text":" if used together:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyDuration"},"code":true,"children":[{"kind":"text","text":"ProxyDuration"}]}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyInstant"},"code":true,"children":[{"kind":"text","text":"ProxyInstant"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyDate"},"code":true,"children":[{"kind":"text","text":"ProxyDate"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyTime"},"code":true,"children":[{"kind":"text","text":"ProxyTime"}]},{"kind":"text","text":" or "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyTimeZone"},"code":true,"children":[{"kind":"text","text":"ProxyTimeZone"}]},{"kind":"text","text":"."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"The following proxy interface combinations are invalid and throw an "},{"kind":"link","target":{"id":"java.lang.AssertionError","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AssertionError.html"},"code":true,"children":[{"kind":"text","text":"AssertionError"}]},{"kind":"text","text":" if used:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"text","text":"If "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyTimeZone"},"code":true,"children":[{"kind":"text","text":"ProxyTimeZone"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyDate"},"code":true,"children":[{"kind":"text","text":"ProxyDate"}]},{"kind":"text","text":" without "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyTime"},"code":true,"children":[{"kind":"text","text":"ProxyTime"}]}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"If "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyTimeZone"},"code":true,"children":[{"kind":"text","text":"ProxyTimeZone"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyTime"},"code":true,"children":[{"kind":"text","text":"ProxyTime"}]},{"kind":"text","text":" without "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyDate"},"code":true,"children":[{"kind":"text","text":"ProxyDate"}]},{"kind":"text","text":"."}]}]]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyArray"},"code":true,"children":[{"kind":"text","text":"to mimic arrays"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyObject"},"code":true,"children":[{"kind":"text","text":"to mimic objects with members"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyExecutable"},"code":true,"children":[{"kind":"text","text":"to mimic objects that can be executed"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyNativeObject"},"code":true,"children":[{"kind":"text","text":"to mimic native objects"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyDate"},"code":true,"children":[{"kind":"text","text":"to mimic date objects"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyTime"},"code":true,"children":[{"kind":"text","text":"to mimic time objects"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyTimeZone"},"code":true,"children":[{"kind":"text","text":"to mimic timezone objects"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyDuration"},"code":true,"children":[{"kind":"text","text":"to mimic duration objects"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyInstant"},"code":true,"children":[{"kind":"text","text":"to mimic timestamp objects"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyInstantiable"},"code":true,"children":[{"kind":"text","text":"to mimic objects that are instantiable"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyIterable"},"code":true,"children":[{"kind":"text","text":"to mimic iterable objects"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyIterator"},"code":true,"children":[{"kind":"text","text":"to mimic iterator objects"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyHashMap"},"code":true,"children":[{"kind":"text","text":"to mimic map objects"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/Proxy.java","line":90}},{"id":"org.graalvm.polyglot.proxy.ProxyArray","name":"ProxyArray","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"ProxyArray"},{"kind":"punct","text":" "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"ProxyIterable","ref":"org.graalvm.polyglot.proxy.ProxyIterable"}],"interfaces":[[{"kind":"type","text":"ProxyIterable","ref":"org.graalvm.polyglot.proxy.ProxyIterable"}]],"members":[{"id":"org.graalvm.polyglot.proxy.ProxyArray#get(long)","anchor":"get(long)","kind":"method","name":"get","signature":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"name","text":"get"},{"kind":"punct","text":"("},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"index"},{"kind":"punct","text":")"}],"params":[{"name":"index","type":[{"kind":"keyword","text":"long"}]}],"returns":{"type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]},"throws":[{"type":[{"kind":"type","text":"ArrayIndexOutOfBoundsException","ref":"java.lang.ArrayIndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the index is out of bounds"}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the operation is not supported"}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the element at the given index."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the element at the given index."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyArray.java","line":66}},{"id":"org.graalvm.polyglot.proxy.ProxyArray#set(long,org.graalvm.polyglot.Value)","anchor":"set(long,org.graalvm.polyglot.Value)","kind":"method","name":"set","signature":[{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"set"},{"kind":"punct","text":"("},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"index"},{"kind":"punct","text":", "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":")"}],"params":[{"name":"index","type":[{"kind":"keyword","text":"long"}]},{"name":"value","type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]}],"throws":[{"type":[{"kind":"type","text":"ArrayIndexOutOfBoundsException","ref":"java.lang.ArrayIndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the index is out of bounds"}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the operation is not supported"}]}]}],"doc":{"summary":[{"kind":"text","text":"Sets the element at the given index."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets the element at the given index."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyArray.java","line":75}},{"id":"org.graalvm.polyglot.proxy.ProxyArray#remove(long)","anchor":"remove(long)","kind":"method","name":"remove","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"remove"},{"kind":"punct","text":"("},{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"param","text":"index"},{"kind":"punct","text":")"}],"params":[{"name":"index","type":[{"kind":"keyword","text":"long"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" when the element was removed, "},{"kind":"code","text":"false"},{"kind":"text","text":" when the element didn't exist."}]}]},"throws":[{"type":[{"kind":"type","text":"ArrayIndexOutOfBoundsException","ref":"java.lang.ArrayIndexOutOfBoundsException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the index is out of bounds"}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the operation is not supported"}]}]}],"doc":{"summary":[{"kind":"text","text":"Removes the element at the given index."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Removes the element at the given index."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyArray.java","line":86}},{"id":"org.graalvm.polyglot.proxy.ProxyArray#getSize()","anchor":"getSize()","kind":"method","name":"getSize","signature":[{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"name","text":"getSize"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"long"}]},"doc":{"summary":[{"kind":"text","text":"Returns the reported size of the array."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the reported size of the array. The returned size of an array does not limit a guest language to get and set values using arbitrary indices. The array size is typically used by Graal languages to traverse the array."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyArray.java","line":98}},{"id":"org.graalvm.polyglot.proxy.ProxyArray#getIterator()","anchor":"getIterator()","kind":"method","name":"getIterator","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getIterator"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]},"overrides":{"id":"org.graalvm.polyglot.proxy.ProxyIterable#getIterator()"},"doc":{"summary":[{"kind":"text","text":"Returns an iterator."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns an iterator. The returned object must be interpreted as an iterator using the semantics of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]},{"kind":"text","text":" otherwise an "},{"kind":"link","target":{"id":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"},"code":true,"children":[{"kind":"text","text":"IllegalStateException"}]},{"kind":"text","text":" is thrown. Examples for valid return values are:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyIterator"},"code":true,"children":[{"kind":"text","text":"ProxyIterator"}]}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},"code":true,"children":[{"kind":"text","text":"Iterator"}]},{"kind":"text","text":", requires "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowIteratorAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"host iterable access"}]}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"A guest language object representing an iterator"}]}]]}]},"since":"20.1","source":{"path":"org/graalvm/polyglot/proxy/ProxyArray.java","line":105}},{"id":"org.graalvm.polyglot.proxy.ProxyArray#fromArray(java.lang.Object...)","anchor":"fromArray(java.lang.Object...)","kind":"method","name":"fromArray","modifiers":["static"],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"ProxyArray","ref":"org.graalvm.polyglot.proxy.ProxyArray"},{"kind":"punct","text":" "},{"kind":"name","text":"fromArray"},{"kind":"punct","text":"("},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":"... "},{"kind":"param","text":"values"},{"kind":"punct","text":")"}],"params":[{"name":"values","type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":"..."}],"varargs":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"the Object[] array or the vararg arguments to be proxied."}]}]}],"returns":{"type":[{"kind":"type","text":"ProxyArray","ref":"org.graalvm.polyglot.proxy.ProxyArray"}]},"doc":{"summary":[{"kind":"text","text":"Creates a proxy array backed by a Java Object array."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a proxy array backed by a Java Object array. If the set values of the array are host values then they will be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asHostObject()"},"code":true,"children":[{"kind":"text","text":"unboxed"}]},{"kind":"text","text":". Note this function expects a variable number of arguments of type Object, thus might not work as expected on non-Object array types. For instance, an int array will be stored as the first element of the resulting proxy array. To flatten it out, convert it to an Object array first (e.g. with "},{"kind":"code","text":"Arrays.stream( myIntArray ).boxed().toArray();"},{"kind":"text","text":")."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyArray.java","line":123}},{"id":"org.graalvm.polyglot.proxy.ProxyArray#fromList(java.util.List)","anchor":"fromList(java.util.List)","kind":"method","name":"fromList","modifiers":["static"],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"ProxyArray","ref":"org.graalvm.polyglot.proxy.ProxyArray"},{"kind":"punct","text":" "},{"kind":"name","text":"fromList"},{"kind":"punct","text":"("},{"kind":"type","text":"List","ref":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"values"},{"kind":"punct","text":")"}],"params":[{"name":"values","type":[{"kind":"type","text":"List","ref":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":">"}]}],"returns":{"type":[{"kind":"type","text":"ProxyArray","ref":"org.graalvm.polyglot.proxy.ProxyArray"}]},"doc":{"summary":[{"kind":"text","text":"Creates a proxy array backed by a Java List."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a proxy array backed by a Java List. If the set values of the list are host values then the they will be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asHostObject()"},"code":true,"children":[{"kind":"text","text":"unboxed"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyArray.java","line":155}}],"doc":{"summary":[{"kind":"text","text":"Interface to be implemented to mimic guest language arrays."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Interface to be implemented to mimic guest language arrays. Arrays are always interpreted as zero-based arrays, independent of whether the Graal language uses one-based arrays. For example an access to array index one in a language with one-based arrays will access the proxy array at index zero."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"Proxy"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyArray.java","line":57}},{"id":"org.graalvm.polyglot.proxy.ProxyDate","name":"ProxyDate","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"ProxyDate"},{"kind":"punct","text":" "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}],"interfaces":[[{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}]],"members":[{"id":"org.graalvm.polyglot.proxy.ProxyDate#asDate()","anchor":"asDate()","kind":"method","name":"asDate","signature":[{"kind":"type","text":"LocalDate","ref":"java.time.LocalDate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalDate.html"},{"kind":"punct","text":" "},{"kind":"name","text":"asDate"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"LocalDate","ref":"java.time.LocalDate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalDate.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns the date information."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the date information. The returned value must not be "},{"kind":"code","text":"null"},{"kind":"text","text":"."}]}]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyDate.java","line":61}},{"id":"org.graalvm.polyglot.proxy.ProxyDate#from(java.time.LocalDate)","anchor":"from(java.time.LocalDate)","kind":"method","name":"from","modifiers":["static"],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"ProxyDate","ref":"org.graalvm.polyglot.proxy.ProxyDate"},{"kind":"punct","text":" "},{"kind":"name","text":"from"},{"kind":"punct","text":"("},{"kind":"type","text":"LocalDate","ref":"java.time.LocalDate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalDate.html"},{"kind":"punct","text":" "},{"kind":"param","text":"date"},{"kind":"punct","text":")"}],"params":[{"name":"date","type":[{"kind":"type","text":"LocalDate","ref":"java.time.LocalDate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalDate.html"}]}],"returns":{"type":[{"kind":"type","text":"ProxyDate","ref":"org.graalvm.polyglot.proxy.ProxyDate"}]},"doc":{"summary":[{"kind":"text","text":"Creates a proxy date from a local date."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a proxy date from a local date."}]}]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyDate.java","line":68}}],"doc":{"summary":[{"kind":"text","text":"Interface to be implemented to mimic guest language objects that represents dates."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Interface to be implemented to mimic guest language objects that represents dates."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"Proxy"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"Value"}]}]]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyDate.java","line":54}},{"id":"org.graalvm.polyglot.proxy.ProxyDuration","name":"ProxyDuration","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"ProxyDuration"},{"kind":"punct","text":" "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}],"interfaces":[[{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}]],"members":[{"id":"org.graalvm.polyglot.proxy.ProxyDuration#asDuration()","anchor":"asDuration()","kind":"method","name":"asDuration","signature":[{"kind":"type","text":"Duration","ref":"java.time.Duration","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Duration.html"},{"kind":"punct","text":" "},{"kind":"name","text":"asDuration"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Duration","ref":"java.time.Duration","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Duration.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns the duration information."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the duration information. The returned value must not be "},{"kind":"code","text":"null"},{"kind":"text","text":"."}]}]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyDuration.java","line":61}},{"id":"org.graalvm.polyglot.proxy.ProxyDuration#from(java.time.Duration)","anchor":"from(java.time.Duration)","kind":"method","name":"from","modifiers":["static"],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"ProxyDuration","ref":"org.graalvm.polyglot.proxy.ProxyDuration"},{"kind":"punct","text":" "},{"kind":"name","text":"from"},{"kind":"punct","text":"("},{"kind":"type","text":"Duration","ref":"java.time.Duration","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Duration.html"},{"kind":"punct","text":" "},{"kind":"param","text":"duration"},{"kind":"punct","text":")"}],"params":[{"name":"duration","type":[{"kind":"type","text":"Duration","ref":"java.time.Duration","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Duration.html"}]}],"returns":{"type":[{"kind":"type","text":"ProxyDuration","ref":"org.graalvm.polyglot.proxy.ProxyDuration"}]},"doc":{"summary":[{"kind":"text","text":"Creates a proxy duration from a duration."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a proxy duration from a duration."}]}]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyDuration.java","line":68}}],"doc":{"summary":[{"kind":"text","text":"Interface to be implemented to mimic guest language objects that represents durations."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Interface to be implemented to mimic guest language objects that represents durations."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"Proxy"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"Value"}]}]]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyDuration.java","line":54}},{"id":"org.graalvm.polyglot.proxy.ProxyExecutable","name":"ProxyExecutable","kind":"interface","language":"java","modifiers":["public"],"annotations":[[{"kind":"annotation","text":"@FunctionalInterface","ref":"java.lang.FunctionalInterface","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/FunctionalInterface.html"}]],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"ProxyExecutable"},{"kind":"punct","text":" "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}],"interfaces":[[{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}]],"members":[{"id":"org.graalvm.polyglot.proxy.ProxyExecutable#execute(org.graalvm.polyglot.Value...)","anchor":"execute(org.graalvm.polyglot.Value...)","kind":"method","name":"execute","signature":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"name","text":"execute"},{"kind":"punct","text":"("},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":"... "},{"kind":"param","text":"arguments"},{"kind":"punct","text":")"}],"params":[{"name":"arguments","type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":"..."}],"varargs":true}],"returns":{"type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the proxy cannot be executed with the given arguments."}]}]}],"doc":{"summary":[{"kind":"text","text":"Executes the object with the given arguments and returns its result."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Executes the object with the given arguments and returns its result."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyExecutable.java","line":61}}],"doc":{"summary":[{"kind":"text","text":"Interface to be implemented to mimic guest language objects that are executable."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Interface to be implemented to mimic guest language objects that are executable."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"Proxy"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyExecutable.java","line":51}},{"id":"org.graalvm.polyglot.proxy.ProxyHashMap","name":"ProxyHashMap","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"ProxyHashMap"},{"kind":"punct","text":" "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}],"interfaces":[[{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}]],"members":[{"id":"org.graalvm.polyglot.proxy.ProxyHashMap#getHashSize()","anchor":"getHashSize()","kind":"method","name":"getHashSize","signature":[{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"name","text":"getHashSize"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"long"}]},"doc":{"summary":[{"kind":"text","text":"Returns the number of map entries."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the number of map entries."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/proxy/ProxyHashMap.java","line":66}},{"id":"org.graalvm.polyglot.proxy.ProxyHashMap#hasHashEntry(org.graalvm.polyglot.Value)","anchor":"hasHashEntry(org.graalvm.polyglot.Value)","kind":"method","name":"hasHashEntry","signature":[{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasHashEntry"},{"kind":"punct","text":"("},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"param","text":"key"},{"kind":"punct","text":")"}],"params":[{"name":"key","type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the proxy object contains a mapping for the specified key, or else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the proxy object contains a mapping for the specified key, or else "},{"kind":"code","text":"false"},{"kind":"text","text":". Every key which returns "},{"kind":"code","text":"true"},{"kind":"text","text":" for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyHashMap#hasHashEntry(org.graalvm.polyglot.Value)"},"code":true,"children":[{"kind":"text","text":"hasHashEntry(Value)"}]},{"kind":"text","text":" must be included in the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#isIterator()"},"code":true,"children":[{"kind":"text","text":"iterator"}]},{"kind":"text","text":" returned by "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyHashMap#getHashEntriesIterator()"},"code":true,"children":[{"kind":"text","text":"getHashEntriesIterator()"}]},{"kind":"text","text":" to allow guest language to enumerate map entries."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyHashMap#getHashEntriesIterator()"},"code":true,"children":[{"kind":"text","text":"getHashEntriesIterator()"}]}]]},"since":"21.1","source":{"path":"org/graalvm/polyglot/proxy/ProxyHashMap.java","line":77}},{"id":"org.graalvm.polyglot.proxy.ProxyHashMap#getHashValue(org.graalvm.polyglot.Value)","anchor":"getHashValue(org.graalvm.polyglot.Value)","kind":"method","name":"getHashValue","signature":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getHashValue"},{"kind":"punct","text":"("},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"param","text":"key"},{"kind":"punct","text":")"}],"params":[{"name":"key","type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]}],"returns":{"type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the operation is unsupported"}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the value for the specified key."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the value for the specified key."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/proxy/ProxyHashMap.java","line":85}},{"id":"org.graalvm.polyglot.proxy.ProxyHashMap#putHashEntry(org.graalvm.polyglot.Value,org.graalvm.polyglot.Value)","anchor":"putHashEntry(org.graalvm.polyglot.Value,org.graalvm.polyglot.Value)","kind":"method","name":"putHashEntry","signature":[{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"putHashEntry"},{"kind":"punct","text":"("},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"param","text":"key"},{"kind":"punct","text":", "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":")"}],"params":[{"name":"key","type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]},{"name":"value","type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]}],"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the operation is unsupported"}]}]}],"doc":{"summary":[{"kind":"text","text":"Associates the specified value with the specified key."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Associates the specified value with the specified key. If the mapping for the specified key does not "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyHashMap#hasHashEntry(org.graalvm.polyglot.Value)"},"code":true,"children":[{"kind":"text","text":"exist"}]},{"kind":"text","text":" then a new mapping is defined otherwise, an existing mapping is updated."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/proxy/ProxyHashMap.java","line":95}},{"id":"org.graalvm.polyglot.proxy.ProxyHashMap#removeHashEntry(org.graalvm.polyglot.Value)","anchor":"removeHashEntry(org.graalvm.polyglot.Value)","kind":"method","name":"removeHashEntry","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"removeHashEntry"},{"kind":"punct","text":"("},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"param","text":"key"},{"kind":"punct","text":")"}],"params":[{"name":"key","type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" when the mapping was removed, "},{"kind":"code","text":"false"},{"kind":"text","text":" when the mapping didn't exist."}]}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the operation is unsupported"}]}]}],"doc":{"summary":[{"kind":"text","text":"Removes the mapping for a given key."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Removes the mapping for a given key. If the removal of existing mappings is not supported then an "},{"kind":"link","target":{"id":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},"code":true,"children":[{"kind":"text","text":"UnsupportedOperationException"}]},{"kind":"text","text":" is thrown."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/proxy/ProxyHashMap.java","line":106}},{"id":"org.graalvm.polyglot.proxy.ProxyHashMap#getHashEntriesIterator()","anchor":"getHashEntriesIterator()","kind":"method","name":"getHashEntriesIterator","signature":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getHashEntriesIterator"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns the hash entries iterator."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the hash entries iterator. The returned object must be interpreted as an iterator using the semantics of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]},{"kind":"text","text":" otherwise an "},{"kind":"link","target":{"id":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"},"code":true,"children":[{"kind":"text","text":"IllegalStateException"}]},{"kind":"text","text":" is thrown. The iterator elements must be interpreted as two elements array using the semantics of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]},{"kind":"text","text":"."}]},{"kind":"paragraph","children":[{"kind":"text","text":"Examples for valid return values are:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyIterator"},"code":true,"children":[{"kind":"text","text":"ProxyIterator"}]}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},"code":true,"children":[{"kind":"text","text":"Iterator"}]},{"kind":"text","text":", requires "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowIteratorAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"host iterable access"}]}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"A guest language object representing an iterator"}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"Examples for valid iterator elements are:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyArray"},"code":true,"children":[{"kind":"text","text":"ProxyArray"}]}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},"code":true,"children":[{"kind":"text","text":"List"}]},{"kind":"text","text":", requires "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowListAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"host list access"}]}]}],[{"kind":"paragraph","children":[{"kind":"code","text":"Object[2]"},{"kind":"text","text":", requires "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowArrayAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"host array access"}]}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.util.Map$Entry","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.Entry.html"},"code":true,"children":[{"kind":"text","text":"Entry"}]},{"kind":"text","text":", requires "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowMapAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"host map access"}]}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"A guest language object representing an array"}]}]]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyIterator"},"code":true,"children":[{"kind":"text","text":"ProxyIterator"}]}]]},"since":"21.1","source":{"path":"org/graalvm/polyglot/proxy/ProxyHashMap.java","line":136}},{"id":"org.graalvm.polyglot.proxy.ProxyHashMap#from(java.util.Map)","anchor":"from(java.util.Map)","kind":"method","name":"from","modifiers":["static"],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"ProxyHashMap","ref":"org.graalvm.polyglot.proxy.ProxyHashMap"},{"kind":"punct","text":" "},{"kind":"name","text":"from"},{"kind":"punct","text":"("},{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":", "},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"values"},{"kind":"punct","text":")"}],"params":[{"name":"values","type":[{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":", "},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":">"}]}],"returns":{"type":[{"kind":"type","text":"ProxyHashMap","ref":"org.graalvm.polyglot.proxy.ProxyHashMap"}]},"doc":{"summary":[{"kind":"text","text":"Creates a proxy hash map backed by a Java "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"Map"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a proxy hash map backed by a Java "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"Map"}]},{"kind":"text","text":". The map keys are "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#as(java.lang.Class)"},"code":true,"children":[{"kind":"text","text":"as Object unboxed"}]},{"kind":"text","text":". If the set values are host values then they will be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asHostObject()"},"code":true,"children":[{"kind":"text","text":"unboxed"}]},{"kind":"text","text":"."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/proxy/ProxyHashMap.java","line":145}}],"doc":{"summary":[{"kind":"text","text":"Interface to be implemented to mimic guest language hash maps."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Interface to be implemented to mimic guest language hash maps."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"Proxy"}]}]]},"since":"21.1","source":{"path":"org/graalvm/polyglot/proxy/ProxyHashMap.java","line":59}},{"id":"org.graalvm.polyglot.proxy.ProxyInstant","name":"ProxyInstant","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"ProxyInstant"},{"kind":"punct","text":" "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"ProxyDate","ref":"org.graalvm.polyglot.proxy.ProxyDate"},{"kind":"punct","text":", "},{"kind":"type","text":"ProxyTime","ref":"org.graalvm.polyglot.proxy.ProxyTime"},{"kind":"punct","text":", "},{"kind":"type","text":"ProxyTimeZone","ref":"org.graalvm.polyglot.proxy.ProxyTimeZone"}],"interfaces":[[{"kind":"type","text":"ProxyDate","ref":"org.graalvm.polyglot.proxy.ProxyDate"}],[{"kind":"type","text":"ProxyTime","ref":"org.graalvm.polyglot.proxy.ProxyTime"}],[{"kind":"type","text":"ProxyTimeZone","ref":"org.graalvm.polyglot.proxy.ProxyTimeZone"}]],"members":[{"id":"org.graalvm.polyglot.proxy.ProxyInstant#asInstant()","anchor":"asInstant()","kind":"method","name":"asInstant","signature":[{"kind":"type","text":"Instant","ref":"java.time.Instant","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Instant.html"},{"kind":"punct","text":" "},{"kind":"name","text":"asInstant"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Instant","ref":"java.time.Instant","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Instant.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns the instant information."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the instant information. The returned value must not be "},{"kind":"code","text":"null"},{"kind":"text","text":". The following invariant must always hold for instant proxies:"}]},{"kind":"code","text":"ProxyInstant proxy = ...\nZoneId zone = proxy.getTimeZone();\nLocalDate date = proxy.getDate();\nLocalTime time = proxy.getTime();\nassert ZonedDateTime.of(date, time, zone).equals(proxy.getInstant());"}]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyInstant.java","line":76}},{"id":"org.graalvm.polyglot.proxy.ProxyInstant#asDate()","anchor":"asDate()","kind":"method","name":"asDate","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"type","text":"LocalDate","ref":"java.time.LocalDate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalDate.html"},{"kind":"punct","text":" "},{"kind":"name","text":"asDate"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"LocalDate","ref":"java.time.LocalDate","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalDate.html"}]},"overrides":{"id":"org.graalvm.polyglot.proxy.ProxyDate#asDate()"},"doc":{"summary":[{"kind":"text","text":"Returns the date information."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the date information. The returned value must not be "},{"kind":"code","text":"null"},{"kind":"text","text":". The invariant specified in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyInstant#asInstant()"},"code":true,"children":[{"kind":"text","text":"asInstant()"}]},{"kind":"text","text":" must always hold for proxy instant values."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyInstant#asInstant()"},"code":true,"children":[{"kind":"text","text":"asInstant()"}]}]]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyInstant.java","line":86}},{"id":"org.graalvm.polyglot.proxy.ProxyInstant#asTime()","anchor":"asTime()","kind":"method","name":"asTime","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"type","text":"LocalTime","ref":"java.time.LocalTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalTime.html"},{"kind":"punct","text":" "},{"kind":"name","text":"asTime"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"LocalTime","ref":"java.time.LocalTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalTime.html"}]},"overrides":{"id":"org.graalvm.polyglot.proxy.ProxyTime#asTime()"},"doc":{"summary":[{"kind":"text","text":"Returns the time information."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the time information. The returned value must not be "},{"kind":"code","text":"null"},{"kind":"text","text":". The invariant specified in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyInstant#asInstant()"},"code":true,"children":[{"kind":"text","text":"asInstant()"}]},{"kind":"text","text":" must always hold for proxy instant values."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyInstant#asInstant()"},"code":true,"children":[{"kind":"text","text":"asInstant()"}]}]]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyInstant.java","line":98}},{"id":"org.graalvm.polyglot.proxy.ProxyInstant#asTimeZone()","anchor":"asTimeZone()","kind":"method","name":"asTimeZone","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"type","text":"ZoneId","ref":"java.time.ZoneId","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/ZoneId.html"},{"kind":"punct","text":" "},{"kind":"name","text":"asTimeZone"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"ZoneId","ref":"java.time.ZoneId","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/ZoneId.html"}]},"overrides":{"id":"org.graalvm.polyglot.proxy.ProxyTimeZone#asTimeZone()"},"doc":{"summary":[{"kind":"text","text":"Returns the timezone information."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the timezone information. The returned value must not be "},{"kind":"code","text":"null"},{"kind":"text","text":". The invariant specified in "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyInstant#asInstant()"},"code":true,"children":[{"kind":"text","text":"asInstant()"}]},{"kind":"text","text":" must always hold for proxy instant values."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyInstant#asInstant()"},"code":true,"children":[{"kind":"text","text":"asInstant()"}]}]]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyInstant.java","line":110}},{"id":"org.graalvm.polyglot.proxy.ProxyInstant#from(java.time.Instant)","anchor":"from(java.time.Instant)","kind":"method","name":"from","modifiers":["static"],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"ProxyInstant","ref":"org.graalvm.polyglot.proxy.ProxyInstant"},{"kind":"punct","text":" "},{"kind":"name","text":"from"},{"kind":"punct","text":"("},{"kind":"type","text":"Instant","ref":"java.time.Instant","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Instant.html"},{"kind":"punct","text":" "},{"kind":"param","text":"instant"},{"kind":"punct","text":")"}],"params":[{"name":"instant","type":[{"kind":"type","text":"Instant","ref":"java.time.Instant","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/Instant.html"}]}],"returns":{"type":[{"kind":"type","text":"ProxyInstant","ref":"org.graalvm.polyglot.proxy.ProxyInstant"}]},"doc":{"summary":[{"kind":"text","text":"Creates a new proxy instant from a Java instant value."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new proxy instant from a Java instant value."}]}]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyInstant.java","line":119}}],"doc":{"summary":[{"kind":"text","text":"Interface to be implemented to mimic guest language objects that represents timestamps."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Interface to be implemented to mimic guest language objects that represents timestamps. This interface also implements "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyDate"},"code":true,"children":[{"kind":"text","text":"ProxyDate"}]},{"kind":"text","text":", "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyTime"},"code":true,"children":[{"kind":"text","text":"ProxyTime"}]},{"kind":"text","text":" and "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyTimeZone"},"code":true,"children":[{"kind":"text","text":"ProxyTimeZone"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"Proxy"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"Value"}]}]]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyInstant.java","line":59}},{"id":"org.graalvm.polyglot.proxy.ProxyInstantiable","name":"ProxyInstantiable","kind":"interface","language":"java","modifiers":["public"],"annotations":[[{"kind":"annotation","text":"@FunctionalInterface","ref":"java.lang.FunctionalInterface","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/FunctionalInterface.html"}]],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"ProxyInstantiable"},{"kind":"punct","text":" "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}],"interfaces":[[{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}]],"members":[{"id":"org.graalvm.polyglot.proxy.ProxyInstantiable#newInstance(org.graalvm.polyglot.Value...)","anchor":"newInstance(org.graalvm.polyglot.Value...)","kind":"method","name":"newInstance","signature":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"name","text":"newInstance"},{"kind":"punct","text":"("},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":"... "},{"kind":"param","text":"arguments"},{"kind":"punct","text":")"}],"params":[{"name":"arguments","type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":"..."}],"varargs":true}],"returns":{"type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the proxy cannot be instantiated with the given arguments."}]}]}],"doc":{"summary":[{"kind":"text","text":"Creates a new instance of the object with the given arguments."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a new instance of the object with the given arguments."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyInstantiable.java","line":61}}],"doc":{"summary":[{"kind":"text","text":"Interface to be implemented to mimic guest language objects that are instantiable."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Interface to be implemented to mimic guest language objects that are instantiable."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"Proxy"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyInstantiable.java","line":51}},{"id":"org.graalvm.polyglot.proxy.ProxyIterable","name":"ProxyIterable","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"ProxyIterable"},{"kind":"punct","text":" "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}],"interfaces":[[{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}]],"members":[{"id":"org.graalvm.polyglot.proxy.ProxyIterable#getIterator()","anchor":"getIterator()","kind":"method","name":"getIterator","signature":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getIterator"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns an iterator."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns an iterator. The returned object must be interpreted as an iterator using the semantics of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]},{"kind":"text","text":" otherwise an "},{"kind":"link","target":{"id":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"},"code":true,"children":[{"kind":"text","text":"IllegalStateException"}]},{"kind":"text","text":" is thrown. Examples for valid return values are:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyIterator"},"code":true,"children":[{"kind":"text","text":"ProxyIterator"}]}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},"code":true,"children":[{"kind":"text","text":"Iterator"}]},{"kind":"text","text":", requires "},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess$Builder#allowIteratorAccess(boolean)"},"code":true,"children":[{"kind":"text","text":"host iterable access"}]}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"A guest language object representing an iterator"}]}]]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyIterator"},"code":true,"children":[{"kind":"text","text":"ProxyIterator"}]}]]},"since":"21.1","source":{"path":"org/graalvm/polyglot/proxy/ProxyIterable.java","line":72}},{"id":"org.graalvm.polyglot.proxy.ProxyIterable#from(java.lang.Iterable)","anchor":"from(java.lang.Iterable)","kind":"method","name":"from","modifiers":["static"],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"ProxyIterable","ref":"org.graalvm.polyglot.proxy.ProxyIterable"},{"kind":"punct","text":" "},{"kind":"name","text":"from"},{"kind":"punct","text":"("},{"kind":"type","text":"Iterable","ref":"java.lang.Iterable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"iterable"},{"kind":"punct","text":")"}],"params":[{"name":"iterable","type":[{"kind":"type","text":"Iterable","ref":"java.lang.Iterable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":">"}]}],"returns":{"type":[{"kind":"type","text":"ProxyIterable","ref":"org.graalvm.polyglot.proxy.ProxyIterable"}]},"doc":{"summary":[{"kind":"text","text":"Creates a proxy iterable backed by a Java "},{"kind":"link","target":{"id":"java.lang.Iterable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html"},"code":true,"children":[{"kind":"text","text":"Iterable"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a proxy iterable backed by a Java "},{"kind":"link","target":{"id":"java.lang.Iterable","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Iterable.html"},"code":true,"children":[{"kind":"text","text":"Iterable"}]},{"kind":"text","text":". If the values of the iterable are host values then they will be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asHostObject()"},"code":true,"children":[{"kind":"text","text":"unboxed"}]},{"kind":"text","text":"."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/proxy/ProxyIterable.java","line":80}}],"doc":{"summary":[{"kind":"text","text":"Interface to be implemented to mimic guest language iterables."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Interface to be implemented to mimic guest language iterables."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"Proxy"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyIterator"},"code":true,"children":[{"kind":"text","text":"ProxyIterator"}]}]]},"since":"21.1","source":{"path":"org/graalvm/polyglot/proxy/ProxyIterable.java","line":56}},{"id":"org.graalvm.polyglot.proxy.ProxyIterator","name":"ProxyIterator","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"ProxyIterator"},{"kind":"punct","text":" "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}],"interfaces":[[{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}]],"members":[{"id":"org.graalvm.polyglot.proxy.ProxyIterator#hasNext()","anchor":"hasNext()","kind":"method","name":"hasNext","signature":[{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasNext"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the iterator has more elements, else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the iterator has more elements, else "},{"kind":"code","text":"false"},{"kind":"text","text":". Multiple calls to the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyIterator#hasNext()"},"code":true,"children":[{"kind":"text","text":"hasNext()"}]},{"kind":"text","text":" might lead to different results if the underlying data structure is modified."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyIterator#getNext()"},"code":true,"children":[{"kind":"text","text":"getNext()"}]}]]},"since":"21.1","source":{"path":"org/graalvm/polyglot/proxy/ProxyIterator.java","line":67}},{"id":"org.graalvm.polyglot.proxy.ProxyIterator#getNext()","anchor":"getNext()","kind":"method","name":"getNext","signature":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getNext"},{"kind":"punct","text":"() "},{"kind":"keyword","text":"throws"},{"kind":"punct","text":" "},{"kind":"type","text":"NoSuchElementException","ref":"java.util.NoSuchElementException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/NoSuchElementException.html"},{"kind":"punct","text":", "},{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"returns":{"type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]},"throws":[{"type":[{"kind":"type","text":"NoSuchElementException","ref":"java.util.NoSuchElementException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/NoSuchElementException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the iteration has no more elements, the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyIterator#hasNext()"},"code":true,"children":[{"kind":"text","text":"hasNext()"}]},{"kind":"text","text":" returns "},{"kind":"code","text":"false"},{"kind":"text","text":"."}]}]},{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"declared":true,"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"when the underlying iterator element exists but is not readable."}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the next element in the iteration."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the next element in the iteration. When the underlying data structure is modified the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyIterator#getNext()"},"code":true,"children":[{"kind":"text","text":"getNext()"}]},{"kind":"text","text":" may throw the "},{"kind":"link","target":{"id":"java.util.NoSuchElementException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/NoSuchElementException.html"},"code":true,"children":[{"kind":"text","text":"NoSuchElementException"}]},{"kind":"text","text":" even when the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyIterator#hasNext()"},"code":true,"children":[{"kind":"text","text":"hasNext()"}]},{"kind":"text","text":" returned "},{"kind":"code","text":"true"},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyIterator#hasNext()"},"code":true,"children":[{"kind":"text","text":"hasNext()"}]}]]},"since":"21.1","source":{"path":"org/graalvm/polyglot/proxy/ProxyIterator.java","line":82}},{"id":"org.graalvm.polyglot.proxy.ProxyIterator#from(java.util.Iterator)","anchor":"from(java.util.Iterator)","kind":"method","name":"from","modifiers":["static"],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"ProxyIterator","ref":"org.graalvm.polyglot.proxy.ProxyIterator"},{"kind":"punct","text":" "},{"kind":"name","text":"from"},{"kind":"punct","text":"("},{"kind":"type","text":"Iterator","ref":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},{"kind":"punct","text":"<?> "},{"kind":"param","text":"iterator"},{"kind":"punct","text":")"}],"params":[{"name":"iterator","type":[{"kind":"type","text":"Iterator","ref":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},{"kind":"punct","text":"<?>"}]}],"returns":{"type":[{"kind":"type","text":"ProxyIterator","ref":"org.graalvm.polyglot.proxy.ProxyIterator"}]},"doc":{"summary":[{"kind":"text","text":"Creates a proxy iterator backed by a Java "},{"kind":"link","target":{"id":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},"code":true,"children":[{"kind":"text","text":"Iterator"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a proxy iterator backed by a Java "},{"kind":"link","target":{"id":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},"code":true,"children":[{"kind":"text","text":"Iterator"}]},{"kind":"text","text":". If the set values are host values then they will be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asHostObject()"},"code":true,"children":[{"kind":"text","text":"unboxed"}]},{"kind":"text","text":". If the Java "},{"kind":"link","target":{"id":"java.util.Iterator","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Iterator.html"},"code":true,"children":[{"kind":"text","text":"Iterator"}]},{"kind":"text","text":" throws the "},{"kind":"link","target":{"id":"java.util.ConcurrentModificationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/ConcurrentModificationException.html"},"code":true,"children":[{"kind":"text","text":"ConcurrentModificationException"}]},{"kind":"text","text":" the exception is translated into the host exception."}]}]},"since":"21.1","source":{"path":"org/graalvm/polyglot/proxy/ProxyIterator.java","line":92}}],"doc":{"summary":[{"kind":"text","text":"Interface to be implemented to mimic guest language iterators."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Interface to be implemented to mimic guest language iterators."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"Proxy"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyIterable"},"code":true,"children":[{"kind":"text","text":"ProxyIterable"}]}]]},"since":"21.1","source":{"path":"org/graalvm/polyglot/proxy/ProxyIterator.java","line":57}},{"id":"org.graalvm.polyglot.proxy.ProxyNativeObject","name":"ProxyNativeObject","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"ProxyNativeObject"},{"kind":"punct","text":" "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}],"interfaces":[[{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}]],"members":[{"id":"org.graalvm.polyglot.proxy.ProxyNativeObject#asPointer()","anchor":"asPointer()","kind":"method","name":"asPointer","signature":[{"kind":"keyword","text":"long"},{"kind":"punct","text":" "},{"kind":"name","text":"asPointer"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"keyword","text":"long"}]},"doc":{"summary":[{"kind":"text","text":"Returns the native pointer value that this object represents."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the native pointer value that this object represents."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyNativeObject.java","line":56}}],"doc":{"summary":[{"kind":"text","text":"Interface to be implemented to mimic native pointers."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Interface to be implemented to mimic native pointers."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyNativeObject#asPointer()"},"code":true,"children":[{"kind":"text","text":"asPointer()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyNativeObject.java","line":49}},{"id":"org.graalvm.polyglot.proxy.ProxyObject","name":"ProxyObject","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"ProxyObject"},{"kind":"punct","text":" "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}],"interfaces":[[{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}]],"members":[{"id":"org.graalvm.polyglot.proxy.ProxyObject#getMember(java.lang.String)","anchor":"getMember(java.lang.String)","kind":"method","name":"getMember","signature":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getMember"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"key"},{"kind":"punct","text":")"}],"params":[{"name":"key","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the operation is unsupported"}]}]}],"doc":{"summary":[{"kind":"text","text":"Returns the value of the member."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the value of the member."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyObject.java","line":64}},{"id":"org.graalvm.polyglot.proxy.ProxyObject#getMemberKeys()","anchor":"getMemberKeys()","kind":"method","name":"getMemberKeys","signature":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":" "},{"kind":"name","text":"getMemberKeys"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns an array of member keys."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns an array of member keys. The returned array must be interpreted as having array elements using the semantics of "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]},{"kind":"text","text":" and taking host access into consideration. Otherwise, an "},{"kind":"link","target":{"id":"java.lang.IllegalStateException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html"},"code":true,"children":[{"kind":"text","text":"IllegalStateException"}]},{"kind":"text","text":" is thrown. If one of the return values of the array is not a "},{"kind":"link","target":{"id":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":" then a "},{"kind":"link","target":{"id":"java.lang.ClassCastException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/ClassCastException.html"},"code":true,"children":[{"kind":"text","text":"ClassCastException"}]},{"kind":"text","text":" is thrown. Examples for valid return values are:"}]},{"kind":"list","items":[[{"kind":"paragraph","children":[{"kind":"code","text":"null"},{"kind":"text","text":" for no member keys"}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyArray"},"code":true,"children":[{"kind":"text","text":"ProxyArray"}]},{"kind":"text","text":" that returns "},{"kind":"link","target":{"id":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},"code":true,"children":[{"kind":"text","text":"String"}]},{"kind":"text","text":" values for each array element"}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.util.List","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html"},"code":true,"children":[{"kind":"text","text":"List"}]},{"kind":"text","text":" with exclusively String elements ("},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"HostAccess"}]},{"kind":"text","text":" must allowListAccess)"}]}],[{"kind":"paragraph","children":[{"kind":"link","target":{"id":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},"code":true,"children":[{"kind":"text","text":"String[]"}]},{"kind":"text","text":" ("},{"kind":"link","target":{"id":"org.graalvm.polyglot.HostAccess"},"code":true,"children":[{"kind":"text","text":"HostAccess"}]},{"kind":"text","text":" must allowArrayAccess)"}]}],[{"kind":"paragraph","children":[{"kind":"text","text":"A guest language object representing an array of strings."}]}]]},{"kind":"paragraph","children":[{"kind":"text","text":"Every member key returned by the "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyObject#getMemberKeys()"},"code":true,"children":[{"kind":"text","text":"getMemberKeys()"}]},{"kind":"text","text":" method must return "},{"kind":"code","text":"true"},{"kind":"text","text":" for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyObject#hasMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"hasMember(String)"}]},{"kind":"text","text":"."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyObject#hasMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"hasMember(String)"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Context#asValue(java.lang.Object)"},"code":true,"children":[{"kind":"text","text":"Context.asValue(Object)"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyObject.java","line":86}},{"id":"org.graalvm.polyglot.proxy.ProxyObject#hasMember(java.lang.String)","anchor":"hasMember(java.lang.String)","kind":"method","name":"hasMember","signature":[{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"hasMember"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"key"},{"kind":"punct","text":")"}],"params":[{"name":"key","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}]},"doc":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the proxy object contains a member with the given key, or else "},{"kind":"code","text":"false"},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns "},{"kind":"code","text":"true"},{"kind":"text","text":" if the proxy object contains a member with the given key, or else "},{"kind":"code","text":"false"},{"kind":"text","text":". While not required ever member key which returns "},{"kind":"code","text":"true"},{"kind":"text","text":" for "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyObject#hasMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"hasMember(String)"}]},{"kind":"text","text":" should be returned by "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyObject#getMemberKeys()"},"code":true,"children":[{"kind":"text","text":"getMemberKeys()"}]},{"kind":"text","text":" to allow guest members to list member keys."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyObject#getMemberKeys()"},"code":true,"children":[{"kind":"text","text":"getMemberKeys()"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyObject.java","line":97}},{"id":"org.graalvm.polyglot.proxy.ProxyObject#putMember(java.lang.String,org.graalvm.polyglot.Value)","anchor":"putMember(java.lang.String,org.graalvm.polyglot.Value)","kind":"method","name":"putMember","signature":[{"kind":"keyword","text":"void"},{"kind":"punct","text":" "},{"kind":"name","text":"putMember"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"key"},{"kind":"punct","text":", "},{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"},{"kind":"punct","text":" "},{"kind":"param","text":"value"},{"kind":"punct","text":")"}],"params":[{"name":"key","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]},{"name":"value","type":[{"kind":"type","text":"Value","ref":"org.graalvm.polyglot.Value"}]}],"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the operation is unsupported"}]}]}],"doc":{"summary":[{"kind":"text","text":"Sets the value associated with a member."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Sets the value associated with a member. If the member does not "},{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.ProxyObject#hasMember(java.lang.String)"},"code":true,"children":[{"kind":"text","text":"exist"}]},{"kind":"text","text":" then a new member is defined. If the definition of new members is not supported then an "},{"kind":"link","target":{"id":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},"code":true,"children":[{"kind":"text","text":"UnsupportedOperationException"}]},{"kind":"text","text":" is thrown."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyObject.java","line":107}},{"id":"org.graalvm.polyglot.proxy.ProxyObject#removeMember(java.lang.String)","anchor":"removeMember(java.lang.String)","kind":"method","name":"removeMember","modifiers":["default"],"signature":[{"kind":"keyword","text":"default"},{"kind":"punct","text":" "},{"kind":"keyword","text":"boolean"},{"kind":"punct","text":" "},{"kind":"name","text":"removeMember"},{"kind":"punct","text":"("},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":" "},{"kind":"param","text":"key"},{"kind":"punct","text":")"}],"params":[{"name":"key","type":[{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"}]}],"returns":{"type":[{"kind":"keyword","text":"boolean"}],"doc":[{"kind":"paragraph","children":[{"kind":"code","text":"true"},{"kind":"text","text":" when the member was removed, "},{"kind":"code","text":"false"},{"kind":"text","text":" when the member didn't exist."}]}]},"throws":[{"type":[{"kind":"type","text":"UnsupportedOperationException","ref":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"}],"doc":[{"kind":"paragraph","children":[{"kind":"text","text":"if the operation is unsupported"}]}]}],"doc":{"summary":[{"kind":"text","text":"Removes a member key and its value."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Removes a member key and its value. If the removal of existing members is not supported then an "},{"kind":"link","target":{"id":"java.lang.UnsupportedOperationException","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/UnsupportedOperationException.html"},"code":true,"children":[{"kind":"text","text":"UnsupportedOperationException"}]},{"kind":"text","text":" is thrown."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyObject.java","line":118}},{"id":"org.graalvm.polyglot.proxy.ProxyObject#fromMap(java.util.Map)","anchor":"fromMap(java.util.Map)","kind":"method","name":"fromMap","modifiers":["static"],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"ProxyObject","ref":"org.graalvm.polyglot.proxy.ProxyObject"},{"kind":"punct","text":" "},{"kind":"name","text":"fromMap"},{"kind":"punct","text":"("},{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":"> "},{"kind":"param","text":"values"},{"kind":"punct","text":")"}],"params":[{"name":"values","type":[{"kind":"type","text":"Map","ref":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},{"kind":"punct","text":"<"},{"kind":"type","text":"String","ref":"java.lang.String","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html"},{"kind":"punct","text":", "},{"kind":"type","text":"Object","ref":"java.lang.Object","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html"},{"kind":"punct","text":">"}]}],"returns":{"type":[{"kind":"type","text":"ProxyObject","ref":"org.graalvm.polyglot.proxy.ProxyObject"}]},"doc":{"summary":[{"kind":"text","text":"Creates a proxy backed by a "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"Map"}]},{"kind":"text","text":"."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a proxy backed by a "},{"kind":"link","target":{"id":"java.util.Map","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html"},"code":true,"children":[{"kind":"text","text":"Map"}]},{"kind":"text","text":". If the set values of the map are host values then the they will be "},{"kind":"link","target":{"id":"org.graalvm.polyglot.Value#asHostObject()"},"code":true,"children":[{"kind":"text","text":"unboxed"}]},{"kind":"text","text":"."}]}]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyObject.java","line":129}}],"doc":{"summary":[{"kind":"text","text":"Interface to be implemented to mimic guest language objects that contain members."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Interface to be implemented to mimic guest language objects that contain members."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"Proxy"}]}]]},"since":"19.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyObject.java","line":56}},{"id":"org.graalvm.polyglot.proxy.ProxyTime","name":"ProxyTime","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"ProxyTime"},{"kind":"punct","text":" "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}],"interfaces":[[{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}]],"members":[{"id":"org.graalvm.polyglot.proxy.ProxyTime#asTime()","anchor":"asTime()","kind":"method","name":"asTime","signature":[{"kind":"type","text":"LocalTime","ref":"java.time.LocalTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalTime.html"},{"kind":"punct","text":" "},{"kind":"name","text":"asTime"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"LocalTime","ref":"java.time.LocalTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalTime.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns the time information."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the time information. The returned value must not be "},{"kind":"code","text":"null"},{"kind":"text","text":"."}]}]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyTime.java","line":61}},{"id":"org.graalvm.polyglot.proxy.ProxyTime#from(java.time.LocalTime)","anchor":"from(java.time.LocalTime)","kind":"method","name":"from","modifiers":["static"],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"ProxyTime","ref":"org.graalvm.polyglot.proxy.ProxyTime"},{"kind":"punct","text":" "},{"kind":"name","text":"from"},{"kind":"punct","text":"("},{"kind":"type","text":"LocalTime","ref":"java.time.LocalTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalTime.html"},{"kind":"punct","text":" "},{"kind":"param","text":"time"},{"kind":"punct","text":")"}],"params":[{"name":"time","type":[{"kind":"type","text":"LocalTime","ref":"java.time.LocalTime","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/LocalTime.html"}]}],"returns":{"type":[{"kind":"type","text":"ProxyTime","ref":"org.graalvm.polyglot.proxy.ProxyTime"}]},"doc":{"summary":[{"kind":"text","text":"Creates a proxy time from a local time."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a proxy time from a local time."}]}]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyTime.java","line":68}}],"doc":{"summary":[{"kind":"text","text":"Interface to be implemented to mimic guest language objects that represents times."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Interface to be implemented to mimic guest language objects that represents times."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"Proxy"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"Value"}]}]]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyTime.java","line":54}},{"id":"org.graalvm.polyglot.proxy.ProxyTimeZone","name":"ProxyTimeZone","kind":"interface","language":"java","modifiers":["public"],"signature":[{"kind":"keyword","text":"public"},{"kind":"punct","text":" "},{"kind":"keyword","text":"interface"},{"kind":"punct","text":" "},{"kind":"name","text":"ProxyTimeZone"},{"kind":"punct","text":" "},{"kind":"keyword","text":"extends"},{"kind":"punct","text":" "},{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}],"interfaces":[[{"kind":"type","text":"Proxy","ref":"org.graalvm.polyglot.proxy.Proxy"}]],"members":[{"id":"org.graalvm.polyglot.proxy.ProxyTimeZone#asTimeZone()","anchor":"asTimeZone()","kind":"method","name":"asTimeZone","signature":[{"kind":"type","text":"ZoneId","ref":"java.time.ZoneId","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/ZoneId.html"},{"kind":"punct","text":" "},{"kind":"name","text":"asTimeZone"},{"kind":"punct","text":"()"}],"returns":{"type":[{"kind":"type","text":"ZoneId","ref":"java.time.ZoneId","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/ZoneId.html"}]},"doc":{"summary":[{"kind":"text","text":"Returns the timezone information."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Returns the timezone information. The returned value must not be "},{"kind":"code","text":"null"},{"kind":"text","text":"."}]}]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyTimeZone.java","line":62}},{"id":"org.graalvm.polyglot.proxy.ProxyTimeZone#from(java.time.ZoneId)","anchor":"from(java.time.ZoneId)","kind":"method","name":"from","modifiers":["static"],"signature":[{"kind":"keyword","text":"static"},{"kind":"punct","text":" "},{"kind":"type","text":"ProxyTimeZone","ref":"org.graalvm.polyglot.proxy.ProxyTimeZone"},{"kind":"punct","text":" "},{"kind":"name","text":"from"},{"kind":"punct","text":"("},{"kind":"type","text":"ZoneId","ref":"java.time.ZoneId","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/ZoneId.html"},{"kind":"punct","text":" "},{"kind":"param","text":"timeZone"},{"kind":"punct","text":")"}],"params":[{"name":"timeZone","type":[{"kind":"type","text":"ZoneId","ref":"java.time.ZoneId","url":"https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/time/ZoneId.html"}]}],"returns":{"type":[{"kind":"type","text":"ProxyTimeZone","ref":"org.graalvm.polyglot.proxy.ProxyTimeZone"}]},"doc":{"summary":[{"kind":"text","text":"Creates a proxy timezone from a ZoneId."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Creates a proxy timezone from a ZoneId."}]}]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyTimeZone.java","line":69}}],"doc":{"summary":[{"kind":"text","text":"Interface to be implemented to mimic guest language objects that represents timezones."}],"body":[{"kind":"paragraph","children":[{"kind":"text","text":"Interface to be implemented to mimic guest language objects that represents timezones."}]}],"see":[[{"kind":"link","target":{"id":"org.graalvm.polyglot.proxy.Proxy"},"code":true,"children":[{"kind":"text","text":"Proxy"}]}],[{"kind":"link","target":{"id":"org.graalvm.polyglot.Value"},"code":true,"children":[{"kind":"text","text":"Value"}]}]]},"since":"19.2.0","source":{"path":"org/graalvm/polyglot/proxy/ProxyTimeZone.java","line":55}}]}]}