提交 11dd90ce 编写于 作者: R rfield

8174762: JShell: @since tags missing

Reviewed-by: jjg
上级 11cb7f29
...@@ -45,6 +45,8 @@ import jdk.jshell.Key.DeclarationKey; ...@@ -45,6 +45,8 @@ import jdk.jshell.Key.DeclarationKey;
* <code>DeclarationSnippet</code> is immutable: an access to * <code>DeclarationSnippet</code> is immutable: an access to
* any of its methods will always return the same result. * any of its methods will always return the same result.
* and thus is thread-safe. * and thus is thread-safe.
*
* @since 9
*/ */
public abstract class DeclarationSnippet extends PersistentSnippet { public abstract class DeclarationSnippet extends PersistentSnippet {
......
...@@ -30,6 +30,8 @@ import javax.tools.Diagnostic; ...@@ -30,6 +30,8 @@ import javax.tools.Diagnostic;
/** /**
* Diagnostic information for a Snippet. * Diagnostic information for a Snippet.
*
* @since 9
* @see jdk.jshell.JShell#diagnostics(jdk.jshell.Snippet) * @see jdk.jshell.JShell#diagnostics(jdk.jshell.Snippet)
*/ */
public abstract class Diag { public abstract class Diag {
......
...@@ -34,6 +34,8 @@ import jdk.jshell.Key.ErroneousKey; ...@@ -34,6 +34,8 @@ import jdk.jshell.Key.ErroneousKey;
* <code>ErroneousSnippet</code> is immutable: an access to * <code>ErroneousSnippet</code> is immutable: an access to
* any of its methods will always return the same result. * any of its methods will always return the same result.
* and thus is thread-safe. * and thus is thread-safe.
*
* @since 9
*/ */
public class ErroneousSnippet extends Snippet { public class ErroneousSnippet extends Snippet {
......
...@@ -38,6 +38,8 @@ package jdk.jshell; ...@@ -38,6 +38,8 @@ package jdk.jshell;
* the Snippet id and for snippets without a method name (for example an * the Snippet id and for snippets without a method name (for example an
* expression) <code>StackTraceElement.getMethodName()</code> will be the * expression) <code>StackTraceElement.getMethodName()</code> will be the
* empty string. * empty string.
*
* @since 9
*/ */
@SuppressWarnings("serial") // serialVersionUID intentionally omitted @SuppressWarnings("serial") // serialVersionUID intentionally omitted
public class EvalException extends JShellException { public class EvalException extends JShellException {
......
...@@ -34,6 +34,8 @@ import jdk.jshell.Key.ExpressionKey; ...@@ -34,6 +34,8 @@ import jdk.jshell.Key.ExpressionKey;
* <code>ExpressionSnippet</code> is immutable: an access to * <code>ExpressionSnippet</code> is immutable: an access to
* any of its methods will always return the same result. * any of its methods will always return the same result.
* and thus is thread-safe. * and thus is thread-safe.
*
* @since 9
* @jls 15: Expression. * @jls 15: Expression.
*/ */
public class ExpressionSnippet extends Snippet { public class ExpressionSnippet extends Snippet {
......
...@@ -34,6 +34,8 @@ import jdk.jshell.Key.ImportKey; ...@@ -34,6 +34,8 @@ import jdk.jshell.Key.ImportKey;
* {@code ImportSnippet} is immutable: an access to * {@code ImportSnippet} is immutable: an access to
* any of its methods will always return the same result. * any of its methods will always return the same result.
* and thus is thread-safe. * and thus is thread-safe.
*
* @since 9
* @jls 8.3: importDeclaration. * @jls 8.3: importDeclaration.
*/ */
public class ImportSnippet extends PersistentSnippet { public class ImportSnippet extends PersistentSnippet {
......
...@@ -79,7 +79,9 @@ import static jdk.jshell.Util.expunge; ...@@ -79,7 +79,9 @@ import static jdk.jshell.Util.expunge;
* <p> * <p>
* This class is not thread safe, except as noted, all access should be through * This class is not thread safe, except as noted, all access should be through
* a single thread. * a single thread.
*
* @author Robert Field * @author Robert Field
* @since 9
*/ */
public class JShell implements AutoCloseable { public class JShell implements AutoCloseable {
......
...@@ -27,6 +27,8 @@ package jdk.jshell; ...@@ -27,6 +27,8 @@ package jdk.jshell;
/** /**
* The superclass of JShell generated exceptions * The superclass of JShell generated exceptions
*
* @since 9
*/ */
@SuppressWarnings("serial") // serialVersionUID intentionally omitted @SuppressWarnings("serial") // serialVersionUID intentionally omitted
public class JShellException extends Exception { public class JShellException extends Exception {
......
...@@ -35,6 +35,8 @@ import jdk.jshell.Key.MethodKey; ...@@ -35,6 +35,8 @@ import jdk.jshell.Key.MethodKey;
* <code>MethodSnippet</code> is immutable: an access to * <code>MethodSnippet</code> is immutable: an access to
* any of its methods will always return the same result. * any of its methods will always return the same result.
* and thus is thread-safe. * and thus is thread-safe.
*
* @since 9
* @jls 8.4: MethodDeclaration. * @jls 8.4: MethodDeclaration.
*/ */
public class MethodSnippet extends DeclarationSnippet { public class MethodSnippet extends DeclarationSnippet {
......
...@@ -32,7 +32,7 @@ import javax.tools.JavaFileObject; ...@@ -32,7 +32,7 @@ import javax.tools.JavaFileObject;
* The outer wrap for a set of snippets wrapped in a generated class * The outer wrap for a set of snippets wrapped in a generated class
* @author Robert Field * @author Robert Field
*/ */
public class OuterImportSnippetWrap extends OuterWrap { class OuterImportSnippetWrap extends OuterWrap {
private final Snippet snippet; private final Snippet snippet;
......
...@@ -35,7 +35,7 @@ import jdk.jshell.Wrap.CompoundWrap; ...@@ -35,7 +35,7 @@ import jdk.jshell.Wrap.CompoundWrap;
* The outer wrap for a set of snippets wrapped in a generated class * The outer wrap for a set of snippets wrapped in a generated class
* @author Robert Field * @author Robert Field
*/ */
public class OuterSnippetsClassWrap extends OuterWrap { class OuterSnippetsClassWrap extends OuterWrap {
private final String className; private final String className;
private final LinkedHashMap<Wrap, Snippet> wrapToSnippet; private final LinkedHashMap<Wrap, Snippet> wrapToSnippet;
......
...@@ -44,7 +44,7 @@ import static jdk.jshell.Util.asLetters; ...@@ -44,7 +44,7 @@ import static jdk.jshell.Util.asLetters;
* *
* @author Robert Field * @author Robert Field
*/ */
public class OuterWrapMap { class OuterWrapMap {
private final JShell state; private final JShell state;
private final Map<String,OuterSnippetsClassWrap> classOuters = new HashMap<>(); private final Map<String,OuterSnippetsClassWrap> classOuters = new HashMap<>();
......
...@@ -34,6 +34,8 @@ package jdk.jshell; ...@@ -34,6 +34,8 @@ package jdk.jshell;
* <code>PersistentSnippet</code> is immutable: an access to * <code>PersistentSnippet</code> is immutable: an access to
* any of its methods will always return the same result. * any of its methods will always return the same result.
* and thus is thread-safe. * and thus is thread-safe.
*
* @since 9
*/ */
public abstract class PersistentSnippet extends Snippet { public abstract class PersistentSnippet extends Snippet {
......
...@@ -39,7 +39,9 @@ import java.util.List; ...@@ -39,7 +39,9 @@ import java.util.List;
* state engine, query {@code JShell} passing the Snippet. * state engine, query {@code JShell} passing the Snippet.
* <p> * <p>
* Because it is immutable, {@code Snippet} (and subclasses) is thread-safe. * Because it is immutable, {@code Snippet} (and subclasses) is thread-safe.
*
* @author Robert Field * @author Robert Field
* @since 9
* @see jdk.jshell.JShell#status * @see jdk.jshell.JShell#status
*/ */
public abstract class Snippet { public abstract class Snippet {
......
...@@ -38,7 +38,9 @@ import jdk.jshell.Snippet.Status; ...@@ -38,7 +38,9 @@ import jdk.jshell.Snippet.Status;
* {@code SnippetEvent} is immutable: an access to * {@code SnippetEvent} is immutable: an access to
* any of its methods will always return the same result. * any of its methods will always return the same result.
* and thus is thread-safe. * and thus is thread-safe.
*
* @author Robert Field * @author Robert Field
* @since 9
*/ */
public class SnippetEvent { public class SnippetEvent {
......
...@@ -39,6 +39,7 @@ import java.util.List; ...@@ -39,6 +39,7 @@ import java.util.List;
* etc. * etc.
* Also includes completion suggestions, as might be used in tab-completion. * Also includes completion suggestions, as might be used in tab-completion.
* *
* @since 9
*/ */
public abstract class SourceCodeAnalysis { public abstract class SourceCodeAnalysis {
......
...@@ -34,6 +34,8 @@ import jdk.jshell.Key.StatementKey; ...@@ -34,6 +34,8 @@ import jdk.jshell.Key.StatementKey;
* <code>StatementSnippet</code> is immutable: an access to * <code>StatementSnippet</code> is immutable: an access to
* any of its methods will always return the same result. * any of its methods will always return the same result.
* and thus is thread-safe. * and thus is thread-safe.
*
* @since 9
* @jls 14.5: Statement. * @jls 14.5: Statement.
*/ */
public class StatementSnippet extends Snippet { public class StatementSnippet extends Snippet {
......
...@@ -36,6 +36,8 @@ import jdk.jshell.Key.TypeDeclKey; ...@@ -36,6 +36,8 @@ import jdk.jshell.Key.TypeDeclKey;
* <code>TypeDeclSnippet</code> is immutable: an access to * <code>TypeDeclSnippet</code> is immutable: an access to
* any of its methods will always return the same result. * any of its methods will always return the same result.
* and thus is thread-safe. * and thus is thread-safe.
*
* @since 9
*/ */
public class TypeDeclSnippet extends DeclarationSnippet { public class TypeDeclSnippet extends DeclarationSnippet {
......
...@@ -36,6 +36,8 @@ package jdk.jshell; ...@@ -36,6 +36,8 @@ package jdk.jshell;
* the Snippet id and for snippets without a method name (for example an * the Snippet id and for snippets without a method name (for example an
* expression) <code>StackTraceElement.getName()</code> will be the * expression) <code>StackTraceElement.getName()</code> will be the
* empty string. * empty string.
*
* @since 9
*/ */
@SuppressWarnings("serial") // serialVersionUID intentionally omitted @SuppressWarnings("serial") // serialVersionUID intentionally omitted
public class UnresolvedReferenceException extends JShellException { public class UnresolvedReferenceException extends JShellException {
......
...@@ -35,6 +35,8 @@ import jdk.jshell.Key.VarKey; ...@@ -35,6 +35,8 @@ import jdk.jshell.Key.VarKey;
* <code>VarSnippet</code> is immutable: an access to * <code>VarSnippet</code> is immutable: an access to
* any of its methods will always return the same result. * any of its methods will always return the same result.
* and thus is thread-safe. * and thus is thread-safe.
*
* @since 9
* @jls 8.3: FieldDeclaration. * @jls 8.3: FieldDeclaration.
*/ */
public class VarSnippet extends DeclarationSnippet { public class VarSnippet extends DeclarationSnippet {
......
...@@ -39,6 +39,7 @@ import jdk.jshell.spi.SPIResolutionException; ...@@ -39,6 +39,7 @@ import jdk.jshell.spi.SPIResolutionException;
* *
* @author Robert Field * @author Robert Field
* @author Jan Lahoda * @author Jan Lahoda
* @since 9
*/ */
public class DirectExecutionControl implements ExecutionControl { public class DirectExecutionControl implements ExecutionControl {
......
...@@ -37,6 +37,8 @@ import jdk.jshell.spi.ExecutionEnv; ...@@ -37,6 +37,8 @@ import jdk.jshell.spi.ExecutionEnv;
/** /**
* Tries other providers in sequence until one works. * Tries other providers in sequence until one works.
*
* @since 9
*/ */
public class FailOverExecutionControlProvider implements ExecutionControlProvider{ public class FailOverExecutionControlProvider implements ExecutionControlProvider{
......
...@@ -61,6 +61,7 @@ import static jdk.jshell.execution.Util.remoteInputOutput; ...@@ -61,6 +61,7 @@ import static jdk.jshell.execution.Util.remoteInputOutput;
* *
* @author Robert Field * @author Robert Field
* @author Jan Lahoda * @author Jan Lahoda
* @since 9
*/ */
public class JdiDefaultExecutionControl extends JdiExecutionControl { public class JdiDefaultExecutionControl extends JdiExecutionControl {
......
...@@ -37,7 +37,9 @@ import jdk.jshell.spi.ExecutionControl; ...@@ -37,7 +37,9 @@ import jdk.jshell.spi.ExecutionControl;
import static java.util.stream.Collectors.toMap; import static java.util.stream.Collectors.toMap;
/** /**
* Abstract JDI implementation of {@link jdk.jshell.spi.ExecutionControl} * Abstract JDI implementation of {@link jdk.jshell.spi.ExecutionControl}.
*
* @since 9
*/ */
public abstract class JdiExecutionControl extends StreamingExecutionControl implements ExecutionControl { public abstract class JdiExecutionControl extends StreamingExecutionControl implements ExecutionControl {
......
...@@ -35,7 +35,9 @@ import jdk.jshell.spi.ExecutionEnv; ...@@ -35,7 +35,9 @@ import jdk.jshell.spi.ExecutionEnv;
/** /**
* A provider of remote JDI-controlled execution engines. * A provider of remote JDI-controlled execution engines.
*
* @author Robert Field * @author Robert Field
* @since 9
*/ */
public class JdiExecutionControlProvider implements ExecutionControlProvider { public class JdiExecutionControlProvider implements ExecutionControlProvider {
......
...@@ -47,6 +47,8 @@ import com.sun.jdi.connect.IllegalConnectorArgumentsException; ...@@ -47,6 +47,8 @@ import com.sun.jdi.connect.IllegalConnectorArgumentsException;
/** /**
* Sets up a JDI connection, providing the resulting JDI {@link VirtualMachine} * Sets up a JDI connection, providing the resulting JDI {@link VirtualMachine}
* and the {@link Process} the remote agent is running in. * and the {@link Process} the remote agent is running in.
*
* @since 9
*/ */
public class JdiInitiator { public class JdiInitiator {
......
...@@ -34,6 +34,8 @@ import jdk.jshell.spi.ExecutionControl.NotImplementedException; ...@@ -34,6 +34,8 @@ import jdk.jshell.spi.ExecutionControl.NotImplementedException;
* This interface specifies the loading specific subset of * This interface specifies the loading specific subset of
* {@link jdk.jshell.spi.ExecutionControl}. For use in encapsulating the * {@link jdk.jshell.spi.ExecutionControl}. For use in encapsulating the
* {@link java.lang.ClassLoader} implementation. * {@link java.lang.ClassLoader} implementation.
*
* @since 9
*/ */
public interface LoaderDelegate { public interface LoaderDelegate {
......
...@@ -33,6 +33,7 @@ import java.util.concurrent.atomic.AtomicReference; ...@@ -33,6 +33,7 @@ import java.util.concurrent.atomic.AtomicReference;
* in the same JVM as the JShell-core. * in the same JVM as the JShell-core.
* *
* @author Grigory Ptashko * @author Grigory Ptashko
* @since 9
*/ */
public class LocalExecutionControl extends DirectExecutionControl { public class LocalExecutionControl extends DirectExecutionControl {
......
...@@ -32,7 +32,9 @@ import jdk.jshell.spi.ExecutionEnv; ...@@ -32,7 +32,9 @@ import jdk.jshell.spi.ExecutionEnv;
/** /**
* A provider of execution engines which run in the same process as JShell. * A provider of execution engines which run in the same process as JShell.
*
* @author Robert Field * @author Robert Field
* @since 9
*/ */
public class LocalExecutionControlProvider implements ExecutionControlProvider{ public class LocalExecutionControlProvider implements ExecutionControlProvider{
......
...@@ -45,6 +45,7 @@ import static jdk.jshell.execution.Util.forwardExecutionControlAndIO; ...@@ -45,6 +45,7 @@ import static jdk.jshell.execution.Util.forwardExecutionControlAndIO;
* *
* @author Jan Lahoda * @author Jan Lahoda
* @author Robert Field * @author Robert Field
* @since 9
*/ */
public class RemoteExecutionControl extends DirectExecutionControl implements ExecutionControl { public class RemoteExecutionControl extends DirectExecutionControl implements ExecutionControl {
......
...@@ -37,6 +37,7 @@ import static jdk.jshell.execution.RemoteCodes.*; ...@@ -37,6 +37,7 @@ import static jdk.jshell.execution.RemoteCodes.*;
* execution takes place. * execution takes place.
* *
* @author Robert Field * @author Robert Field
* @since 9
*/ */
public class StreamingExecutionControl implements ExecutionControl { public class StreamingExecutionControl implements ExecutionControl {
......
...@@ -53,6 +53,7 @@ import jdk.jshell.spi.ExecutionControl.ExecutionControlException; ...@@ -53,6 +53,7 @@ import jdk.jshell.spi.ExecutionControl.ExecutionControlException;
* *
* @author Jan Lahoda * @author Jan Lahoda
* @author Robert Field * @author Robert Field
* @since 9
*/ */
public class Util { public class Util {
......
...@@ -30,5 +30,7 @@ ...@@ -30,5 +30,7 @@
* Also, provides related communication utilities. * Also, provides related communication utilities.
* This package may be used to define alternative execution engines. * This package may be used to define alternative execution engines.
* The default JShell execution engine is included. * The default JShell execution engine is included.
*
* @since 9
*/ */
package jdk.jshell.execution; package jdk.jshell.execution;
...@@ -140,6 +140,8 @@ ...@@ -140,6 +140,8 @@
* provide source boundary and completeness analysis to address cases like * provide source boundary and completeness analysis to address cases like
* those. <code>SourceCodeAnalysis</code> also provides suggested completions * those. <code>SourceCodeAnalysis</code> also provides suggested completions
* of input, as might be used in tab-completion. * of input, as might be used in tab-completion.
*
* @since 9
*/ */
......
...@@ -45,6 +45,8 @@ import java.util.Set; ...@@ -45,6 +45,8 @@ import java.util.Set;
* <p> * <p>
* Methods defined in this interface should only be called by the core JShell * Methods defined in this interface should only be called by the core JShell
* implementation. * implementation.
*
* @since 9
*/ */
public interface ExecutionControl extends AutoCloseable { public interface ExecutionControl extends AutoCloseable {
......
...@@ -33,7 +33,9 @@ import java.util.Map; ...@@ -33,7 +33,9 @@ import java.util.Map;
* evaluate Snippets. Alternate execution engines can be created by * evaluate Snippets. Alternate execution engines can be created by
* implementing this interface, then configuring JShell with the provider or * implementing this interface, then configuring JShell with the provider or
* the providers name and parameter specifier. * the providers name and parameter specifier.
*
* @author Robert Field * @author Robert Field
* @since 9
*/ */
public interface ExecutionControlProvider { public interface ExecutionControlProvider {
......
...@@ -36,6 +36,7 @@ import java.util.List; ...@@ -36,6 +36,7 @@ import java.util.List;
* This interface is designed to provide the access to core JShell functionality * This interface is designed to provide the access to core JShell functionality
* needed to implement ExecutionControl. * needed to implement ExecutionControl.
* *
* @since 9
* @see ExecutionControl * @see ExecutionControl
*/ */
public interface ExecutionEnv { public interface ExecutionEnv {
......
...@@ -33,6 +33,8 @@ package jdk.jshell.spi; ...@@ -33,6 +33,8 @@ package jdk.jshell.spi;
* <p> * <p>
* This exception is seen by the execution engine, but not seen by * This exception is seen by the execution engine, but not seen by
* the end user nor through the JShell API. * the end user nor through the JShell API.
*
* @since 9
*/ */
@SuppressWarnings("serial") // serialVersionUID intentionally omitted @SuppressWarnings("serial") // serialVersionUID intentionally omitted
public class SPIResolutionException extends RuntimeException { public class SPIResolutionException extends RuntimeException {
......
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
* <li>failover:1(jdi),2(jdi:launch(true),timeout(3000)),3(local)</li> * <li>failover:1(jdi),2(jdi:launch(true),timeout(3000)),3(local)</li>
* </ul> * </ul>
* *
* @since 9
* @see jdk.jshell.execution for execution implementation support * @see jdk.jshell.execution for execution implementation support
*/ */
package jdk.jshell.spi; package jdk.jshell.spi;
...@@ -40,6 +40,8 @@ import jdk.internal.jshell.tool.JShellToolBuilder; ...@@ -40,6 +40,8 @@ import jdk.internal.jshell.tool.JShellToolBuilder;
* configuration methods have sensible defaults which will be used if they are * configuration methods have sensible defaults which will be used if they are
* not called.. After zero or more calls to configuration methods, the tool is * not called.. After zero or more calls to configuration methods, the tool is
* launched with a call to {@link #run(java.lang.String...) }. * launched with a call to {@link #run(java.lang.String...) }.
*
* @since 9
*/ */
public interface JavaShellToolBuilder { public interface JavaShellToolBuilder {
......
...@@ -47,6 +47,8 @@ ...@@ -47,6 +47,8 @@
* .run("--feedback", "silent", "MyStart"); * .run("--feedback", "silent", "MyStart");
* } * }
* </pre> * </pre>
*
* @since 9
*/ */
......
...@@ -51,6 +51,8 @@ ...@@ -51,6 +51,8 @@
* independent, operate at different levels, and do not share functionality or * independent, operate at different levels, and do not share functionality or
* definitions. * definitions.
* </p> * </p>
*
* @since 9
*/ */
module jdk.jshell { module jdk.jshell {
requires transitive java.compiler; requires transitive java.compiler;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册