IntelliJ IDEA
 
Get IntelliJ IDEA

Move and copy refactorings

Last modified: 04 December 2024

The Copy refactoring lets you create a copy of a class in a different package. It also lets you create a copy of a file, directory or package in a different directory or package.

The Move refactoring lets you move packages and classes between the source roots of a project, class members to other classes and inner classes to upper hierarchy levels. For example, you can perform the move refactoring on a method or a field if it is used more in another class than in its own class.