IntelliJ IDEA 2021.1 Help

Extract Class Dialog

Use this page to specify the settings for the extract delegate refactoring.

ItemDescription
Name for new classSpecify the name of the class to be created.

If you want to define a class within the existing one, select the Create nested class option.

Package nameSpecify the name of the destination package for the new class.
Target destination directorySpecify the directory for the class you are defining.
Members to extractSelect the fields and methods to be extracted to the new class.

IntelliJ IDEA can also generate getters if you select the Generate accessors option.

VisibilitySelect the visibility level for the members you are extracting.

You can select from the following options:

  • Escalate: this option is selected by default and means that the visibility of extracted members will change to ensure that the current calls to the delegated elements can be compiled.

  • As is: select this option if you want to use the exsisting visibility for the members you are extracting.

  • Private: select this option to make the extracted members private.

  • Package local: select this option to make the extracted members belong to only the local package.

  • Protected: select this option to make the extacted member protected.

  • Public: select this option to make all of the extracted members public.

Last modified: 21 June 2021