Package org.axonframework.migration
Class RemoveTypeArguments
java.lang.Object
org.openrewrite.Recipe
org.axonframework.migration.RemoveTypeArguments
- All Implemented Interfaces:
Cloneable
public class RemoveTypeArguments
extends org.openrewrite.Recipe
Strips generic type arguments from references to a specific fully-qualified type.
Several AF5 message types (Message, EventMessage, CommandMessage,
QueryMessage, QueryResponseMessage, ResultMessage) dropped the
payload-type parameter that AF4 carried. The ChangeType recipe relocates the type
but keeps the <T> usage in source, leading to compile errors like
"Type ... does not have type parameters". This recipe rewrites
EventMessage<Foo> → EventMessage (and the matching <?>/<? extends X>
forms) so source compiles against the AF5 raw type.
- Since:
- 5.1.1
- Author:
- Mateusz Nowak
-
Nested Class Summary
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 TypeMethodDescriptionorg.openrewrite.TreeVisitor<?, org.openrewrite.ExecutionContext> Methods inherited from class org.openrewrite.Recipe
addDataTable, builder, buildRecipeList, causesAnotherCycle, clone, createRecipeDescriptor, equals, getContributors, getDataTableDescriptors, getDescriptor, 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
-
RemoveTypeArguments
-
-
Method Details
-
getFullyQualifiedTypeName
-
getDisplayName
- Specified by:
getDisplayNamein classorg.openrewrite.Recipe
-
getDescription
- Specified by:
getDescriptionin classorg.openrewrite.Recipe
-
getVisitor
public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor()- Overrides:
getVisitorin classorg.openrewrite.Recipe
-