rewrite
rewrite copied to clipboard
Distributed code search and refactoring for Java
When looking for called methods declared by some type (`cu.findMethodCalls( "com.example.MyType *(..)" )`) it should be possible to match invocations of methods declared by a super-type of `MyType` (and not...
I've a specific usage of Java 8 type annotations (JSR 308) which makes the parser fail. To reproduce, parse these classes: ```java package com; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy;...
The [wiki](https://github.com/Netflix-Skunkworks/rewrite/wiki/Changing-Method-Invocations) has this example: ```java 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,...
Just by chance I tried to parse a Java code with a block comment with the MIT License. My name was encoded as Fábio, instead of Fábio and for some...
eg.... ```java class Main{ m(){ A a=new A(); B b = a.new B(); } } class A{ class B{} } ``` after refactor it's will be ```java class Main{ m(){...