8174762: JShell: @since tags missing

Reviewed-by: jjg
This commit is contained in:
Robert Field 2017-02-10 13:49:42 -08:00
parent 0a9f00958e
commit 6d8a15972e
42 changed files with 73 additions and 4 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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;

View File

@ -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;

View File

@ -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<>();

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -39,6 +39,7 @@ import jdk.jshell.spi.SPIResolutionException;
*
* @author Robert Field
* @author Jan Lahoda
* @since 9
*/
public class DirectExecutionControl implements ExecutionControl {

View File

@ -37,6 +37,8 @@ import jdk.jshell.spi.ExecutionEnv;
/**
* Tries other providers in sequence until one works.
*
* @since 9
*/
public class FailOverExecutionControlProvider implements ExecutionControlProvider{

View File

@ -61,6 +61,7 @@ import static jdk.jshell.execution.Util.remoteInputOutput;
*
* @author Robert Field
* @author Jan Lahoda
* @since 9
*/
public class JdiDefaultExecutionControl extends JdiExecutionControl {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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{

View File

@ -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 {

View File

@ -37,6 +37,7 @@ import static jdk.jshell.execution.RemoteCodes.*;
* execution takes place.
*
* @author Robert Field
* @since 9
*/
public class StreamingExecutionControl implements ExecutionControl {

View File

@ -53,6 +53,7 @@ import jdk.jshell.spi.ExecutionControl.ExecutionControlException;
*
* @author Jan Lahoda
* @author Robert Field
* @since 9
*/
public class Util {

View File

@ -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;

View File

@ -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
*/

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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;

View File

@ -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 {

View File

@ -47,6 +47,8 @@
* .run("--feedback", "silent", "MyStart");
* }
* </pre>
*
* @since 9
*/

View File

@ -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;