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:
Rhino JavaScript Java Library Source Code
Rhino JavaScript Java Library is an open-source implementation of JavaScript written entirely in Java.
Rhino JavaScript Java Library Source Code files are provided in binary package (rhino-1.7.14.zip).
You can also browse the source code below:
✍: FYIcenter.com
⏎ org/mozilla/javascript/commonjs/module/provider/ModuleSourceProvider.java
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package org.mozilla.javascript.commonjs.module.provider; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import org.mozilla.javascript.Scriptable; /** * Implemented by objects that can provide the source text for the script. The * design of the interface supports cache revalidation. * @author Attila Szegedi * @version $Id: ModuleSourceProvider.java,v 1.3 2011/04/07 20:26:12 hannes%helma.at Exp $ */ public interface ModuleSourceProvider { /** * A special return value for {@link #loadSource(String, Scriptable, * Object)} and {@link #loadSource(URI, URI, Object)} that signifies that the * cached representation is still valid according to the passed validator. */ public static final ModuleSource NOT_MODIFIED = new ModuleSource(null, null, null, null, null); /** * Returns the script source of the requested module. More specifically, it * resolves the module ID to a resource. If it can not resolve it, null is * returned. If the caller passes a non-null validator, and the source * provider recognizes it, and the validator applies to the same resource * that the provider would use to load the source, and the validator * validates the current cached representation of the resource (using * whatever semantics for validation that this source provider implements), * then {@link #NOT_MODIFIED} should be returned. Otherwise, it should * return a {@link ModuleSource} object with the actual source text of the * module, preferrably a validator for it, and a security domain, where * applicable. * @param moduleId the ID of the module. An implementation must only accept * an absolute ID, starting with a term. * @param paths the value of the require() function's "paths" attribute. If * the require() function is sandboxed, it will be null, otherwise it will * be a JavaScript Array object. It is up to the provider implementation * whether and how it wants to honor the contents of the array. * @param validator a validator for an existing loaded and cached module. * This will either be null, or an object that this source provider * returned earlier as part of a {@link ModuleSource}. It can be used to * validate the existing cached module and avoid reloading it. * @return a script representing the code of the module. Null should be * returned if the script is not found. {@link #NOT_MODIFIED} should be * returned if the passed validator validates the current representation of * the module (the currently cached module script). * @throws IOException if there was an I/O problem reading the script * @throws URISyntaxException if the final URI could not be constructed. * @throws IllegalArgumentException if the module ID is syntactically not a * valid absolute module identifier. */ public ModuleSource loadSource(String moduleId, Scriptable paths, Object validator) throws IOException, URISyntaxException; /** * Returns the script source of the requested module from the given URI. * The URI is absolute but does not contain a file name extension such as * ".js", which may be specific to the ModuleSourceProvider implementation. * <p> * If the resource is not found, null is returned. If the caller passes a * non-null validator, and the source provider recognizes it, and the * validator applies to the same resource that the provider would use to * load the source, and the validator validates the current cached * representation of the resource (using whatever semantics for validation * that this source provider implements), then {@link #NOT_MODIFIED} * should be returned. Otherwise, it should return a {@link ModuleSource} * object with the actual source text of the module, preferrably a * validator for it, and a security domain, where applicable. * @param uri the absolute URI from which to load the module source, but * without an extension such as ".js". * @param baseUri the module path base URI from which <code>uri</code> * was derived. * @param validator a validator for an existing loaded and cached module. * This will either be null, or an object that this source provider * returned earlier as part of a {@link ModuleSource}. It can be used to * validate the existing cached module and avoid reloading it. * @return a script representing the code of the module. Null should be * returned if the script is not found. {@link #NOT_MODIFIED} should be * returned if the passed validator validates the current representation of * the module (the currently cached module script). * @throws IOException if there was an I/O problem reading the script * @throws URISyntaxException if the final URI could not be constructed */ public ModuleSource loadSource(URI uri, URI baseUri, Object validator) throws IOException, URISyntaxException; }
⏎ org/mozilla/javascript/commonjs/module/provider/ModuleSourceProvider.java
Or download all of them as a single archive file:
File name: rhino-1.7.14-sources.jar File size: 1029165 bytes Release date: 2022-01-06 Download
⇒ Example code to Test rhino-runtime-1.7.14.jar
⇐ Download Rhino JavaScript Binary Package
2022-05-03, 36031👍, 1💬
Popular Posts:
maven-core-3.8.6.jar is the JAR file for Apache Maven 3.8.6 Core module. Apache Maven is a software ...
JDK 11 java.base.jmod is the JMOD file for JDK 11 Base module. JDK 11 Base module compiled class fil...
maven-model-builder-3.8. 6.jaris the JAR file for Apache Maven 3.8.6 Model Builder module. Apache Ma...
GJT (Giant Java Tree) implementation of XML Pull Parser. JAR File Size and Download Location: File n...
JDK 17 jdk.hotspot.agent.jmod is the JMOD file for JDK 17 Hotspot Agent module. JDK 17 Hotspot Agent...