Wrap Return Value Dialog
Use this refactoring to create a wrapper class around the return values of a method, or use a compatible existing class as a wrapper.
Method to wrap returns from
This read-only field shows the name of the selected method.
Create new class
Click this radio-button to create a new wrapper class. If this option is selected, specify the class and destination package name in the fields below.
Type the name of the new wrapper class.
By default, the 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 to create a new one.
Target destination directory
Use this field to select the target destination directory. By default, the current destination directory is displayed. You usually choose the target destination based on a current package. If this package exists in multiple roots, you can click arrow button and select Leave in same source root from the list. In this case, wrapper would be placed near the initial class.
Use existing class
Click this radio-button to use an existing class of your choice as a wrapper.
Specify the name of the desired wrapper class. Note that such class should contain a constructor with a parameter of the same type as the return value in question.
Select the field that will store the return value, from the drop-down list of fields, encountered in the specified wrapper class.
Click this radio-button to create an inner class. You might want to do that if, for example, you have a private method. In this case you can leave everything in the same class.
Specify the name of the inner class.