jdk.nashorn.internal.runtime.Version Java Examples
The following examples show how to use
jdk.nashorn.internal.runtime.Version.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NashornScriptEngineFactory.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Override public Object getParameter(final String key) { switch (key) { case ScriptEngine.NAME: return "javascript"; case ScriptEngine.ENGINE: return "Oracle Nashorn"; case ScriptEngine.ENGINE_VERSION: return Version.version(); case ScriptEngine.LANGUAGE: return "ECMAScript"; case ScriptEngine.LANGUAGE_VERSION: return "ECMA - 262 Edition 5.1"; case "THREADING": // The engine implementation is not thread-safe. Can't be // used to execute scripts concurrently on multiple threads. return null; default: return null; } }
Example #2
Source File: NashornScriptEngineFactory.java From nashorn with GNU General Public License v2.0 | 6 votes |
@Override public Object getParameter(final String key) { switch (key) { case ScriptEngine.NAME: return "javascript"; case ScriptEngine.ENGINE: return "Oracle Nashorn"; case ScriptEngine.ENGINE_VERSION: return Version.version(); case ScriptEngine.LANGUAGE: return "ECMAScript"; case ScriptEngine.LANGUAGE_VERSION: return "ECMA - 262 Edition 5.1"; case "THREADING": // The engine implementation is not thread-safe. Can't be // used to execute scripts concurrently on multiple threads. return null; default: throw new IllegalArgumentException("Invalid key"); } }
Example #3
Source File: NashornScriptEngineFactory.java From jdk8u_nashorn with GNU General Public License v2.0 | 6 votes |
@Override public Object getParameter(final String key) { switch (key) { case ScriptEngine.NAME: return "javascript"; case ScriptEngine.ENGINE: return "Oracle Nashorn"; case ScriptEngine.ENGINE_VERSION: return Version.version(); case ScriptEngine.LANGUAGE: return "ECMAScript"; case ScriptEngine.LANGUAGE_VERSION: return "ECMA - 262 Edition 5.1"; case "THREADING": // The engine implementation is not thread-safe. Can't be // used to execute scripts concurrently on multiple threads. return null; default: return null; } }
Example #4
Source File: NashornScriptEngineFactory.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
@Override public Object getParameter(final String key) { switch (key) { case ScriptEngine.NAME: return "javascript"; case ScriptEngine.ENGINE: return "Oracle Nashorn"; case ScriptEngine.ENGINE_VERSION: return Version.version(); case ScriptEngine.LANGUAGE: return "ECMAScript"; case ScriptEngine.LANGUAGE_VERSION: return "ECMA - 262 Edition 5.1"; case "THREADING": // The engine implementation is not thread-safe. Can't be // used to execute scripts concurrently on multiple threads. return null; default: throw new IllegalArgumentException("Invalid key"); } }
Example #5
Source File: NashornScriptEngineFactory.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
@Override public Object getParameter(final String key) { switch (key) { case ScriptEngine.NAME: return "javascript"; case ScriptEngine.ENGINE: return "Oracle Nashorn"; case ScriptEngine.ENGINE_VERSION: return Version.version(); case ScriptEngine.LANGUAGE: return "ECMAScript"; case ScriptEngine.LANGUAGE_VERSION: return "ECMA - 262 Edition 5.1"; case "THREADING": // The engine implementation is not thread-safe. Can't be // used to execute scripts concurrently on multiple threads. return null; default: throw new IllegalArgumentException("Invalid key"); } }
Example #6
Source File: NashornScriptEngineFactory.java From hottub with GNU General Public License v2.0 | 6 votes |
@Override public Object getParameter(final String key) { switch (key) { case ScriptEngine.NAME: return "javascript"; case ScriptEngine.ENGINE: return "Oracle Nashorn"; case ScriptEngine.ENGINE_VERSION: return Version.version(); case ScriptEngine.LANGUAGE: return "ECMAScript"; case ScriptEngine.LANGUAGE_VERSION: return "ECMA - 262 Edition 5.1"; case "THREADING": // The engine implementation is not thread-safe. Can't be // used to execute scripts concurrently on multiple threads. return null; default: return null; } }
Example #7
Source File: NashornScriptEngineFactory.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@Override public Object getParameter(final String key) { switch (key) { case ScriptEngine.NAME: return "javascript"; case ScriptEngine.ENGINE: return "Oracle Nashorn"; case ScriptEngine.ENGINE_VERSION: return Version.version(); case ScriptEngine.LANGUAGE: return "ECMAScript"; case ScriptEngine.LANGUAGE_VERSION: return "ECMA - 262 Edition 5.1"; case "THREADING": // The engine implementation is not thread-safe. Can't be // used to execute scripts concurrently on multiple threads. return null; default: return null; } }
Example #8
Source File: NashornScriptEngineFactory.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@Override public Object getParameter(final String key) { switch (key) { case ScriptEngine.NAME: return "javascript"; case ScriptEngine.ENGINE: return "Oracle Nashorn"; case ScriptEngine.ENGINE_VERSION: return Version.version(); case ScriptEngine.LANGUAGE: return "ECMAScript"; case ScriptEngine.LANGUAGE_VERSION: return "ECMA - 262 Edition 5.1"; case "THREADING": // The engine implementation is not thread-safe. Can't be // used to execute scripts concurrently on multiple threads. return null; default: return null; } }
Example #9
Source File: NashornScriptEngineFactory.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@Override public Object getParameter(final String key) { switch (key) { case ScriptEngine.NAME: return "javascript"; case ScriptEngine.ENGINE: return "Oracle Nashorn"; case ScriptEngine.ENGINE_VERSION: return Version.version(); case ScriptEngine.LANGUAGE: return "ECMAScript"; case ScriptEngine.LANGUAGE_VERSION: return "ECMA - 262 Edition 5.1"; case "THREADING": // The engine implementation is not thread-safe. Can't be // used to execute scripts concurrently on multiple threads. return null; default: return null; } }
Example #10
Source File: NashornScriptEngineFactory.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
@Override public Object getParameter(final String key) { switch (key) { case ScriptEngine.NAME: return "javascript"; case ScriptEngine.ENGINE: return "Oracle Nashorn"; case ScriptEngine.ENGINE_VERSION: return Version.version(); case ScriptEngine.LANGUAGE: return "ECMAScript"; case ScriptEngine.LANGUAGE_VERSION: return "ECMA - 262 Edition 5.1"; case "THREADING": // The engine implementation is not thread-safe. Can't be // used to execute scripts concurrently on multiple threads. return null; default: return null; } }
Example #11
Source File: TrustedScriptEngineTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
@Test public void versionTest() { final ScriptEngineManager m = new ScriptEngineManager(); final ScriptEngine e = m.getEngineByName("nashorn"); assertEquals(e.getFactory().getEngineVersion(), Version.version()); }
Example #12
Source File: TrustedScriptEngineTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Test public void versionTest() { final ScriptEngineManager m = new ScriptEngineManager(); final ScriptEngine e = m.getEngineByName("nashorn"); assertEquals(e.getFactory().getEngineVersion(), Version.version()); }
Example #13
Source File: TrustedScriptEngineTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@Test public void versionTest() { final ScriptEngineManager m = new ScriptEngineManager(); final ScriptEngine e = m.getEngineByName("nashorn"); assertEquals(e.getFactory().getEngineVersion(), Version.version()); }
Example #14
Source File: TrustedScriptEngineTest.java From hottub with GNU General Public License v2.0 | 4 votes |
@Test public void versionTest() { final ScriptEngineManager m = new ScriptEngineManager(); final ScriptEngine e = m.getEngineByName("nashorn"); assertEquals(e.getFactory().getEngineVersion(), Version.version()); }
Example #15
Source File: TrustedScriptEngineTest.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
@Test public void versionTest() { final ScriptEngineManager m = new ScriptEngineManager(); final ScriptEngine e = m.getEngineByName("nashorn"); assertEquals(e.getFactory().getEngineVersion(), Version.version()); }
Example #16
Source File: TrustedScriptEngineTest.java From jdk8u_nashorn with GNU General Public License v2.0 | 4 votes |
@Test public void versionTest() { final ScriptEngineManager m = new ScriptEngineManager(); final ScriptEngine e = m.getEngineByName("nashorn"); assertEquals(e.getFactory().getEngineVersion(), Version.version()); }
Example #17
Source File: TrustedScriptEngineTest.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@Test public void versionTest() { final ScriptEngineManager m = new ScriptEngineManager(); final ScriptEngine e = m.getEngineByName("nashorn"); assertEquals(e.getFactory().getEngineVersion(), Version.version()); }