Class 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. - FieldAccess to the new variable need to be covered separately. Refer to ChangeFieldAccess.