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
    Constructor
    Description
    RemoveTypeArguments(String fullyQualifiedTypeName)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    org.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

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RemoveTypeArguments

      public RemoveTypeArguments(String fullyQualifiedTypeName)
  • Method Details

    • getFullyQualifiedTypeName

      public String getFullyQualifiedTypeName()
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in class org.openrewrite.Recipe
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in class org.openrewrite.Recipe
    • getVisitor

      public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor()
      Overrides:
      getVisitor in class org.openrewrite.Recipe