Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:45:33 +08:00
commit 480d09eec9
27 changed files with 8336 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
Fully Qualified Recipe Name,Recipe Name,Description
org.openrewrite.java.AddCommentToImport,Add comment to import statement,Add a comment to an import statement in a Java source file.
org.openrewrite.java.AddCommentToMethod,Add comment to method declarations,Add a comment to method declarations in a Java source file.
org.openrewrite.java.AddCommentToMethodInvocations,Add comment to method invocations,Add a comment to method invocations in a Java source file.
org.openrewrite.java.AddMethodParameter,Add method parameter to a method declaration,Adds a new method parameter to an existing method declaration.
org.openrewrite.java.ChangeMethodAccessLevel,Change method access level,Change the access level (public protected private package private) of a method.
org.openrewrite.java.ChangeMethodInvocationReturnType,Change method invocation return type,Changes the return type of a method invocation.
org.openrewrite.java.ChangeMethodName,Change method name,Rename a method.
org.openrewrite.java.ChangeMethodTargetToStatic,Change method target to static,Change method invocations to static method calls.
org.openrewrite.java.ChangeMethodTargetToVariable,Change method target to variable,Change method invocations to method calls on a variable.
org.openrewrite.java.ChangePackage,Rename package name,A recipe that will rename a package name in package statements imports and fully-qualified types.
org.openrewrite.java.ChangePackageInStringLiteral,Rename package name in String literals,A recipe that will rename a package name in String literals.
org.openrewrite.java.ChangeType,Change type,Change a given type to another.
org.openrewrite.java.ChangeTypeInStringLiteral,Change type in String literals,Change a given type to another when used in a String literal.
org.openrewrite.java.DeleteMethodArgument,Delete method argument,Delete an argument from method invocations.
org.openrewrite.java.RemoveAnnotation,Remove annotation,Remove matching annotations wherever they occur.
org.openrewrite.java.RemoveAnnotationAttribute,Remove annotation attribute,Some annotations accept arguments. This recipe removes an existing attribute.
org.openrewrite.java.ReplaceAnnotation,Replace annotation,Replace an Annotation with another one if the annotation pattern matches. Only fixed parameters can be set in the replacement.
org.openrewrite.java.ReplaceConstant,Replace constant with literal value,Replace a named constant with a literal value when you wish to remove the old constant. A `String` literal must include escaped quotes.
org.openrewrite.java.ReplaceConstantWithAnotherConstant,Replace constant with another constant,Replace a constant with another constant adding/removing import on class if needed.
org.openrewrite.java.ReplaceStringLiteralValue,Replace `String` literal,Replace the value of a complete `String` literal.
org.openrewrite.java.ReplaceStringLiteralWithConstant,Replace String literal with constant,Replace String literal with constant adding import on class if needed.
org.openrewrite.java.ShortenFullyQualifiedTypeReferences,Add imports for fully qualified references to types,Any fully qualified references to Java types will be replaced with corresponding simple names and import statements provided that it doesn't result in any conflicts with other imports or types declared in the local compilation unit.
org.openrewrite.maven.AddAnnotationProcessor,Add an annotation processor to `maven-compiler-plugin`,Add an annotation processor to the maven compiler plugin. Will not do anything if it already exists. Also doesn't add anything when no other annotation processors are defined yet. (Perhaps `ChangePluginConfiguration` can be used).
org.openrewrite.python.ChangeMethodName,Change method name,Renames a method.
org.openrewrite.java.micronaut.RemoveAnnotationProcessorPath,Remove Maven annotation processor path,Remove the Maven annotation processor path that matches the given groupId and artifactId.
org.openrewrite.java.micronaut.AddAnnotationProcessorPath,Add Maven annotation processor path,Add the groupId artifactId version and exclusions of a Maven annotation processor path.
org.openrewrite.java.migrate.ReplaceStringLiteralValue,Replace `String` literal,Replace the value of a complete `String` literal.
org.openrewrite.java.spring.http.ReplaceStringLiteralsWithHttpHeadersConstants,Replace String literals with `HttpHeaders` constants,Replace String literals with `org.springframework.http.HttpHeaders` constants.
org.openrewrite.java.spring.http.ReplaceStringLiteralsWithMediaTypeConstants,Replace String literals with `MediaType` constants,Replace String literals with `org.springframework.http.MediaType` constants.
org.openrewrite.java.spring.boot3.ReplaceStringLiteralsWithConstants,Replace String literals with Spring constants,Replace String literals with Spring constants where applicable.
org.apache.camel.upgrade.camel40.ChangeTypes,Migrate moved types between Camel 3.x and Camel 4.x,Change type of classes related to change of API.
org.apache.camel.upgrade.camel49.DebeziumChangeTypes,Each camel-debezium module has its own subpackage corresponding to the database type,each camel-debezium module has its own subpackage corresponding to the database type. So for example all the classes of the module camel-debezium-postgres have been moved to a dedicated package which is org.apache.camel.component.debezium.postgres instead of having everything under the root package org.apache.camel.component.debezium.
1 Fully Qualified Recipe Name Recipe Name Description
2 org.openrewrite.java.AddCommentToImport Add comment to import statement Add a comment to an import statement in a Java source file.
3 org.openrewrite.java.AddCommentToMethod Add comment to method declarations Add a comment to method declarations in a Java source file.
4 org.openrewrite.java.AddCommentToMethodInvocations Add comment to method invocations Add a comment to method invocations in a Java source file.
5 org.openrewrite.java.AddMethodParameter Add method parameter to a method declaration Adds a new method parameter to an existing method declaration.
6 org.openrewrite.java.ChangeMethodAccessLevel Change method access level Change the access level (public protected private package private) of a method.
7 org.openrewrite.java.ChangeMethodInvocationReturnType Change method invocation return type Changes the return type of a method invocation.
8 org.openrewrite.java.ChangeMethodName Change method name Rename a method.
9 org.openrewrite.java.ChangeMethodTargetToStatic Change method target to static Change method invocations to static method calls.
10 org.openrewrite.java.ChangeMethodTargetToVariable Change method target to variable Change method invocations to method calls on a variable.
11 org.openrewrite.java.ChangePackage Rename package name A recipe that will rename a package name in package statements imports and fully-qualified types.
12 org.openrewrite.java.ChangePackageInStringLiteral Rename package name in String literals A recipe that will rename a package name in String literals.
13 org.openrewrite.java.ChangeType Change type Change a given type to another.
14 org.openrewrite.java.ChangeTypeInStringLiteral Change type in String literals Change a given type to another when used in a String literal.
15 org.openrewrite.java.DeleteMethodArgument Delete method argument Delete an argument from method invocations.
16 org.openrewrite.java.RemoveAnnotation Remove annotation Remove matching annotations wherever they occur.
17 org.openrewrite.java.RemoveAnnotationAttribute Remove annotation attribute Some annotations accept arguments. This recipe removes an existing attribute.
18 org.openrewrite.java.ReplaceAnnotation Replace annotation Replace an Annotation with another one if the annotation pattern matches. Only fixed parameters can be set in the replacement.
19 org.openrewrite.java.ReplaceConstant Replace constant with literal value Replace a named constant with a literal value when you wish to remove the old constant. A `String` literal must include escaped quotes.
20 org.openrewrite.java.ReplaceConstantWithAnotherConstant Replace constant with another constant Replace a constant with another constant adding/removing import on class if needed.
21 org.openrewrite.java.ReplaceStringLiteralValue Replace `String` literal Replace the value of a complete `String` literal.
22 org.openrewrite.java.ReplaceStringLiteralWithConstant Replace String literal with constant Replace String literal with constant adding import on class if needed.
23 org.openrewrite.java.ShortenFullyQualifiedTypeReferences Add imports for fully qualified references to types Any fully qualified references to Java types will be replaced with corresponding simple names and import statements provided that it doesn't result in any conflicts with other imports or types declared in the local compilation unit.
24 org.openrewrite.maven.AddAnnotationProcessor Add an annotation processor to `maven-compiler-plugin` Add an annotation processor to the maven compiler plugin. Will not do anything if it already exists. Also doesn't add anything when no other annotation processors are defined yet. (Perhaps `ChangePluginConfiguration` can be used).
25 org.openrewrite.python.ChangeMethodName Change method name Renames a method.
26 org.openrewrite.java.micronaut.RemoveAnnotationProcessorPath Remove Maven annotation processor path Remove the Maven annotation processor path that matches the given groupId and artifactId.
27 org.openrewrite.java.micronaut.AddAnnotationProcessorPath Add Maven annotation processor path Add the groupId artifactId version and exclusions of a Maven annotation processor path.
28 org.openrewrite.java.migrate.ReplaceStringLiteralValue Replace `String` literal Replace the value of a complete `String` literal.
29 org.openrewrite.java.spring.http.ReplaceStringLiteralsWithHttpHeadersConstants Replace String literals with `HttpHeaders` constants Replace String literals with `org.springframework.http.HttpHeaders` constants.
30 org.openrewrite.java.spring.http.ReplaceStringLiteralsWithMediaTypeConstants Replace String literals with `MediaType` constants Replace String literals with `org.springframework.http.MediaType` constants.
31 org.openrewrite.java.spring.boot3.ReplaceStringLiteralsWithConstants Replace String literals with Spring constants Replace String literals with Spring constants where applicable.
32 org.apache.camel.upgrade.camel40.ChangeTypes Migrate moved types between Camel 3.x and Camel 4.x Change type of classes related to change of API.
33 org.apache.camel.upgrade.camel49.DebeziumChangeTypes Each camel-debezium module has its own subpackage corresponding to the database type each camel-debezium module has its own subpackage corresponding to the database type. So for example all the classes of the module camel-debezium-postgres have been moved to a dedicated package which is org.apache.camel.component.debezium.postgres instead of having everything under the root package org.apache.camel.component.debezium.