GoLand 2017.3 Help

Extract Interface Dialog

Refactor | Extract Interface

ItemDescription
Extract interface fromThis read-only field shows the name of the source package that contains the class to extract an interface from.
Extract interfaceWhen this option is selected, GoLand extracts a new interface but does not use it immediately and the source code is not changed.
Interface nameIn this text box, type the name for the new interface. The text box is available if the Extract interface option is selected.
Extract interface and use it where possible Select this option to have an interface extracted and immediately applied to the source code, with the suggested changes displayed in the dedicated tab of the Find tool window.
Rename original class and use interface where possibleUse this option to rename the original class and make it an implementation of the newly created interface.
Rename implementation class toIn this text box, type the new name for the original class. The text box is available if the Rename original class and use interface where possible option is selected.
Package for new interfaceIn this drop-down list, specify the package for the new interface. If necessary, click the Browse button browseButton.png and choose the target package in the dialog that opens.
Members to Form InterfaceIn this area, specify the methods of the class, as well as final static fields (constants) to be included in the new interface. To have an element included in the interface, select the checkbox next to it.
JavaDoc/ASDocIn this area, specify the action to be applied to the inline documentation. The available options are:
  • As is - select this option to have the inline documentation left where it is.
  • Copy - select this option to have the inline documentation copied to the extracted interface without removing it from its current location.
  • Move - select this option to have the inline documentation moved to the extracted interface and delete it from its current location.
Last modified: 14 February 2018

See Also