Hi
I wonder if it is possible to get the Modifier enum from VariableDeclarator ? I get Modifier enum from class ClassOrInterfaceDeclaration by invoking following command:
node.getModifiers(); (where node is an instance of ClassOrInterfaceDeclaration class)
Unfortunately, I did not find the method in VariableDeclarator class. I will appreciate your help.
-- JavaParser version 3.2.3
Best,
Lingbo
Hi! You're a bit too deep in the AST, the modifiers are on one of the parent nodes. To figure out which one, try this: http://javaparser.org/inspecting-an-ast/
If you need help upgrading to the latest version of JavaParser, just ask.
Thank you matozoid, this is exactly what I want !
Good luck!