Skip to content

Tag: javaparser

Javaparser comment expression

I’m trying to comment all calls to a custom method inside a java file using Javaparser. My first approach is to use a ModifierVisitor: … the code finds the method calls to “MYMETHOD” correctly, but when I try to replace it with a BlockComment, an exception is thrown: It seems I can only replace an Expression by another Expression (because