当前位置:网站首页>IDEA代码重构小技巧(VIP典藏版)
IDEA代码重构小技巧(VIP典藏版)
2022-04-22 16:44:00 【Java托尼】
目录
一、重构函数
1、提取方法
提取想要的代码,按快捷键Ctrl+Alt+M,就会弹出框,写出方法名称即可提取一个方法
2、合并方法
反向操作,选中方法后,把方法代码直接并入主方法里面
3、方法重命名
Ctrl+Shift+Alt+T,或者Shift+F6
![]()
4、函数参数位置更改与重命名
二、重构变量
Ctrl+Alt+C 快速提取常量(Constant) Ctrl+Alt+V快速提取变量(Variable) Ctrl+Alt+F快速提取成员变量(Filed Variable) Ctrl+Shift+f6 重构变量的类型 点击变量,直接使用快捷键
![]()
三、提取方法到父类
有用请点赞,养成良好习惯!
疑问交流鼓励请留言!
版权声明
本文为[Java托尼]所创,转载请带上原文链接,感谢
https://libusi.blog.csdn.net/article/details/124310564
边栏推荐
- Analysis of JWT permission verification of golang
- 员工健康码数据如何自动汇总?
- C ODBC loads the files of one folder into the blob column of Oracle database and downloads the blob column to another folder
- 循环链表应用-约瑟夫环
- 【csnote】范式
- 认知系列4: 《认知突围》笔记
- Blue Bridge Cup practice 019
- 接口测试 Mock 实战(二) | 结合 jq 完成批量化的手工 Mock
- CrashSight 常规功能&特色功能介绍
- [Unity] 战斗系统学习 12:Switchable
猜你喜欢

SolidWorks oblique reference plane

Leetcode题库62. 不同路径(递归 c实现)

Domain driven model DDD (III) -- using saga to manage transactions

NFT platform security guide

Ten thousand yuan gift pool! Play "Lighthouse" award-winning essay attack

Blue Bridge Cup practice 014

Use of serial port data plot serialplot

认知系列4: 《认知突围》笔记

Interview:人工智能岗位面试—人工智能岗位求职之机器学习算法工程师必备知识框架结构图

多线程使用redis进行累加结果不对解决方案
随机推荐
Blue Bridge Cup practice 017
Huawei machine test questions -- hj54 expression evaluation
Blue Bridge Cup exercise 012
实验四、数据挖掘之KNN,Naive Bayes
领域驱动模型DDD(三)——使用Saga管理事务
What is the advantage of asemi low voltage drop Schottky diode over ordinary Schottky diode?
顺序表的代码实现
认知系列4: 《认知突围》笔记
HMS Core Discovery第14期回顾长文|纵享丝滑剪辑,释放视频创作力
Talk about the general problem of substitution between TL431 and az431 (personal experience)
Linux Mysql 8 修改密码 Your password does not satisfy the current policy requirements
Detailed data of db107-asemi rectifier bridge
产业调研:厂商视角看国产数据库发展趋势
Gome retail takes advantage of the east wind of digital economy to create a "boat body" consumption experience
【面试普通人VS高手系列】请说一下网络四元组
Blue Bridge Cup practice 013
[Unity] 使用 Animation Rigging 制作瞄准 IK 1
Random talk on homology strategy (SOP) and cross domain resource sharing (CORS)
C#判断数据库返回记录是否是NULL的DBNull 类DBNull.Value.Equals(row[fieldName]
NFT platform security guide









