• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Page Information

    Loading...
  1. Dashboard
  2. Undefined Space
  3. Nashorn
  4. Nashorn jsr223 engine notes

Page History

Versions Compared

Old Version 17

changes.mady.by.user Sundararajan Athijegannathan

Saved on Mar 29, 2016

compared with

New Version 18

changes.mady.by.user Sundararajan Athijegannathan

Saved on May 14, 2016

  • Previous Change: Difference between versions 16 and 17
  • Next Change: Difference between versions 18 and 19
  • View Page History

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you want to explicitly wrap a script object to a ScriptObjectMirror instance and pass along to any API (which may even accept Object), you can use jdk.nashorn.api.scripting.ScriptUtils class's wrap method. Similarly you can explicitly unwrap a ScriptObjectMirror to a script object via unwrap method. Note that unwrap won't unwrap the object if it is not a wrapper of object created with the current global object. In most instances you won't have to wrap/unwrap manually. In Java code, always operate on ScriptObjectMirror instances and in script you'll always see normal ScriptObject (unwrapped) instances automatically.

JavaDoc for

...

Nashorn specific API

...

jdk.nashorn.api.* is considered to be fairly stable the only Nashorn specific API package (extension to javax.script). Anything else is considered to be Nashorn implementation detail and can/will be changed in future.Java 8 jdk.nashorn.api javadoc

jdk8: https://docs.oracle.com/javase/8/docs/jdk/api/nashorn/jdk/nashorn/api/scripting/JSObject.html

jdk9 http://download.java.net/jdk9/docs/jdk/api/nashorn/

...

Overview
Content Tools
ThemeBuilder

Terms of Use • License: GPLv2 • Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Adaptavist ThemeBuilder Powered by Atlassian Confluence 7.4.13
  • Adaptavist ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Adaptavist ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 539, "requestCorrelationId": "b13def1150dba903"}