After the refactoring, all USES of that number or string literal in the class refer to that field, instead of the number or string literal itself.
在重构后,所有对这个类中的数字或字符串文字的使用都将指向该字段,而不是指向数字或字符串文字本身。
This way, you can modify the number or string literal in just one place (the value of the field), instead of doing a search and replace throughout your code.
这样,在一个位置(字段的值)就可以实现对所有数字或字符串文字的修改,再也无需在整篇代码中执行查询和替代了。
I have several such rules, but they all just match a literal To: field.
我有几条这样的规则,但它们都仅仅与文字To:域相匹配。
应用推荐