javaparser-visited icon indicating copy to clipboard operation
javaparser-visited copied to clipboard

[EDITORIAL] propose clarification of overloading visitor

Open ericprud opened this issue 3 years ago • 0 comments
trafficstars

p11 has:

this means that you can define only the method to handle a certain type of nodes (e.g. field declarations), while your visitor will not do anything with the dozens of other node types you are not interested in.

propose:

this means you only need to defined the methods for nodes you are interested in (e.g. field declarations); the functions inherited from VoidVistorAdaptor will handle the recursion through the rest of the compliation unit's abstract syntax tree.

ericprud avatar Nov 21 '21 09:11 ericprud