JDK 15 RFR of JDK-8246290: Refine specification of javax.lang.model.element.Modifier::toString
Joe Darcy
joe.darcy at oracle.com
Tue Jun 2 01:23:25 UTC 2020
Hello,
Please review the patch below with a small spec clarification of
Modifier::toString; CSR at
JDK-8246291: Refine specification of
javax.lang.model.element.Modifier::toString
https://bugs.openjdk.java.net/browse/JDK-8246291
Thanks,
-Joe
---
a/src/java.compiler/share/classes/javax/lang/model/element/Modifier.java
Mon Jun 01 17:00:40 2020 -0400
+++
b/src/java.compiler/share/classes/javax/lang/model/element/Modifier.java
Mon Jun 01 18:17:47 2020 -0700
@@ -38,6 +38,12 @@
* <p>Note that it is possible additional modifiers will be added in
* future versions of the platform.
*
+ * @jls 8.1.1 Class Modifiers
+ * @jls 8.3.1 Field Modifiers
+ * @jls 8.4.3 Method Modifiers
+ * @jls 8.8.3 Constructor Modifiers
+ * @jls 9.1.1 Interface Modifiers
+ *
* @author Joseph D. Darcy
* @author Scott Seligman
* @author Peter von der Ahé
@@ -46,8 +52,7 @@
public enum Modifier {
- // See JLS sections 8.1.1, 8.3.1, 8.4.3, 8.8.3, and 9.1.1.
- // java.lang.reflect.Modifier includes INTERFACE, but that's a VMism.
+ // Note java.lang.reflect.Modifier includes INTERFACE, but that's a
VMism.
/** The modifier {@code public} */ PUBLIC,
/** The modifier {@code protected} */ PROTECTED,
@@ -101,7 +106,10 @@
/** The modifier {@code strictfp} */ STRICTFP;
/**
- * Returns this modifier's name in lowercase.
+ * Returns this modifier's name as defined in <cite>The
+ * Java™ Language Specification</cite>.
+ * Note the modifier name is typically the {@linkplain #name()
+ * name of the enum constant} in lowercase.
*/
public String toString() {
return name().toLowerCase(java.util.Locale.US);
More information about the compiler-dev
mailing list