Class NodeBasedRecipe
java.lang.Object
org.openrewrite.Recipe
org.openrewrite.ScanningRecipe<NodeBasedRecipe.Accumulator>
org.openrewrite.codemods.migrate.angular.NodeBasedRecipe
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
ApplyAngularCLI
public abstract class NodeBasedRecipe
extends org.openrewrite.ScanningRecipe<NodeBasedRecipe.Accumulator>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.openrewrite.Recipe
org.openrewrite.Recipe.Builder, org.openrewrite.Recipe.DelegatingRecipe -
Field Summary
Fields inherited from class org.openrewrite.Recipe
contributors, examples, PANIC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.openrewrite.SourceFilecreateAfter(org.openrewrite.SourceFile before, NodeBasedRecipe.Accumulator acc, org.openrewrite.ExecutionContext ctx) protected static PathcreateDirectory(org.openrewrite.ExecutionContext ctx, String prefix) Collection<? extends org.openrewrite.SourceFile> generate(NodeBasedRecipe.Accumulator acc, org.openrewrite.ExecutionContext ctx) protected abstract StringgetAngularCliPackage(NodeBasedRecipe.Accumulator acc, org.openrewrite.ExecutionContext ctx) getCommand(NodeBasedRecipe.Accumulator acc, org.openrewrite.ExecutionContext ctx) getInitialValue(org.openrewrite.ExecutionContext ctx) org.openrewrite.TreeVisitor<?, org.openrewrite.ExecutionContext> org.openrewrite.TreeVisitor<?, org.openrewrite.ExecutionContext> protected voidprocessOutput(Path out, NodeBasedRecipe.Accumulator acc, org.openrewrite.ExecutionContext ctx) protected abstract booleanuseNvmExec(NodeBasedRecipe.Accumulator acc, org.openrewrite.ExecutionContext ctx) Methods inherited from class org.openrewrite.ScanningRecipe
generate, getAccumulator, getVisitorMethods inherited from class org.openrewrite.Recipe
addDataTable, builder, buildRecipeList, causesAnotherCycle, clone, createRecipeDescriptor, equals, getContributors, getDataTableDescriptors, getDescription, getDescriptor, getDisplayName, getEstimatedEffortPerOccurrence, getExamples, getInstanceName, getInstanceNameSuffix, getJacksonPolymorphicTypeTag, getMaintainers, getName, getRecipeList, getTags, hashCode, maxCycles, noop, onComplete, run, run, run, setContributors, setExamples, validate, validate, validateAll, validateAll
-
Constructor Details
-
NodeBasedRecipe
public NodeBasedRecipe()
-
-
Method Details
-
getInitialValue
- Specified by:
getInitialValuein classorg.openrewrite.ScanningRecipe<NodeBasedRecipe.Accumulator>
-
getScanner
public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getScanner(NodeBasedRecipe.Accumulator acc) - Specified by:
getScannerin classorg.openrewrite.ScanningRecipe<NodeBasedRecipe.Accumulator>
-
generate
public Collection<? extends org.openrewrite.SourceFile> generate(NodeBasedRecipe.Accumulator acc, org.openrewrite.ExecutionContext ctx) - Overrides:
generatein classorg.openrewrite.ScanningRecipe<NodeBasedRecipe.Accumulator>
-
getCommand
protected abstract List<String> getCommand(NodeBasedRecipe.Accumulator acc, org.openrewrite.ExecutionContext ctx) -
useNvmExec
protected abstract boolean useNvmExec(NodeBasedRecipe.Accumulator acc, org.openrewrite.ExecutionContext ctx) -
getAngularCliPackage
protected abstract String getAngularCliPackage(NodeBasedRecipe.Accumulator acc, org.openrewrite.ExecutionContext ctx) -
processOutput
protected void processOutput(Path out, NodeBasedRecipe.Accumulator acc, org.openrewrite.ExecutionContext ctx) -
getVisitor
public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor(NodeBasedRecipe.Accumulator acc) - Overrides:
getVisitorin classorg.openrewrite.ScanningRecipe<NodeBasedRecipe.Accumulator>
-
createAfter
protected org.openrewrite.SourceFile createAfter(org.openrewrite.SourceFile before, NodeBasedRecipe.Accumulator acc, org.openrewrite.ExecutionContext ctx) -
createDirectory
-