IntelliJ IDEA 13.1.0 Web Help

Refactor | Extract | Parameter

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

Item Description
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 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 check box to remove a parameter.
Use explicit return statement This 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.
Parameters In this area, select parameters to be passed to the new method/function.

Tip

If any parameter that is critical for the functionality of the new method is not selected, IntelliJ IDEA will be unable to proceed with the refactoring.

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.

See Also

Concepts:

Procedures:

Web Resources: