IntelliJ IDEA 2022.2 Help

Extract Parameter Dialog for Groovy

Use this dialog to specify the options and settings related to the Extract Parameter refactoring in Groovy.




Specify the type of the new parameter. Usually, you don't need to change the type suggested by IntelliJ IDEA.


Specify the name for the new parameter.

Declare final

Select this option to declare the parameter final.

Delegate via overloading method

Select this option to keep the existing method calls unchanged.

As a result, a new overloading method will be created and the new parameter will be added to the definition of this method. The method with the old signature will be kept. The call to the new method will be added to the old method. The necessary value (or expression) will be passed to the new method in this call.

Remove parameter <name> no longer used

Select this checkbox to remove a parameter.

Use explicit return statement

This checkbox is active if the method returns a value. You can omit return keyword if it is the last return statement in the method. If you select this checkbox the keyword is returned.


In this area, select parameters to be passed to the new method/function.

Move Up/Down

Use these buttons to change the order of the parameters.

Signature preview

In this read-only field, view the declaration of the new method/function.

Last modified: 09 September 2021