Skip to content

Commit 58aae34

Browse files
committed
8292576: Improve wording of AccessFlag-related specs
Reviewed-by: alanb
1 parent 5ca268c commit 58aae34

File tree

2 files changed

+26
-19
lines changed

2 files changed

+26
-19
lines changed

src/java.base/share/classes/java/lang/module/ModuleDescriptor.java

+15-8
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,10 @@ public Set<Modifier> modifiers() {
213213
}
214214

215215
/**
216-
* {@return an unmodifiable set of the module {@linkplain AccessFlag
217-
* requires flags, possibly empty}}
216+
* Returns the set of the module {@linkplain AccessFlag
217+
* requires flags}.
218+
*
219+
* @return A possibly-empty unmodifiable set of requires flags
218220
* @see #modifiers()
219221
* @jvms 4.7.25 The Module Attribute
220222
* @since 20
@@ -447,8 +449,10 @@ public Set<Modifier> modifiers() {
447449
}
448450

449451
/**
450-
* {@return an unmodifiable set of the module {@linkplain AccessFlag
451-
* export flags} for this module descriptor, possibly empty}
452+
* Returns the set of the module {@linkplain AccessFlag
453+
* export flags} for this module descriptor.
454+
*
455+
* @return A possibly-empty unmodifiable set of export flags
452456
* @see #modifiers()
453457
* @jvms 4.7.25 The Module Attribute
454458
* @since 20
@@ -669,8 +673,10 @@ public Set<Modifier> modifiers() {
669673
}
670674

671675
/**
672-
* {@return an unmodifiable set of the module {@linkplain AccessFlag
673-
* opens flags}, possibly empty}
676+
* Returns the set of the module {@linkplain AccessFlag opens
677+
* flags}.
678+
*
679+
* @return A possibly-empty unmodifiable set of opens flags
674680
* @see #modifiers()
675681
* @jvms 4.7.25 The Module Attribute
676682
* @since 20
@@ -1354,8 +1360,9 @@ public Set<Modifier> modifiers() {
13541360
}
13551361

13561362
/**
1357-
* {@return an unmodifiable set of the {@linkplain AccessFlag
1358-
* module flags}, possibly empty}
1363+
* Returns the set of the {@linkplain AccessFlag module flags}.
1364+
*
1365+
* @return A possibly-empty unmodifiable set of module flags
13591366
* @see #modifiers()
13601367
* @jvms 4.7.25 The Module Attribute
13611368
* @since 20

src/java.base/share/classes/java/lang/reflect/AccessFlag.java

+11-11
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public enum AccessFlag {
9999

100100
/**
101101
* The access flag {@code ACC_PUBLIC}, corresponding to the source
102-
* modifier {@link Modifier#PUBLIC public} with a mask value of
102+
* modifier {@link Modifier#PUBLIC public}, with a mask value of
103103
* <code>{@value "0x%04x" Modifier#PUBLIC}</code>.
104104
*/
105105
PUBLIC(Modifier.PUBLIC, true,
@@ -115,7 +115,7 @@ public Set<Location> apply(ClassFileFormatVersion cffv) {
115115

116116
/**
117117
* The access flag {@code ACC_PRIVATE}, corresponding to the
118-
* source modifier {@link Modifier#PRIVATE private} with a mask
118+
* source modifier {@link Modifier#PRIVATE private}, with a mask
119119
* value of <code>{@value "0x%04x" Modifier#PRIVATE}</code>.
120120
*/
121121
PRIVATE(Modifier.PRIVATE, true, Location.SET_FIELD_METHOD_INNER_CLASS,
@@ -130,7 +130,7 @@ public Set<Location> apply(ClassFileFormatVersion cffv) {
130130

131131
/**
132132
* The access flag {@code ACC_PROTECTED}, corresponding to the
133-
* source modifier {@link Modifier#PROTECTED protected} with a mask
133+
* source modifier {@link Modifier#PROTECTED protected}, with a mask
134134
* value of <code>{@value "0x%04x" Modifier#PROTECTED}</code>.
135135
*/
136136
PROTECTED(Modifier.PROTECTED, true, Location.SET_FIELD_METHOD_INNER_CLASS,
@@ -145,7 +145,7 @@ public Set<Location> apply(ClassFileFormatVersion cffv) {
145145

146146
/**
147147
* The access flag {@code ACC_STATIC}, corresponding to the source
148-
* modifier {@link Modifier#STATIC static} with a mask value of
148+
* modifier {@link Modifier#STATIC static}, with a mask value of
149149
* <code>{@value "0x%04x" Modifier#STATIC}</code>.
150150
*/
151151
STATIC(Modifier.STATIC, true, Location.SET_FIELD_METHOD_INNER_CLASS,
@@ -159,7 +159,7 @@ public Set<Location> apply(ClassFileFormatVersion cffv) {
159159

160160
/**
161161
* The access flag {@code ACC_FINAL}, corresponding to the source
162-
* modifier {@link Modifier#FINAL final} with a mask
162+
* modifier {@link Modifier#FINAL final}, with a mask
163163
* value of <code>{@value "0x%04x" Modifier#FINAL}</code>.
164164
*/
165165
FINAL(Modifier.FINAL, true,
@@ -217,7 +217,7 @@ public Set<Location> apply(ClassFileFormatVersion cffv) {
217217

218218
/**
219219
* The access flag {@code ACC_SYNCHRONIZED}, corresponding to the
220-
* source modifier {@link Modifier#SYNCHRONIZED synchronized} with
220+
* source modifier {@link Modifier#SYNCHRONIZED synchronized}, with
221221
* a mask value of <code>{@value "0x%04x" Modifier#SYNCHRONIZED}</code>.
222222
*/
223223
SYNCHRONIZED(Modifier.SYNCHRONIZED, true, Location.SET_METHOD, null),
@@ -238,7 +238,7 @@ public Set<Location> apply(ClassFileFormatVersion cffv) {
238238

239239
/**
240240
* The access flag {@code ACC_VOLATILE}, corresponding to the
241-
* source modifier {@link Modifier#VOLATILE volatile} with a mask
241+
* source modifier {@link Modifier#VOLATILE volatile}, with a mask
242242
* value of <code>{@value "0x%04x" Modifier#VOLATILE}</code>.
243243
*/
244244
VOLATILE(Modifier.VOLATILE, true, Location.SET_FIELD, null),
@@ -259,7 +259,7 @@ public Set<Location> apply(ClassFileFormatVersion cffv) {
259259

260260
/**
261261
* The access flag {@code ACC_TRANSIENT}, corresponding to the
262-
* source modifier {@link Modifier#TRANSIENT transient} with a
262+
* source modifier {@link Modifier#TRANSIENT transient}, with a
263263
* mask value of <code>{@value "0x%04x" Modifier#TRANSIENT}</code>.
264264
*/
265265
TRANSIENT(Modifier.TRANSIENT, true, Location.SET_FIELD, null),
@@ -280,7 +280,7 @@ public Set<Location> apply(ClassFileFormatVersion cffv) {
280280

281281
/**
282282
* The access flag {@code ACC_NATIVE}, corresponding to the source
283-
* modifier {@link Modifier#NATIVE native} with a mask value of
283+
* modifier {@link Modifier#NATIVE native}, with a mask value of
284284
* <code>{@value "0x%04x" Modifier#NATIVE}</code>.
285285
*/
286286
NATIVE(Modifier.NATIVE, true, Location.SET_METHOD, null),
@@ -301,7 +301,7 @@ public Set<Location> apply(ClassFileFormatVersion cffv) {
301301

302302
/**
303303
* The access flag {@code ACC_ABSTRACT}, corresponding to the
304-
* source modifier {@link Modifier#ABSTRACT abstract} with a mask
304+
* source modifier {@link Modifier#ABSTRACT abstract}, with a mask
305305
* value of <code>{@value "0x%04x" Modifier#ABSTRACT}</code>.
306306
*/
307307
ABSTRACT(Modifier.ABSTRACT, true,
@@ -316,7 +316,7 @@ public Set<Location> apply(ClassFileFormatVersion cffv) {
316316

317317
/**
318318
* The access flag {@code ACC_STRICT}, corresponding to the source
319-
* modifier {@link Modifier#STRICT strictfp} with a mask value of
319+
* modifier {@link Modifier#STRICT strictfp}, with a mask value of
320320
* <code>{@value "0x%04x" Modifier#STRICT}</code>.
321321
*
322322
* @apiNote

0 commit comments

Comments
 (0)