· UnusedPrivateField: Detects when a private field is declared and/or assigned a value, but not used.
翻译 未用的私有变量:检测到私有变量被声明或被赋值,但是未使用
· UnusedLocalVariable: Detects when a local variable is declared and/or assigned, but not used.
翻译 未用的本地变量:检测到本地变量被声明或被赋值,但是未使用
· UnusedPrivateMethod: Unused Private Method detects when a private method is declared but is unused.
翻译 未用的私有方法:检测到已声明但未使用的私有方法
· UnusedFormalParameter: Avoid passing parameters to methods or constructors and then not using those parameters.
翻译 未用的常规参数:避免传递给方法或构造器不使用的参数
本文介绍了几种检测未使用的代码元素的方法,包括未用的私有变量、本地变量、私有方法及方法参数。这些检测有助于提升代码质量和维护效率。
2825

被折叠的 条评论
为什么被折叠?



