Inline
Last modified: 02 July 2021
Shortcut: Ctrl+Alt+N
The Inline refactoring lets you reverse the Extract refactoring for a method, constructor, parameter, superclass, anonymous class, and variable.
You can inline the pattern variable since the Java 14 version. In this case, all the occurrences will be replaced with old-style cast expression.
Place the caret at the code fragment you want to inline.
Press Ctrl+Alt+N. Alternatively, select Refactor | Inline from the main or context menu.
In the Inline dialog, specify the inlining options.
Preview and apply changes.