Class ChangeLiteral<P>

java.lang.Object
org.openrewrite.TreeVisitor<org.openrewrite.java.tree.J,P>
org.openrewrite.java.JavaVisitor<P>
org.openrewrite.java.JavaIsoVisitor<P>
org.openrewrite.java.ChangeLiteral<P>

public class ChangeLiteral<P> extends JavaIsoVisitor<P>
  • Constructor Details

    • ChangeLiteral

      public ChangeLiteral(Expression scope, Function<Object,Object> transform)
      Parameters:
      scope - And expression containing a literal, including a binary expression like String concatenation, where you want to transform the String literals participating in the concatenation.
      transform - The transformation to apply to each literal found in the expression scope.
  • Method Details

    • visitLiteral

      public org.openrewrite.java.tree.J.Literal visitLiteral(org.openrewrite.java.tree.J.Literal literal, P p)
      Overrides:
      visitLiteral in class JavaIsoVisitor<P>