The wiki has this example:
Tr.CompilationUnit cu = parser.parse(asList(a, b)).get(1);
String diff = cu.refactor()
.changeMethodTarget(cu.findMethodCalls("A1 foo()"), "a2")
.diff();
changeMethodTarget() expects a NamedVar instead of String as second parameter, though. How do I obtain a NamedVar instance for a simple field name?
I hope you don't mind opening me all these issues, but I thought I'd report whatever I notice while exploring this project a bit ;)
The wiki has this example:
changeMethodTarget()expects aNamedVarinstead ofStringas second parameter, though. How do I obtain aNamedVarinstance for a simple field name?I hope you don't mind opening me all these issues, but I thought I'd report whatever I notice while exploring this project a bit ;)