diff --git a/langtools/src/java.compiler/share/classes/javax/annotation/processing/Filer.java b/langtools/src/java.compiler/share/classes/javax/annotation/processing/Filer.java index 97979b932c2..9a81988478e 100644 --- a/langtools/src/java.compiler/share/classes/javax/annotation/processing/Filer.java +++ b/langtools/src/java.compiler/share/classes/javax/annotation/processing/Filer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -264,7 +264,7 @@ public interface Filer { * @param moduleAndPkg module and/or package relative to which the file * should be named, or the empty string if none * @param relativeName final pathname components of the file - * @param originatingElements type or package elements causally + * @param originatingElements type or package or module elements causally * associated with the creation of this file, may be elided or * {@code null} * @return a {@code FileObject} to write the new resource diff --git a/langtools/src/java.compiler/share/classes/javax/annotation/processing/FilerException.java b/langtools/src/java.compiler/share/classes/javax/annotation/processing/FilerException.java index 30a13886f04..95855219258 100644 --- a/langtools/src/java.compiler/share/classes/javax/annotation/processing/FilerException.java +++ b/langtools/src/java.compiler/share/classes/javax/annotation/processing/FilerException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,7 +31,7 @@ import java.io.IOException; * Indicates a {@link Filer} detected an attempt to open a file that * would violate the guarantees provided by the {@code Filer}. Those * guarantees include not creating the same file more than once, not - * creating multiple files corresponding to the same type, and not + * creating multiple files corresponding to the same type or package, and not * creating files for types with invalid names. * * @author Joseph D. Darcy diff --git a/langtools/src/java.compiler/share/classes/javax/annotation/processing/Processor.java b/langtools/src/java.compiler/share/classes/javax/annotation/processing/Processor.java index 9eae468d4ef..31471968eb9 100644 --- a/langtools/src/java.compiler/share/classes/javax/annotation/processing/Processor.java +++ b/langtools/src/java.compiler/share/classes/javax/annotation/processing/Processor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -194,7 +194,7 @@ import javax.lang.model.SourceVersion; *
The {@link Filer} interface discusses restrictions on how * processors can operate on files. * - *
Note that implementors of this interface may find it convenient + * @apiNote Implementors of this interface may find it convenient * to extend {@link AbstractProcessor} rather than implementing this * interface directly. * @@ -315,7 +315,7 @@ public interface Processor { * is returned, the annotation types are unclaimed and subsequent * processors may be asked to process them. A processor may * always return the same boolean value or may vary the result - * based on chosen criteria. + * based on its own chosen criteria. * *
The input set will be empty if the processor supports {@code * "*"} and the root elements have no annotations. A {@code @@ -343,8 +343,8 @@ public interface Processor { *
Since incomplete programs are being modeled, some of the * parameters may only have partial information or may be {@code * null}. At least one of {@code element} and {@code userText} - * must be non-{@code null}. If {@code element} is non-{@code - * null}, {@code annotation} and {@code member} may be {@code + * must be non-{@code null}. If {@code element} is non-{@code null}, + * {@code annotation} and {@code member} may be {@code * null}. Processors may not throw a {@code NullPointerException} * if some parameters are {@code null}; if a processor has no * completions to offer based on the provided information, an diff --git a/langtools/src/java.compiler/share/classes/javax/annotation/processing/RoundEnvironment.java b/langtools/src/java.compiler/share/classes/javax/annotation/processing/RoundEnvironment.java index f2a94f0b19f..f138a81cafd 100644 --- a/langtools/src/java.compiler/share/classes/javax/annotation/processing/RoundEnvironment.java +++ b/langtools/src/java.compiler/share/classes/javax/annotation/processing/RoundEnvironment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -65,7 +65,7 @@ public interface RoundEnvironment { boolean errorRaised(); /** - * Returns the root elements for annotation processing generated + * Returns the {@linkplain Processor root elements} for annotation processing generated * by the prior round. * * @return the root elements for annotation processing generated diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/AnnotatedConstruct.java b/langtools/src/java.compiler/share/classes/javax/lang/model/AnnotatedConstruct.java index a80a6eab7d1..a32e65eb2b4 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/AnnotatedConstruct.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/AnnotatedConstruct.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -62,7 +62,7 @@ import javax.lang.model.type.*; * * If there are multiple annotations of type AT present on * C, then if AT is repeatable annotation type, an - * annotation of type ATC is implicitly declared on C. + * annotation of type ATC is {@linkplain javax.lang.model.util.Elements#getOrigin(AnnotatedConstruct, AnnotationMirror) implicitly declared} on C. * *
A common superclass for those exceptions allows a single catch - * block to have code handling them uniformly. + * @apiNote A common superclass for exceptions specific to different + * kinds of unknown entities allows a single catch block to easily + * provide uniform handling of those related conditions. * * @author Joseph D. Darcy * @see javax.lang.model.element.UnknownElementException diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/element/Element.java b/langtools/src/java.compiler/share/classes/javax/lang/model/element/Element.java index 3c00e68355c..c88b6f7a030 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/element/Element.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/element/Element.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,7 +37,7 @@ import javax.lang.model.util.*; /** - * Represents a program element such as a package, class, or method. + * Represents a program element such as a module, package, class, or method. * Each element represents a static, language-level construct * (and not, for example, a runtime construct of the virtual machine). * @@ -180,7 +180,7 @@ public interface Element extends javax.lang.model.AnnotatedConstruct { * any elements; however, that may change as this API or the * programming language evolves. * - *
Note that elements of certain kinds can be isolated using + * @apiNote Elements of certain kinds can be isolated using * methods in {@link ElementFilter}. * * @return the enclosed elements, or an empty list if none @@ -197,7 +197,7 @@ public interface Element extends javax.lang.model.AnnotatedConstruct { * Returns {@code true} if the argument represents the same * element as {@code this}, or {@code false} otherwise. * - *
Note that the identity of an element involves implicit state + * @apiNote The identity of an element involves implicit state * not directly accessible from the element's methods, including * state about the presence of unrelated types. Element objects * created by different implementations of these interfaces should diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java b/langtools/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java index 40e7bc63ebf..cf3f6b1992a 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java @@ -37,17 +37,18 @@ import java.util.List; public interface ModuleElement extends Element, QualifiedNameable { /** - * Returns the fully qualified name of this module. + * Returns the fully qualified name of this module. For an + * {@linkplain #isUnnamed() unnamed module}, an empty name is returned. * - * @return the qualified name of this module, or an + * @return the fully qualified name of this module, or an * empty name if this is an unnamed module */ @Override Name getQualifiedName(); /** - * Returns the simple name of this module. For an unnamed - * module, an empty name is returned. + * Returns the simple name of this module. For an {@linkplain + * #isUnnamed() unnamed module}, an empty name is returned. * * @return the simple name of this module or an empty name if * this is an unnamed module diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/element/NestingKind.java b/langtools/src/java.compiler/share/classes/javax/lang/model/element/NestingKind.java index b618c48f07d..1502255ff67 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/element/NestingKind.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/element/NestingKind.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -89,25 +89,29 @@ public enum NestingKind { /** * A type that is a named member of another type. + * @jls 8.5 Member Type Declarations */ MEMBER, /** * A named type declared within a construct other than a type. + * @jls 14.3 Local Class Declarations */ LOCAL, /** * A type without a name. + * @jls 15.9.5 Anonymous Class Declarations */ ANONYMOUS; /** * Does this constant correspond to a nested type element? * A nested type element is any that is not top-level. - * An inner type element is any nested type element that + * More specifically, an inner type element is any nested type element that * is not {@linkplain Modifier#STATIC static}. * @return whether or not the constant is nested + * @jls 14.3 Inner Classes and Enclosing Instances */ public boolean isNested() { return this != TOP_LEVEL; diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/element/PackageElement.java b/langtools/src/java.compiler/share/classes/javax/lang/model/element/PackageElement.java index f319d3185be..9fe6a8f7e54 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/element/PackageElement.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/element/PackageElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,6 +42,7 @@ public interface PackageElement extends Element, QualifiedNameable { /** * Returns the fully qualified name of this package. * This is also known as the package's canonical name. + * For an {@linkplain #isUnnamed() unnamed package}, an empty name is returned. * * @return the fully qualified name of this package, or an * empty name if this is an unnamed package @@ -50,8 +51,8 @@ public interface PackageElement extends Element, QualifiedNameable { Name getQualifiedName(); /** - * Returns the simple name of this package. For an unnamed - * package, an empty name is returned. + * Returns the simple name of this package. For an {@linkplain + * #isUnnamed() unnamed package}, an empty name is returned. * * @return the simple name of this package or an empty name if * this is an unnamed package diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/element/Parameterizable.java b/langtools/src/java.compiler/share/classes/javax/lang/model/element/Parameterizable.java index 4ddb3147db8..55d9042bca8 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/element/Parameterizable.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/element/Parameterizable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,7 +35,7 @@ import java.util.List; */ public interface Parameterizable extends Element { /** - * Returns the formal type parameters of the type element in + * Returns the formal type parameters of an element in * declaration order. * * @return the formal type parameters, or an empty list diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java b/langtools/src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java index 8f6d153b71a..54c511a4b48 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -67,14 +67,14 @@ public interface TypeElement extends Element, Parameterizable, QualifiedNameable * the implicit {@code values} and {@code valueOf} methods of an * enum type. * - *
Note that as a particular instance of the {@linkplain
+ * @apiNote As a particular instance of the {@linkplain
* javax.lang.model.element general accuracy requirements} and the
* ordering behavior required of this interface, the list of
* enclosed elements will be returned in the natural order for the
* originating source of information about the type. For example,
* if the information about the type is originating from a source
* file, the elements will be returned in source code order.
- * (However, in that case the the ordering of synthesized
+ * (However, in that case the the ordering of {@linkplain Elements.Origin#MANDATED mandated}
* elements, such as a default constructor, is not specified.)
*
* @return the enclosed elements in proper order, or an empty list if none
diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/element/UnknownAnnotationValueException.java b/langtools/src/java.compiler/share/classes/javax/lang/model/element/UnknownAnnotationValueException.java
index a25204b35be..b6f1d6bc2d9 100644
--- a/langtools/src/java.compiler/share/classes/javax/lang/model/element/UnknownAnnotationValueException.java
+++ b/langtools/src/java.compiler/share/classes/javax/lang/model/element/UnknownAnnotationValueException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -79,7 +79,7 @@ public class UnknownAnnotationValueException extends UnknownEntityException {
/**
* Returns the additional argument.
*
- * @return the additional argument
+ * @return the additional argument, or {@code null} if unavailable
*/
public Object getArgument() {
return parameter;
diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/element/UnknownElementException.java b/langtools/src/java.compiler/share/classes/javax/lang/model/element/UnknownElementException.java
index d5f87bb2269..6eeec9b5a60 100644
--- a/langtools/src/java.compiler/share/classes/javax/lang/model/element/UnknownElementException.java
+++ b/langtools/src/java.compiler/share/classes/javax/lang/model/element/UnknownElementException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -77,7 +77,7 @@ public class UnknownElementException extends UnknownEntityException {
/**
* Returns the additional argument.
*
- * @return the additional argument
+ * @return the additional argument, or {@code null} if unavailable
*/
public Object getArgument() {
return parameter;
diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/element/package-info.java b/langtools/src/java.compiler/share/classes/javax/lang/model/element/package-info.java
index 967bde79cdb..857d231a309 100644
--- a/langtools/src/java.compiler/share/classes/javax/lang/model/element/package-info.java
+++ b/langtools/src/java.compiler/share/classes/javax/lang/model/element/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -87,14 +87,14 @@
* If a program is syntactically valid but erroneous in some other
* fashion, any returned model must have no less information than if
* all the method bodies in the program were replaced by {@code "throw
- * new RuntimeException();"}. If a program refers to a missing type XYZ,
+ * new RuntimeException();"}. If a program refers to a missing type Xyz,
* the returned model must contain no less information than if the
- * declaration of type XYZ were assumed to be {@code "class XYZ {}"},
- * {@code "interface XYZ {}"}, {@code "enum XYZ {}"}, or {@code
- * "@interface XYZ {}"}. If a program refers to a missing type {@code
- * XYZ Unless otherwise specified in a particular implementation, the
diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/type/IntersectionType.java b/langtools/src/java.compiler/share/classes/javax/lang/model/type/IntersectionType.java
index 9bd96711b6b..359200d961e 100644
--- a/langtools/src/java.compiler/share/classes/javax/lang/model/type/IntersectionType.java
+++ b/langtools/src/java.compiler/share/classes/javax/lang/model/type/IntersectionType.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -33,14 +33,12 @@ import java.util.List;
* An intersection type can be either implicitly or explicitly
* declared in a program. For example, the bound of the type parameter
* {@code Note that a static import statement can make the text of
- * calls to the methods in this class more concise; for example:
- *
- * Note that elements of certain kinds can be isolated using
+ * @apiNote Elements of certain kinds can be isolated using
* methods in {@link ElementFilter}.
*
* @param type the type being examined
- *
* @author Joseph D. Darcy
* @author Scott Seligman
* @author Peter von der Ahé
diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/util/Elements.java b/langtools/src/java.compiler/share/classes/javax/lang/model/util/Elements.java
index a2c92f46cc6..25ee3c36a09 100644
--- a/langtools/src/java.compiler/share/classes/javax/lang/model/util/Elements.java
+++ b/langtools/src/java.compiler/share/classes/javax/lang/model/util/Elements.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -348,7 +348,7 @@ public interface Elements {
* declared directly. For a class the result also includes its
* constructors, but not local or anonymous classes.
*
- *
- * import static javax.lang.model.util.ElementFilter.*;
- * ...
- * {@code List