RFR: 8257638: Update usage of "type" terminology in javax.lang.model

Jonathan Gibbons jjg at openjdk.java.net
Thu Dec 10 01:09:45 UTC 2020

On Thu, 10 Dec 2020 00:04:30 GMT, Joe Darcy <darcy at openjdk.org> wrote:

> First pass at updating javax.lang.model's usage of the word "type" to correspond to changes in usage of "type" being made in JLS.
> The wording in annotated construct and related functionality may need another pass.
> Updating @jls tags to renamed JLS sections will be done under a different bug id.
> Paragraphs *not* reflowed initially to easy reviewing. Paragraph will be reflowed and copyright year updated before a push is done.

There's an instance in TypeElement.java where the plurality of the replacement is incorrect.

Other comments are mostly incidental/minor.

src/java.compiler/share/classes/javax/annotation/processing/Filer.java line 69:

> 67:  * allow the <em>originating elements</em> to be provided as hints to
> 68:  * the tool infrastructure to better manage dependencies.  The
> 69:  * originating elements are the classes or interfaces or packages (representing {@code

would maybe be slightly better as "classes, interfaces or packages"

src/java.compiler/share/classes/javax/annotation/processing/Processor.java line 121:

> 119: 
> 120:  * For this purpose, a package element is <em>not</em> considered to
> 121:  * enclose the top-level classes and interfaces within that package. (A root element

`enclose` would be better as `encloses`

src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java line 35:

> 33:  * Represents a class or interface program element.  Provides access
> 34:  * to information about the class or interface and its members.  Note that an enum
> 35:  * class and a record class are kinds of classes and an annotation interface is a kind of

The sentence beginning "Note that..." is kinda redundant now, but not wrong.

src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java line 130:

> 128:      * For example, the fully qualified name of the interface
> 129:      * {@code java.util.Set<E>} is "{@code java.util.Set}".
> 130:      * Nested class and interface use "{@code .}" as a separator, as in

Should be "classes and interfaces"


Changes requested by jjg (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/1726

More information about the compiler-dev mailing list