1 /*
   2  * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 /**
  27  * This module provides support for
  28  * Java™ Programming Language 'snippet' evaluating tools, such as
  29  * Read-Eval-Print Loops (REPLs).
  30  * Separate packages support building tools, configuring the execution of tools,
  31  * and programmatically launching the existing Java™ shell tool.
  32  * <p>
  33  *     The {@link jdk.jshell} is the package for creating 'snippet' evaluating tools.
  34  *     Generally, this is only package that would be needed for creating tools.
  35  * </p>
  36  * <p>
  37  *     The {@link jdk.jshell.spi} package specifies a Service Provider Interface (SPI)
  38  *     for defining execution engine implementations for tools based on the
  39  *     {@link jdk.jshell} API. The {@link jdk.jshell.execution} package provides
  40  *     standard implementations of {@link jdk.jshell.spi} interfaces and supporting code.  It
  41  *     also serves as a library of functionality for defining new execution engine
  42  *     implementations.
  43  * </p>
  44  * <p>
  45  *     The {@link jdk.jshell.tool} supports programmatically launching the
  46  *     "jshell tool".
  47  * </p>
  48  * <p>
  49  *     The {@link jdk.jshell.execution} package contains implementations of the
  50  *     interfaces in {@link jdk.jshell.spi}.  Otherwise, the four packages are
  51  *     independent, operate at different levels, and do not share functionality or
  52  *     definitions.
  53  * </p>
  54  *
  55  * @moduleGraph
  56  * @since 9
  57  */
  58 module jdk.jshell {
  59     requires transitive java.compiler;
  60     requires transitive jdk.jdi;
  61     requires transitive java.prefs;
  62     requires java.logging;
  63     requires jdk.compiler;
  64     requires jdk.internal.le;
  65     requires jdk.internal.ed;
  66     requires jdk.internal.opt;
  67 
  68     exports jdk.jshell;
  69     exports jdk.jshell.spi;
  70     exports jdk.jshell.execution;
  71     exports jdk.jshell.tool;
  72 
  73     uses jdk.jshell.spi.ExecutionControlProvider;
  74     uses jdk.internal.editor.spi.BuildInEditorProvider;
  75 
  76     provides javax.tools.Tool
  77         with jdk.internal.jshell.tool.JShellToolProvider;
  78     provides jdk.jshell.spi.ExecutionControlProvider
  79         with jdk.jshell.execution.JdiExecutionControlProvider,
  80              jdk.jshell.execution.LocalExecutionControlProvider,
  81              jdk.jshell.execution.FailOverExecutionControlProvider;
  82 }