测量实例3:方法覆盖模块视图。
随著这一计划很容易选择正确的方法覆盖。
With this program it's easy to choose the right method of overwriting.
方法覆盖的工作方式相同,成员可见性的工作方式相同,还有更多相同的地方。
Method overriding works the same, member visibility works the same, and so on.
现在这不是一个理想的解决方案——在某些情况下不能被这种方法覆盖。
Now this is not an ideal solution - there are cases that cannot be covered by this method.
视图余下的部分提供了方便的方法来添加公共SIPservlet方法的方法覆盖。
The rest of the view provides a convenient way to add method overrides for common SIP servlet methods.
可以使用任何常用的配置方法覆盖Hibernate的默认设置:hbm映射文件或者标注。
You can override the Hibernate defaults using any of the usual configuration methods: HBM mapping files or annotations.
因为mixin的父类可能用类型参数被实例化,因此类型检查器就不能确定意外方法覆盖的所有情况。
Because a mixin's parent may be instantiated with a type parameter, there is no way for the type checker to determine all cases of accidental method overriding.
这些试验方法覆盖了对金属涂层片附着力的评估。附着性通过在涂层切口处施加和去除透明压敏胶带来评估。
These test methods cover procedures for assessing the adhesion of coating films to metallic substrates by applying and removing pressure-sensitive tape over cuts made in the film.
可以容易地用user_columns方法覆盖这些默认设置,这个方法中有include和exclude选项。
You can easily override these defaults with the user_columns method, which has include and exclude options.
例如,您将在本文后面的Override注释中看到Tiger引入了一个这样的注释,用于允许您指定一种方法覆盖超类中的另一种方法。
For example, you'll see in the override annotation, later in this article, that Tiger introduces an annotation that lets you specify that a method overrides another method from a superclass.
对所有类进行专门测试后,还要为所有未覆盖的方法编写测试代码。
Once you partially test all the classes, write tests that cover any uncovered methods.
一个覆盖全部方法的网站已经产生。
与行覆盖一样,如果在特定方法中有两个分支,并且两个分支在测试中都被覆盖,那么您可以说这个方法有100%的分支覆盖率。
Just like line coverage, if there are two branches in a particular method and both were covered through tests, then you could say the method has 100% branch coverage.
如果不覆盖这些方法,根本无法编译此类。
You literally cannot compile this class without overriding these methods.
而且如果需要编写测试,通常都是十分简单、覆盖方法的主要功能目标的测试。
More often than not, if they do write tests, they're typically very simple, covering the method's main functional aim.
您可以覆盖这些方法以编写定制的逻辑。
You can override each of these methods to write custom logic.
这在好些情况下很容易发生,比如在方法被覆盖而超类使用常规参数声明方法时,还有正在进行许多序列化的系统中也容易发生。
This can happen easily in cases in which methods are being overridden and the superclass declares the method with generic parameters, or in a system where lots of serialization is going on.
绕过这个要求的一种最简单的方法是覆盖您的主机文件中的一个DNS。
The easiest way to get around this requirement is to make a DNS override in your hosts file.
定制组件必须在验证发生之前覆盖这个方法以提交属性。
A custom component must override this method to commit properties before validation happens.
静态方法不能被覆盖,但如果它不是决定性的则可以被隐藏。
Static methods cannot be overridden but can be hidden if they are not final (Read about Overriding vs Hiding here).
在特殊化对象中,覆盖创建方法以返回为测试提供的模仿对象。
In the specialization object, override the creation method to return a mock object that accommodates your test.
当最后认识到方法的参数有错,且该方法实际上没有覆盖超类中的方法时,您可能更感到难受。
When you finally realize that a method has a parameter wrong, and in fact isn't overriding a method from a superclass, much bitterness can result.
可以覆盖方法并调用父实现。
You can override a method and invoke the parent implementation.
覆盖细节视图,只有当你收集了方法和行覆盖以后才有效。
Coverage Detail views, available only if you collect both method and line coverage.
重构:抽取和覆盖工厂方法。
接下来要注意的是该类不再直接覆盖service方法。
Next, notice that the class no longer directly overrides the service method.
在图1中,被覆盖的方法加上了Hit标签,没有覆盖的则加上Missed标签。
In Figure 1, methods that are covered are labeled Hit, and those not covered are labeled Missed.
TemplateMethod模式定义了基类算法的骨架,使用了抽象方法和覆盖将具体细节放到子类中。
The Template Method pattern defines the skeleton of an algorithm in a base class, using abstract methods and overriding to defer individual details to child classes.
除了前面描述的hook(包括action和filter)之外,另一个修改WordPress行为的插件编写方法是覆盖WordPress函数。
Besides the hooks (actions and filters) described above, another way for a plugin to modify WordPress's behavior is to override WordPress functions.
id:对将覆盖此方法的类的引用。
Id: the reference to the class that will override the method.
应用推荐