I implemented a program TreeScanner, to print information about all nodes in AST. The program supports all types (all visit methods are implemented). However, the problem is that for the statement, System.out.println(object.YYY); the program does not visit field reference YYY.
It detects object as identifier, but can not detect YYY as identifier. However, when I have System.out.println(YYY); then visitIdentifier will visit YYY.
Please let me know what is the difference between the both above lines, while in one YYY is visited by visitidentifier, in the another case it is not visited.
How can I visit YYY in object.YYY?
In class org.eclipse.jdt.core.dom we have FieldAccess which is called in both above cases for YYY, but seems TreeScanner in Javac has no similar method.
YYYastatic final(i.e. constant) field?