... *Replace Magic Number with Symbolic Constant 用字面常量代替魔数 Long Method 过长方法 Replace Data Value with Object 用对象代替数据值 ...
基于388个网页-相关网页
long wall method 长壁开采法
long-base method 长基线法
long interval method 长间隔法
long throw sputtering method 长抛溅射法
long line method 长线法
filling long wall method 充填长壁采煤法
long-line method 长线法
Long-term prediction method 长期预报方法
The highlighted section in Listing 7 shows a small portion of an example of a long method code smell.
清单7中高亮显示的部分展示了一个长方法代码味道示例的一小部分。
In this example, the long method has been broken into smaller methods that each do one thing and do it well.
在这个示例中,将一个很长的方法分解为几个短方法,并且让每个短方法负责一件事情。
In his book, Refactoring, Martin Fowler describes the issue with the long Method code smell quite nicely as "the longer a procedure is, the more difficult it is to understand."
Martin Fowler在他撰写的Refactoring这本书中,对代码中存在冗长方法的气味这个问题做了精妙的描述——过程越长,越难理解。
应用推荐