Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 11 jdk.scripting.nashorn.jmod - Scripting Nashorn Module
JDK 11 jdk.scripting.nashorn.jmod is the JMOD file for JDK 11 Scripting Nashorn module.
JDK 11 Scripting Nashorn module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.scripting.nashorn.jmod.
JDK 11 Scripting Nashorn module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Scripting Nashorn module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.scripting.nashorn.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/nashorn/internal/objects/NativeJavaImporter.java
/* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.nashorn.internal.objects; import jdk.dynalink.beans.StaticClass; import jdk.nashorn.internal.objects.annotations.Constructor; import jdk.nashorn.internal.objects.annotations.ScriptClass; import jdk.nashorn.internal.runtime.Context; import jdk.nashorn.internal.runtime.FindProperty; import jdk.nashorn.internal.runtime.NativeJavaPackage; import jdk.nashorn.internal.runtime.PropertyMap; import jdk.nashorn.internal.runtime.ScriptObject; /** * This is "JavaImporter" constructor. This constructor allows you to use Java types omitting explicit package names. * Objects of this constructor are used along with {@code "with"} statements and as such are not usable in ECMAScript * strict mode. Example: * <pre> * var imports = new JavaImporter(java.util, java.io); * with (imports) { * var m = new HashMap(); // java.util.HashMap * var f = new File("."); // java.io.File * ... * } * </pre> * Note however that the preferred way for accessing Java types in Nashorn is through the use of * {@link NativeJava#type(Object, Object) Java.type()} method. */ @ScriptClass("JavaImporter") public final class NativeJavaImporter extends ScriptObject { private final Object[] args; // initialized by nasgen private static PropertyMap $nasgenmap$; private NativeJavaImporter(final Object[] args, final ScriptObject proto, final PropertyMap map) { super(proto, map); this.args = args; } private NativeJavaImporter(final Object[] args, final Global global) { this(args, global.getJavaImporterPrototype(), $nasgenmap$); } private NativeJavaImporter(final Object[] args) { this(args, Global.instance()); } @Override public String getClassName() { return "JavaImporter"; } /** * Constructor * @param isNew is the new operator used for instantiating this NativeJavaImporter * @param self self reference * @param args arguments * @return NativeJavaImporter instance */ @Constructor(arity = 1) public static NativeJavaImporter constructor(final boolean isNew, final Object self, final Object... args) { return new NativeJavaImporter(args); } @Override protected FindProperty findProperty(final Object key, final boolean deep, final boolean isScope, final ScriptObject start) { final FindProperty find = super.findProperty(key, deep, isScope, start); if (find == null && key instanceof String) { final String name = (String) key; final Object value = createProperty(name); if(value != null) { // We must avoid calling findProperty recursively, so we pass null as first argument setObject(null, 0, key, value); return super.findProperty(key, deep, isScope, start); } } return find; } private Object createProperty(final String name) { final int len = args.length; for (int i = len - 1; i > -1; i--) { final Object obj = args[i]; if (obj instanceof StaticClass) { if (((StaticClass)obj).getRepresentedClass().getSimpleName().equals(name)) { return obj; } } else if (obj instanceof NativeJavaPackage) { final String pkgName = ((NativeJavaPackage)obj).getName(); final String fullName = pkgName.isEmpty() ? name : (pkgName + "." + name); final Context context = Global.instance().getContext(); try { return StaticClass.forClass(context.findClass(fullName)); } catch (final ClassNotFoundException e) { // IGNORE } } } return null; } }
⏎ jdk/nashorn/internal/objects/NativeJavaImporter.java
Or download all of them as a single archive file:
File name: jdk.scripting.nashorn-11.0.1-src.zip File size: 1390965 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.scripting.nashorn.shell.jmod - Scripting Nashorn Shell Module
2020-04-25, 82885👍, 0💬
Popular Posts:
How to run "javac" command from JDK tools.jar file? "javac" is the Java compiler command that allows...
JDK 11 jdk.internal.vm.compiler .jmodis the JMOD file for JDK 11 Internal VM Compiler module. JDK 11...
The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms, it was develo...
JDK 7 tools.jar is the JAR file for JDK 7 tools. It contains Java classes to support different JDK t...
JAX-WS is an API for building web services and clients. It is the next generation Web Services API r...