Class RenameVariable<P>

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

@Incubating(since="7.5.0") public class RenameVariable<P> extends JavaIsoVisitor<P>
Renames a NamedVariable to the target name. Prevents variables from being renamed to reserved java keywords. Notes: - The current version will rename variables even if a variable with `toName` is already declared in the same scope.