Draft of The Java Language Specification Java SE 9 Edition
Alex Buckley
alex.buckley at oracle.com
Mon Jan 4 19:04:10 UTC 2016
On 12/30/2015 3:21 PM, Robert Scholte wrote:
> I haven't been able to parse the following file based on the syntax as
> described in Chapter 19
> https://github.com/kronar/qdox-bug/blob/master/src/main/java/EnumWithFields.java
>
>
> The problem is with the argumentList of the enum.
>
> https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-EnumConstant
> is my starting point, but I can't find the way to a MethodInvocation,
> unless I'm missing something of course.
I see that EnumWithFields.java has "interesting" enum constants like:
VALUEA(By.linkText("G"),"H")
The ArgumentList for an enum constant is the same ArgumentList as for a
MethodInvocation, so any argument to a method call can be an argument to
an enum constant. Just follow the ArgumentList's Expression all the way
down to Primary.
By the way, please report suspected JLS bugs via the list given at
http://docs.oracle.com/javase/specs/jls/se8/html/jls-1.html#jls-1.5
Alex
More information about the jigsaw-dev
mailing list