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/api/tree/Parser.java

/*
 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */

package jdk.nashorn.api.tree;

import java.io.File;
import java.io.IOException;
import java.io.Reader;
import java.net.URL;
import java.nio.file.Path;
import jdk.nashorn.api.scripting.NashornException;
import jdk.nashorn.api.scripting.ScriptObjectMirror;

/**
 * Represents nashorn ECMAScript parser instance.
 *
 * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
 * are deprecated with the intent to remove them in a future release.
 *
 * @since 9
 */
@Deprecated(since="11", forRemoval=true)
public interface Parser {
    /**
     * Parses the source file and returns compilation unit tree
     *
     * @param file source file to parse
     * @param listener to receive diagnostic messages from the parser. This can be null.
     * if null is passed, a NashornException is thrown on the first parse error.
     * @return compilation unit tree
     * @throws NullPointerException if file is null
     * @throws IOException if parse source read fails
     * @throws NashornException is thrown if no listener is supplied and parser encounters error
     */
    public CompilationUnitTree parse(final File file, final DiagnosticListener listener) throws IOException, NashornException;

    /**
     * Parses the source Path and returns compilation unit tree
     *
     * @param path source Path to parse
     * @param listener to receive diagnostic messages from the parser. This can be null.
     * if null is passed, a NashornException is thrown on the first parse error.
     * @return compilation unit tree
     * @throws NullPointerException if path is null
     * @throws IOException if parse source read fails
     * @throws NashornException is thrown if no listener is supplied and parser encounters error
     */
    public CompilationUnitTree parse(final Path path, final DiagnosticListener listener) throws IOException, NashornException;

    /**
     * Parses the source url and returns compilation unit tree
     *
     * @param url source file to parse
     * @param listener to receive diagnostic messages from the parser. This can be null.
     * if null is passed, a NashornException is thrown on the first parse error.
     * @return compilation unit tree
     * @throws NullPointerException if url is null
     * @throws IOException if parse source read fails
     * @throws NashornException is thrown if no listener is supplied and parser encounters error
     */
    public CompilationUnitTree parse(final URL url, final DiagnosticListener listener) throws IOException, NashornException;

    /**
     * Parses the reader and returns compilation unit tree
     *
     * @param name name of the source file to parse
     * @param reader from which source is read
     * @param listener to receive diagnostic messages from the parser. This can be null.
     * if null is passed, a NashornException is thrown on the first parse error.
     * @return compilation unit tree
     * @throws NullPointerException if name or reader is null
     * @throws IOException if parse source read fails
     * @throws NashornException is thrown if no listener is supplied and parser encounters error
     */
    public CompilationUnitTree parse(final String name, Reader reader, final DiagnosticListener listener) throws IOException, NashornException;

    /**
     * Parses the string source and returns compilation unit tree
     *
     * @param name of the source
     * @param code string source
     * @param listener to receive diagnostic messages from the parser. This can be null.
     * if null is passed, a NashornException is thrown on the first parse error.
     * @return compilation unit tree
     * @throws NullPointerException if name or code is null
     * @throws NashornException is thrown if no listener is supplied and parser encounters error
     */
    public CompilationUnitTree parse(final String name, String code, final DiagnosticListener listener) throws NashornException;

    /**
     * Parses the source from script object and returns compilation unit tree
     *
     * @param scriptObj script object whose script and name properties are used for script source
     * @param listener to receive diagnostic messages from the parser. This can be null.
     * if null is passed, a NashornException is thrown on the first parse error.
     * @return compilation unit tree
     * @throws NullPointerException if scriptObj is null
     * @throws NashornException is thrown if no listener is supplied and parser encounters error
     */
    public CompilationUnitTree parse(final ScriptObjectMirror scriptObj, final DiagnosticListener listener) throws NashornException;

    /**
     * Factory method to create a new instance of Parser.
     *
     * @param options configuration options to initialize the Parser.
     *         Currently the following options are supported:
     *
     * <dl>
     * <dt>"--const-as-var"</dt><dd>treat "const" declaration as "var"</dd>
     * <dt>"-dump-on-error" or "-doe"</dt><dd>dump stack trace on error</dd>
     * <dt>"--empty-statements"</dt><dd>include empty statement nodes</dd>
     * <dt>"--no-syntax-extensions" or "-nse"</dt><dd>disable ECMAScript syntax extensions</dd>
     * <dt>"-scripting"</dt><dd>enable scripting mode extensions</dd>
     * <dt>"-strict"</dt><dd>enable ECMAScript strict mode</dd>
     * <dt>"--language=es6"</dt><dd>enable ECMAScript 6 parsing mode</dd>
     * <dt>"--es6-module"</dt><dd>enable ECMAScript 6 module parsing mode. This option implies --language=es6</dd>
     * </dl>
     *
     * @throws NullPointerException if options array or any of its element is null
     * @throws IllegalArgumentException on unsupported option value.
     * @return a new Parser instance.
     */
    public static Parser create(final String... options) throws IllegalArgumentException {
        options.getClass();
        for (final String opt : options) {
            switch (opt) {
                case "--const-as-var":
                case "-dump-on-error":
                case "-doe":
                case "--empty-statements":
                case "--no-syntax-extensions":
                case "-nse":
                case "-scripting":
                case "-strict":
                case "--language=es6":
                case "--es6-module":
                    break;
                default:
                    throw new IllegalArgumentException(opt);
            }
        }

        return new ParserImpl(options);
    }
}

jdk/nashorn/api/tree/Parser.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

JDK 11 jdk.rmic.jmod - RMI Compiler Tool

Download and Use JDK 11

⇑⇑ FAQ for JDK (Java Development Kit)

2020-04-25, 108114👍, 0💬