RFR: 8374749: Clarify AnnotationValue specification
Chen Liang
liach at openjdk.org
Thu Jan 8 09:00:19 UTC 2026
On Thu, 8 Jan 2026 00:46:55 GMT, Joe Darcy <darcy at openjdk.org> wrote:
> Make the correspondence between AnnotationValue cases and the cases listed in JLS 9.6.1 more explicit.
src/java.compiler/share/classes/javax/lang/model/element/AnnotationValue.java line 31:
> 29: * Represents a value of an annotation interface element.
> 30: * A value is of one of the following types (JLS {@jls 9.6.1}):
> 31: * <ul><li> a wrapper class, such as {@link Integer} to represent a primitive type
Suggestion:
* <ul><li> a wrapper class, such as {@link Integer}, to represent a primitive type
src/java.compiler/share/classes/javax/lang/model/element/AnnotationValue.java line 33:
> 31: * <ul><li> a wrapper class, such as {@link Integer} to represent a primitive type
> 32: * <li> {@code String} representing a {@code String}
> 33: * <li> {@code TypeMirror} representing a {@code Class}
Shuld we call these string literal and class literal? JLS 3.10.5, 15.8.2
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29101#discussion_r2671475280
PR Review Comment: https://git.openjdk.org/jdk/pull/29101#discussion_r2671486366
More information about the compiler-dev
mailing list