IntelliJ IDEA 14.1.0 Help

Extract Parameter Object Dialog

Refactor | Extract | Parameter Object


Use this refactoring to create a wrapper class around some selected parameters of a method, or use a compatible existing class as a wrapper.

ItemDescription
Method to extract parameters fromThis read-only field shows the name of the selected method.
Parameter ClassUse this section to specify whether you want to create a new wrapper class or use an existing one.
Create new classClick this radio-button to move parameters of a method to a new class. If this option is selected, specify the class and destination package name in the fields below. By default, current package name is displayed. You can type a different package name in the text field, or click the ellipsis button and select the destination package from the tree view. If the desired package doesn't exist, click icon_newFolder to create a new one.
Create inner classClick this radio-button to move parameters of a method to an inner class. If this option is selected, specify the class name in the field below.
Use existing classClick this radio-button to move parameters of a method to an existing class of your choice. You can type the fully-qualified class name in the text field, or click the ellipsis button and choose the desired class in the Select parameter class dialog box. Note that you can select the desired wrapper class both from the project and non-project classes.
Parameters to extractUse check boxes in this section to select which parameters of a method should be extracted into separate object.
Move Up / Move DownUse these buttons to move the selected reorder parameters in the list.
Keep method as delegateIf this check box is selected, the original method will be preserved as a delegate to the newly created method.

See Also

Last modified: 14 July 2015