JDK 9 RFR of JDK-8178916: Update annotation processing API for terminology changes in modules

joe darcy joe.darcy at oracle.com
Tue Apr 18 19:23:35 UTC 2017


Hello,

Per Alex's previous comments on the list [1], the wording of some parts 
of the annotation processor API can be better aligned with current 
terminology being used for modules.

Please review the patch below to do this.

Thanks,

-Joe

[1] 
http://mail.openjdk.java.net/pipermail/compiler-dev/2017-April/010905.html


diff -r b9a29aa786dd 
src/java.compiler/share/classes/javax/annotation/processing/Processor.java
--- 
a/src/java.compiler/share/classes/javax/annotation/processing/Processor.java 
Tue Apr 18 06:29:53 2017 -0700
+++ 
b/src/java.compiler/share/classes/javax/annotation/processing/Processor.java 
Tue Apr 18 12:21:56 2017 -0700
@@ -278,14 +278,14 @@
       * <dd><code>*</code>
       *
       * <dt><i>ModulePrefix:</i>
-     * <dd><i>TypeName</i> <code>/</code>
+     * <dd><i>ModuleName</i> <code>/</code>
       *
       * <dt><i>DotStar:</i>
       * <dd><code>.</code> <code>*</code>
       * </dl>
       * </blockquote>
       *
-     * where <i>TypeName</i> is as defined in
+     * where <i>TypeName</i> and <i>ModuleName</i> are as defined in
       * <cite>The Java™ Language Specification</cite>.
       *
       * @apiNote When running in an environment which supports modules,
@@ -299,7 +299,7 @@
       * @return the names of the annotation types supported by this 
processor
       * @see javax.annotation.processing.SupportedAnnotationTypes
       * @jls 3.8 Identifiers
-     * @jls 6.5.5 Meaning of Type Names
+     * @jls 6.5 Determining the Meaning of a Name
       */
      Set<String> getSupportedAnnotationTypes();

diff -r b9a29aa786dd 
src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java
--- 
a/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java 
Tue Apr 18 06:29:53 2017 -0700
+++ 
b/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java 
Tue Apr 18 12:21:56 2017 -0700
@@ -28,13 +28,14 @@
  import java.util.List;

  /**
- * Represents a module program element.  Provides access to information
- * about the module and its members.
+ * Represents a module program element.  Provides access to
+ * information about the module, its directives, and its members.
   *
   * @see javax.lang.model.util.Elements#getModuleOf
   * @since 9
+ * @jls 7.7 Module Declarations
   * @spec JPMS
- */  // TODO: add @jls to module section
+ */
  public interface ModuleElement extends Element, QualifiedNameable {

      /**
@@ -121,12 +122,13 @@
      };

      /**
-     * Represents a "module statement" within the declaration of this 
module.
+     * Represents the directives within the declaration of this
+     * module. The directives of a module declaration configure the
+     * module in the Java Platform Module System.
       *
       * @since 9
       * @spec JPMS
-     *
-     */ // TODO: add jls to Module Statement
+     */
      interface Directive {
          /**
           * Returns the {@code kind} of this directive.




More information about the compiler-dev mailing list