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/NativeWeakSet.java
/* * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.nashorn.internal.objects; import java.util.Map; import java.util.WeakHashMap; import jdk.nashorn.internal.objects.annotations.Attribute; import jdk.nashorn.internal.objects.annotations.Constructor; import jdk.nashorn.internal.objects.annotations.Function; import jdk.nashorn.internal.objects.annotations.ScriptClass; import jdk.nashorn.internal.runtime.PropertyMap; import jdk.nashorn.internal.runtime.ScriptObject; import jdk.nashorn.internal.runtime.ScriptRuntime; import jdk.nashorn.internal.runtime.Undefined; import static jdk.nashorn.internal.objects.NativeWeakMap.checkKey; import static jdk.nashorn.internal.runtime.ECMAErrors.typeError; import static jdk.nashorn.internal.runtime.JSType.isPrimitive; /** * This implements the ECMA6 WeakSet object. */ @ScriptClass("WeakSet") public class NativeWeakSet extends ScriptObject { private final Map<Object, Boolean> map = new WeakHashMap<>(); // initialized by nasgen private static PropertyMap $nasgenmap$; private NativeWeakSet(final ScriptObject proto, final PropertyMap map) { super(proto, map); } /** * ECMA6 23.3.1 The WeakSet Constructor * * @param isNew whether the new operator used * @param self self reference * @param arg optional iterable argument * @return a new WeakSet object */ @Constructor(arity = 0) public static Object construct(final boolean isNew, final Object self, final Object arg) { if (!isNew) { throw typeError("constructor.requires.new", "WeakSet"); } final Global global = Global.instance(); final NativeWeakSet weakSet = new NativeWeakSet(global.getWeakSetPrototype(), $nasgenmap$); populateWeakSet(weakSet.map, arg, global); return weakSet; } /** * ECMA6 23.4.3.1 WeakSet.prototype.add ( value ) * * @param self the self reference * @param value the value to add * @return this Set object */ @Function(attributes = Attribute.NOT_ENUMERABLE) public static Object add(final Object self, final Object value) { final NativeWeakSet set = getSet(self); set.map.put(checkKey(value), Boolean.TRUE); return self; } /** * ECMA6 23.4.3.4 WeakSet.prototype.has ( value ) * * @param self the self reference * @param value the value * @return true if value is contained */ @Function(attributes = Attribute.NOT_ENUMERABLE) public static boolean has(final Object self, final Object value) { final NativeWeakSet set = getSet(self); return !isPrimitive(value) && set.map.containsKey(value); } /** * ECMA6 23.4.3.3 WeakSet.prototype.delete ( value ) * * @param self the self reference * @param value the value * @return true if value was deleted */ @Function(attributes = Attribute.NOT_ENUMERABLE) public static boolean delete(final Object self, final Object value) { final Map<Object, Boolean> map = getSet(self).map; if (isPrimitive(value)) { return false; } final boolean returnValue = map.containsKey(value); map.remove(value); return returnValue; } @Override public String getClassName() { return "WeakSet"; } static void populateWeakSet(final Map<Object, Boolean> set, final Object arg, final Global global) { if (arg != null && arg != Undefined.getUndefined()) { AbstractIterator.iterate(arg, global, value -> { set.put(checkKey(value), Boolean.TRUE); }); } } private static NativeWeakSet getSet(final Object self) { if (self instanceof NativeWeakSet) { return (NativeWeakSet) self; } else { throw typeError("not.a.weak.set", ScriptRuntime.safeToString(self)); } } }
⏎ jdk/nashorn/internal/objects/NativeWeakSet.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, 83844👍, 0💬
Popular Posts:
Apache Avalon began in 1999 as the Java Apache Server Framework and in late 2002 separated from the ...
What Is HttpComponents commons-httpclient-3.1.j ar?HttpComponents commons-httpclient-3.1.j aris the ...
The Web Services Description Language for Java Toolkit (WSDL4J), Release 1.6.2, allows the creation,...
JDK 11 java.compiler.jmod is the JMOD file for JDK 11 Compiler module. JDK 11 Compiler module compil...
XML Serializer, Release 2.7.1, allows you to write out XML, HTML etc. as a stream of characters from...