调用基类上已被其他方法重写的方法。
Call a method on the base class that has been overridden by another method.
我们实际上可以用多种方法重写上一个例子的最后一行。
We could actually write the last line of the previous example in several ways.
但该参数的值不可以被过程或者是方法重写。
The value of the parameter can not be overwritten by the procedure or function.
另一方面,可以照下面的方法重写单参数构造器来修复错误。
On the other hand, the bug could be fixed by rewriting the single-argument constructor as follows.
如果您不希望自己的方法重写新的基类方法,则需要注意以下事项。
If you do not want your method to override the new base class method, the following considerations apply.
以一致的方式命名重写层次结构中的参数可以提高方法重写的可用性。
Consistent naming of parameters in an override hierarchy increases the usability of the method overrides.
当抽象类从基类继承虚方法时,抽象类可以使用抽象方法重写该虚方法。
When an abstract class inherits a virtual method from a base class, the abstract class can override the virtual method with an abstract method.
派生类中的方法重写基类方法,而且这两种方法的可见性修饰符是不同的。
A method in a derived class overrides a base-class method, and the visibility modifiers of the two methods are different.
该参数可以被过程或者是方法引用。但该参数的值不可以被过程或者是方法重写。
IN - the parameter can be referenced by the procedure or function. The value of the parameter can not be overwritten by the procedure or function.
该参数既可以被过程或者是方法引用。该参数的值也可以被过程或者是方法重写。
IN OUT - the parameter can be referenced by the procedure or function and the value of the parameter can be overwritten by the procedure or function.
因为新的click方法重写了Button的具体实现,必须加上override关键字。
Since the new click method overrides Button's concrete implementation, the override keyword is required.
事实上,重写是发现和纠正一些错误的最好方法,如语法和拼写错误。
In fact, rewriting is the best way to find out and correct some mistakes, like grammar and spelling mistakes.
其次,程序员必须重写必要的基本方法。
Secondly, the programmer must override base methods as necessary.
无需创建接口和去掉整个模拟对象的存根—您可以有选择地重写方法并返回一个简单的模拟响应。
No need to create an interface and stub out an entire mock object - you can strategically override that one method and return a simple mocked-out response.
它实现了对提供的类编写者实例的传递处理,使您可以只重写需要特殊处理的方法。
It implements the pass-through handling for a supplied class writer instance, letting you override only the methods where you need special handling.
当子类所重写的方法被调用时,你可以在子类中对父类的内部状态进行操作。
In a subclass you can make assumptions about the internal state of the superclass when the method you override is getting called.
然后就可以放弃事件或者调用重写了基类的方法。
Then you can either abandon the event or must invoke the method overridden in the based class.
缺少这个注释可能表示开发人员没有意识到该方法被重写。
A missing annotation may indicate that the developer didn't realize the method was being overridden.
如果可以重写类的话,则可以重写它的方法的行为,因此您最安全的选择就是不允许将类子类化。
If the class can be overridden, its methods' behaviors can be overridden as well, so your safest bet is to disallow subclassing.
尽管对于重写方法,可能会多一点开销,但让编写测试的人专注于正在发生的事情是很重要的。
Although there maybe a little more overhead with regards to overriding methods, it is important to keep the test writer concentrated on what is happening.
再一次,我们重写了click方法。
EmptyVisitor只是提供了所有不同种类的visitor的空的实现,允许您只对感兴趣的visitor方法建子类和重写。
EmptyVisitor just provides an empty implementation of all the various types of visitors, allowing you to subclass and override only the visitor methods of interest.
在清单6中,您重写了Header方法,其被调用以便生成每一个页面的标题内容。
In Listing 6, you override the header method, which is called to generate the content for each page's header.
每个表达式类都有一个simplify方法,以允许表达式重写。
Each expression class has a simplify method, to allow expression rewriting.
为了支持等待的线程,在清单2中已经重写了remove方法。
In Listing 2, the remove method has been overridden to support waiting threads.
搜索查询,同样,不难想象出,可以将它重写为一个方法调用。
Search query I made earlier, it's not hard to imagine rewriting it as a method call, either.
现在您已经创建了一个原始标题的合理副本,您也需要重写Footer方法,以便于您生成页脚。
Now that you've created a reasonable facsimile of the original header, you also need to override the footer method so you can generate the footer.
它使用了HTTP的方法和页眉(header),但是重写了HTTP中管理连接和数据转移格式的部分。
It USES HTTP methods and headers, but it overrides the parts of the protocol that manage connections and data transfer formats.
被重写的click方法会增加count。
为了举例说明,可以将%INCLUDE “lsxsd . lss ”行添加到Web服务的(options)部分,然后重写GetUserRoles方法,如下所示。
As an example, you could add the line % INCLUDE "lsxsd.lss" to the (Options) section of the Web service and rewrite the GetUserRoles method like this.
应用推荐