I am trying to build a translator of Java source code to other object-oriented programming languages. For this I want to traverse the whole AST (generated by JavaParser) and gather each and every component of the Java source code and then correspondingly translate them to my target language. I did not find anything related to the traversal of the complete AST in online searches, though I did find about locating specific nodes such as 'class or interface declaration', etc. Any help would be appreciated.
Asked
Active
Viewed 569 times
1 Answers
0
After going through the documentation, I realised that using getChildNodes() function will help us to visit each and every node of the Java source code AST from root to leaf nodes.

code_blooded29
- 1
- 1