Rename Method
Renaming a method allows developers to improve the language of the domain as their understanding naturally evolves during development.
- Choose a new name for the method. This is the hard part!
- Change the method definition to the new name.
- Find and replace all references to the old name.
If there are a large number of references to the method you want to rename, you can rename the callers one at a time while keeping everything in working order. The process is mostly the same:
- Choose a new name for the method. This is the hard part!
- Give the method its new name.
- Add an alias to keep the old name working.
- Find and replace all references to the old name.
- Remove the alias.