ChangeName

changeName:
  name: theNewName

Description

Changes the name of a class, field, method or method invocation target.

Warning

This action will not refactor every usage of the renamed element.

Configuration options

name

The new name to use.

search:
  methodcall:
    name: println
availableFixes:
- name: change to printf
  actions:
  - changeName:
      name: printf
-  System.out.println("hello world");
+  System.out.printf("hello world");
search:
  class:
    name: X
availableFixes:
- name: change to Y
  actions:
  - changeName:
      name: Y
-  class X {}
+  class Y {}