Skip to content

Commit 809c783

Browse files
timtebeekTeamModerne
authored andcommitted
1 parent 5b24d07 commit 809c783

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/main/resources/META-INF/rewrite/examples.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2843,6 +2843,33 @@ examples:
28432843
language: java
28442844
---
28452845
type: specs.openrewrite.org/v1beta/example
2846+
recipeName: org.openrewrite.staticanalysis.ReorderAnnotationAttributes
2847+
examples:
2848+
- description: '`ReorderAnnotationAttributesTest#reordersAnnotationAttributes`'
2849+
sources:
2850+
- before: |
2851+
@interface MyAnnotation {
2852+
String name();
2853+
int value();
2854+
boolean enabled();
2855+
}
2856+
2857+
@MyAnnotation(value = 123, name = "test", enabled = true)
2858+
class A {
2859+
}
2860+
after: |
2861+
@interface MyAnnotation {
2862+
String name();
2863+
int value();
2864+
boolean enabled();
2865+
}
2866+
2867+
@MyAnnotation(enabled = true, name = "test", value = 123)
2868+
class A {
2869+
}
2870+
language: java
2871+
---
2872+
type: specs.openrewrite.org/v1beta/example
28462873
recipeName: org.openrewrite.staticanalysis.ReorderAnnotations
28472874
examples:
28482875
- description: '`ReorderAnnotationsTest#reordersMethodAnnotations`'

0 commit comments

Comments
 (0)