RFR: 8374749: Clarify AnnotationValue specification [v2]

Joe Darcy darcy at openjdk.org
Thu Jan 8 18:30:16 UTC 2026


On Thu, 8 Jan 2026 18:06:14 GMT, Joe Darcy <darcy at openjdk.org> wrote:

>> 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
>
> Hmm. The string value isn't necessarily a literal per se as the original value could be from a constant string-valued expression. Change "Class" to "Class literal" might be better; let me think about a bit.

Updated the text a bit.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29101#discussion_r2673414922


More information about the compiler-dev mailing list