提炼方法 提炼方法 ( Extract Method) ,把一段代码提取出来作为一个单独的方法使用。 操作步骤: 菜单栏: Refactor —> Extract —> Method 快捷键: Mac: option + Command + M