Uploaded image for project: 'CCC Migration Project'
  1. CCC Migration Project
  2. CCC-8178916

Update annotation processing API for terminology changes in modules

XMLWordPrintable

      Summary

      Remove use of "module statement" terminology in ModuleElement; use ModuleName rather than TypeName in grammar for supported annotation types.

      Problem

      The wording of some parts of the annotation processing API is out of date with the current terminology of modules.

      Solution

      Updating the affected sections of the annotation processing API.

      Specification

      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&trade; 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 a directive 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.

            darcy Joe Darcy
            darcy Joe Darcy
            Alex Buckley, Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: