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

8174762: JShell: @since tags missing

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