-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add migration rewrite for non-named arguments in Java annotations
- Loading branch information
1 parent
f1adc55
commit 7574b91
Showing
7 changed files
with
43 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
tests/rewrites/annotation-named-pararamters/MyAnnotation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import java.util.concurrent.TimeUnit; | ||
|
||
public @interface MyAnnotation { | ||
public TimeUnit D() default TimeUnit.DAYS; | ||
TimeUnit C() default TimeUnit.DAYS; | ||
String A() default ""; | ||
public String B() default ""; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import java.util.concurrent.TimeUnit | ||
@MyAnnotation() class Test1 | ||
@MyAnnotation(D = TimeUnit.DAYS) class Test2 | ||
@MyAnnotation(D = TimeUnit.DAYS, C = TimeUnit.DAYS) class Test3 | ||
@MyAnnotation(D = TimeUnit.DAYS, C = TimeUnit.DAYS, A = "foo") class Test4 | ||
@MyAnnotation(D = TimeUnit.DAYS, C = TimeUnit.DAYS, A = "foo", B = "bar") class Test5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import java.util.concurrent.TimeUnit | ||
@MyAnnotation() class Test1 | ||
@MyAnnotation(TimeUnit.DAYS) class Test2 | ||
@MyAnnotation(TimeUnit.DAYS, TimeUnit.DAYS) class Test3 | ||
@MyAnnotation(TimeUnit.DAYS, TimeUnit.DAYS, "foo") class Test4 | ||
@MyAnnotation(TimeUnit.DAYS, TimeUnit.DAYS, "foo", "bar") class Test5 |