Package org.openrewrite.text
Class AppendToTextFile
java.lang.Object
org.openrewrite.Recipe
org.openrewrite.text.AppendToTextFile
- All Implemented Interfaces:
Cloneable
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.openrewrite.Recipe
contributors, examples, NOOP, PANIC
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionA human-readable description for the recipe, consisting of one or more full sentences ending with a period.A human-readable display name for the recipe, initial capped with no period.protected List<SourceFile>
visit
(List<SourceFile> before, ExecutionContext ctx) Override this to generate new source files or delete source files.Methods inherited from class org.openrewrite.Recipe
addApplicableTest, addApplicableTest, addDataTable, addSingleSourceApplicableTest, addSingleSourceApplicableTest, causesAnotherCycle, clone, createRecipeDescriptor, doNext, equals, getApplicableTest, getApplicableTests, getContributors, getDataTableDescriptors, getDescriptor, getEstimatedEffortPerOccurrence, getExamples, getJacksonPolymorphicTypeTag, getLanguages, getMaintainers, getName, getRecipeList, getSingleSourceApplicableTest, getSingleSourceApplicableTests, getTags, getVisitor, hashCode, noop, run, run, run, run, validate, validate, validateAll, validateAll
-
Constructor Details
-
AppendToTextFile
public AppendToTextFile()
-
-
Method Details
-
getDisplayName
Description copied from class:Recipe
A 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:
getDisplayName
in classRecipe
- Returns:
- The display name.
-
getDescription
Description copied from class:Recipe
A 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:
getDescription
in classRecipe
- Returns:
- The display name.
-
visit
Description copied from class:Recipe
Override this to generate new source files or delete source files. Note that here, as throughout OpenRewrite, we use referential equality to detect that a change has occured. To indicate to rewrite that the recipe has made changes a different instance must be returned than the instance passed in as "before".Currently, the list passed in as "before" is not immutable, but you should treat it as such anyway.
-