JDK 11 jdk.jshell.jmod - JShell Tool

JDK 11 jdk.jshell.jmod is the JMOD file for JDK 11 JShell tool, which can be invoked by the "jshell" command.

JDK 11 JShell tool compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.jshell.jmod.

JDK 11 JShell tool compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.

JDK 11 JShell tool source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.jshell.

You can click and view the content of each source code file in the list below.

✍: FYIcenter

jdk/jshell/ImportSnippet.java

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

package jdk.jshell;

import jdk.jshell.Key.ImportKey;

/**
 * Snippet for an import declaration.
 * The Kind is {@link jdk.jshell.Snippet.Kind#IMPORT}.
 * <p>
 * {@code ImportSnippet} is immutable: an access to
 * any of its methods will always return the same result.
 * and thus is thread-safe.
 *
 * @since 9
 * @jls 8.3: importDeclaration.
 */
public class ImportSnippet extends PersistentSnippet {

    final String fullname;
    final String fullkey;
    final boolean isStatic;
    final boolean isStar;

    ImportSnippet(ImportKey key, String userSource, Wrap guts,
            String fullname, String name, SubKind subkind, String fullkey,
            boolean isStatic, boolean isStar) {
        super(key, userSource, guts, name, subkind, null);
        this.fullname = fullname;
        this.fullkey = fullkey;
        this.isStatic = isStatic;
        this.isStar = isStar;
    }

    /**
     * The identifying name of the import. For on-demand imports
     * ({@link jdk.jshell.Snippet.SubKind#TYPE_IMPORT_ON_DEMAND_SUBKIND} or
     * ({@link jdk.jshell.Snippet.SubKind#STATIC_IMPORT_ON_DEMAND_SUBKIND})
     * that is the full specifier including any
     * qualifiers and the asterisks. For single imports
     * ({@link jdk.jshell.Snippet.SubKind#SINGLE_TYPE_IMPORT_SUBKIND} or
     * ({@link jdk.jshell.Snippet.SubKind#SINGLE_STATIC_IMPORT_SUBKIND}),
     * it is the imported name. That is, the unqualified name.
     * @return the name of the import.
     */
    @Override
    public String name() {
        return key().name();
    }

    /**
     *
     * The qualified name of the import. For any imports
     * ({@link jdk.jshell.Snippet.SubKind#TYPE_IMPORT_ON_DEMAND_SUBKIND},
     * ({@link jdk.jshell.Snippet.SubKind#STATIC_IMPORT_ON_DEMAND_SUBKIND}),
     * ({@link jdk.jshell.Snippet.SubKind#SINGLE_TYPE_IMPORT_SUBKIND} or
     * ({@link jdk.jshell.Snippet.SubKind#SINGLE_STATIC_IMPORT_SUBKIND})
     * that is the full specifier including any
     * qualifiers and the asterisks.
     * @return the fullname of the import
     */
    public String fullname() {
        return fullname;
    }

    /**
     * Indicates whether this snippet represents a static import.
     *
     * @return {@code true} if this snippet represents a static import;
     * otherwise {@code false}
     */
    public boolean isStatic() {
        return isStatic;
    }

    /**** internal access ****/

    @Override
    ImportKey key() {
        return (ImportKey) super.key();
    }

    @Override
    String importLine(JShell state) {
        return guts().wrapped();
    }
}

jdk/jshell/ImportSnippet.java

 

JDK 11 jdk.jsobject.jmod - JS Object Module

JDK 11 jdk.jlink.jmod - JLink Tool

Download and Use JDK 11

⇑⇑ FAQ for JDK (Java Development Kit)

2018-11-10, 3869👍, 0💬