Package org.openrewrite.maven
Class AddAnnotationProcessor
java.lang.Object
org.openrewrite.Recipe
org.openrewrite.ScanningRecipe<AddAnnotationProcessor.Scanned>
org.openrewrite.maven.AddAnnotationProcessor
- All Implemented Interfaces:
Cloneable
public class AddAnnotationProcessor
extends org.openrewrite.ScanningRecipe<AddAnnotationProcessor.Scanned>
Adds an annotation processor to the maven-compiler-plugin configuration.
The behavior differs based on project structure:
- Single module: Adds to build/plugins
- Multi-module with parent in reactor: Adds to parent's build/pluginManagement/plugins
- Orphan module (no parent in reactor): Adds to build/plugins
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAccumulator populated during the scan phase and resolved into final parent/orphan path sets viaAddAnnotationProcessor.Scanned.resolve()before the visitor runs.Nested 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 TypeMethodDescriptiongetInitialValue(org.openrewrite.ExecutionContext ctx) org.openrewrite.TreeVisitor<?, org.openrewrite.ExecutionContext> org.openrewrite.TreeVisitor<?, org.openrewrite.ExecutionContext> Methods inherited from class org.openrewrite.ScanningRecipe
clone, generate, generate, getAccumulator, getVisitorMethods inherited from class org.openrewrite.Recipe
addDataTable, aggregateDataTableDescriptors, builder, buildRecipeList, causesAnotherCycle, 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, withOptions
-
Constructor Details
-
AddAnnotationProcessor
public AddAnnotationProcessor()
-
-
Method Details
-
getInitialValue
- Specified by:
getInitialValuein classorg.openrewrite.ScanningRecipe<AddAnnotationProcessor.Scanned>
-
getScanner
public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getScanner(AddAnnotationProcessor.Scanned acc) - Specified by:
getScannerin classorg.openrewrite.ScanningRecipe<AddAnnotationProcessor.Scanned>
-
getVisitor
public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor(AddAnnotationProcessor.Scanned acc) - Overrides:
getVisitorin classorg.openrewrite.ScanningRecipe<AddAnnotationProcessor.Scanned>
-