Package org.openrewrite.text
Class ChangeText
- java.lang.Object
-
- org.openrewrite.Recipe
-
- org.openrewrite.text.ChangeText
-
public class ChangeText extends Recipe
-
-
Constructor Summary
Constructors Constructor Description ChangeText(java.lang.String toText)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDescription()A human-readable description for the recipe, consisting of one or more full sentences ending with a period.java.lang.StringgetDisplayName()A human-readable display name for the recipe, initial capped with no period.java.util.Set<java.lang.String>getTags()A set of strings used for categorizing related recipes.protected TreeVisitor<?,ExecutionContext>getVisitor()A recipe can optionally encasulate a visitor that performs operations on a set of source files.Validatedvalidate()The default implementation of validate on the recipe will look for package and field level annotations that indicate a field is not-null.-
Methods inherited from class org.openrewrite.Recipe
causesAnotherCycle, doNext, equals, getApplicableTest, getDescriptor, getEstimatedEffortPerOccurrence, getJacksonPolymorphicTypeTag, getLanguages, getName, getRecipeList, getSingleSourceApplicableTest, hashCode, noop, run, run, run, run, validate, validateAll, validateAll, visit
-
-
-
-
Method Detail
-
getTags
public java.util.Set<java.lang.String> getTags()
Description copied from class:RecipeA set of strings used for categorizing related recipes. For example "testing", "junit", "spring". Tags should not include information about the language(s) this recipe is applicable to. SeeRecipe.getLanguages()instead. Any individual tag should consist of a single word, all lowercase.
-
getDisplayName
public java.lang.String getDisplayName()
Description copied from class:RecipeA human-readable display name for the recipe, initial capped with no period. For example, "Find text". The display name can be assumed to be rendered in documentation and other places where markdown is understood, so it is possible to use stylistic markers like backticks to indicate types. For example, "Find uses of `java.util.List`".- Specified by:
getDisplayNamein classRecipe- Returns:
- The display name.
-
getDescription
public java.lang.String getDescription()
Description copied from class:RecipeA human-readable description for the recipe, consisting of one or more full sentences ending with a period."Find methods by pattern." is an example. The description can be assumed to be rendered in documentation and other places where markdown is understood, so it is possible to use stylistic markers like backticks to indicate types. For example, "Find uses of `java.util.List`.".
- Overrides:
getDescriptionin classRecipe- Returns:
- The display name.
-
getVisitor
protected TreeVisitor<?,ExecutionContext> getVisitor()
Description copied from class:RecipeA recipe can optionally encasulate a visitor that performs operations on a set of source files. Subclasses of the recipe may override this method to provide an instance of a visitor that will be used when the recipe is executed.- Overrides:
getVisitorin classRecipe- Returns:
- A tree visitor that will perform operations associated with the recipe.
-
validate
public Validated validate()
Description copied from class:RecipeThe default implementation of validate on the recipe will look for package and field level annotations that indicate a field is not-null. The annotations must have run-time retention and the simple name of the annotation must match one of the common names defined inNullUtils
-
-