IntelliJ IDEA 2016.2 Help

Extract Parameter Dialog for Groovy

Refactor | Extract | Parameter

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

Type Specify the type of the new parameter. Usually, you don't need to change the type suggested by IntelliJ IDEA.
Name Specify the name for the new parameter.
Declare finalSelect 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 usedSelect this check box to remove a parameter.
Use explicit return statementThis check box 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 check box the keyword is returned.
ParametersIn this area, select parameters to be passed to the new method/function.
Move Up/DownUse these buttons to change the order of the parameters.
Signature previewIn this read-only field, view the declaration of the new method/function.

See Also

Last modified: 23 November 2016