You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hoist private static final constants onto the recipe class
Anonymous classes can not declare constants, so nested visitors that
declare them were skipped. Move them up to the enclosing recipe class
instead, unless that would collide with an existing field.
maven,org.openrewrite.recipe:rewrite-rewrite,org.openrewrite.java.recipes.ExecutionContextParameterName,Use a standard name for `ExecutionContext`,Visitors that are parameterized with `ExecutionContext` should use the parameter name `ctx`.,1,Recipes,Java,,Basic building blocks for transforming Java code.,"[{""name"":""parameterName"",""type"":""String"",""displayName"":""Parameter name"",""description"":""The name or prefix to use for the `ExecutionContext` parameter."",""example"":""ctx""}]",
14
14
maven,org.openrewrite.recipe:rewrite-rewrite,org.openrewrite.java.recipes.FindRecipes,Find OpenRewrite recipes,"This recipe finds all OpenRewrite recipes, primarily to produce a data table that is being used to experiment with fine-tuning a large language model to produce more recipes.",1,Recipes,Java,,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.table.RewriteRecipeSource"",""displayName"":""Rewrite recipe source code"",""instanceName"":""Rewrite recipe source code"",""description"":""This table contains the source code of recipes along with their metadata for use in an experiment fine-tuning large language models to produce more recipes."",""columns"":[{""name"":""displayName"",""type"":""String"",""displayName"":""Recipe name"",""description"":""The name of the recipe.""},{""name"":""description"",""type"":""String"",""displayName"":""Recipe description"",""description"":""The description of the recipe.""},{""name"":""recipeType"",""type"":""RecipeType"",""displayName"":""Recipe type"",""description"":""Differentiate between Java and YAML recipes, as they may be two independent data sets used in LLM fine-tuning.""},{""name"":""sourceCode"",""type"":""String"",""displayName"":""Recipe source code"",""description"":""The full source code of the recipe.""},{""name"":""options"",""type"":""String"",""displayName"":""Recipe options"",""description"":""JSON format of recipe options.""}]}]"
15
15
maven,org.openrewrite.recipe:rewrite-rewrite,org.openrewrite.java.recipes.GenerateDeprecatedMethodRecipes,Generate `InlineMethodCalls` recipes for deprecated delegating methods,"Finds `@Deprecated` method declarations whose body is a single delegation call to another method in the same class, and generates a declarative YAML recipe file containing `InlineMethodCalls` entries for each.",1,Recipes,Java,,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.java.recipes.DeprecatedMethodDelegations"",""displayName"":""Deprecated method delegations"",""instanceName"":""Deprecated method delegations"",""description"":""Deprecated methods that delegate to another method in the same class, suitable for inlining via `InlineMethodCalls`."",""columns"":[{""name"":""methodPattern"",""type"":""String"",""displayName"":""Method pattern"",""description"":""The method pattern of the deprecated method.""},{""name"":""replacement"",""type"":""String"",""displayName"":""Replacement"",""description"":""The replacement expression to inline.""},{""name"":""recipeYaml"",""type"":""String"",""displayName"":""Recipe YAML"",""description"":""A YAML snippet that can be copied into a recipe list.""}]}]"
16
-
maven,org.openrewrite.recipe:rewrite-rewrite,org.openrewrite.java.recipes.InlineNestedVisitorClass,Inline nested visitor classes into the returning method,"Recipes that return a named, private, static nested visitor class straight from `getVisitor()` (or `getScanner()`) can declare that visitor anonymously instead, which keeps the visitor next to the recipe metadata that configures it. Only applied when the nested class is used exactly once, and when nothing would be lost by inlining it.",1,Recipes,Java,,Basic building blocks for transforming Java code.,,
16
+
maven,org.openrewrite.recipe:rewrite-rewrite,org.openrewrite.java.recipes.InlineNestedVisitorClass,Inline nested visitor classes into the returning method,"Recipes that return a named, private, static nested visitor class straight from `getVisitor()` (or `getScanner()`) can declare that visitor anonymously instead, which keeps the visitor next to the recipe metadata that configures it. Any `private static final` constants the nested class declares are hoisted onto the recipe class, as anonymous classes can not declare them. Only applied when the nested class is used exactly once, and when nothing would be lost by inlining it.",1,Recipes,Java,,Basic building blocks for transforming Java code.,,
17
17
maven,org.openrewrite.recipe:rewrite-rewrite,org.openrewrite.java.recipes.IsLiteralNullRecipe,"Use `J.Literal.isLiteralValue(expression, null)`","Replace `expression instanceof J.Literal && ((J.Literal) expression).getValue() == null` with `J.Literal.isLiteralValue(expression, null)`.",1,Recipes,Java,,Basic building blocks for transforming Java code.,,
18
18
maven,org.openrewrite.recipe:rewrite-rewrite,org.openrewrite.java.recipes.JavaRecipeBestPractices,Java Recipe best practices,Best practices for Java recipe development.,25,Recipes,Java,,Basic building blocks for transforming Java code.,,
19
19
maven,org.openrewrite.recipe:rewrite-rewrite,org.openrewrite.java.recipes.MissingOptionExample,Find missing `@Option` `example` values,"Find `@Option` annotations that are missing `example` values for documentation, and add a TODO comment.",1,Recipes,Java,,Basic building blocks for transforming Java code.,,
0 commit comments