Method overriding works the same, member visibility works the same, and so on.
方法覆盖的工作方式相同,成员可见性的工作方式相同,还有更多相同的地方。
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.
因为mixin的父类可能用类型参数被实例化,因此类型检查器就不能确定意外方法覆盖的所有情况。
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 were able to change the intent of the disk_space method completely by overriding the method in the MyDiskMonitor class.
通过重写My diskmonitor类中的方法,您能够完全改变disk_space方法的意图。
If a subclass of one of these classes needed to override the default behavior, it could do so by overriding the method.
如果这些类中的任何一个的子类需要覆盖默认行为,那么可以通过覆盖这个方法实现。
You have to remember which object is overriding which method, and what objects have new functionality attached to them.
你需要记住对象重写了哪个方法,以及为哪些对象添加了新的功能。
The factory implementation produced by the wizard offers a convenient shortcut that allows overriding of the basic factory method so a URL can be passed to the factory when the stub is created.
由向导生成的工厂实现提供了一个简化操作,就是允许覆写基本的工厂方法,因此当存根被创建时URL就可以被传递到工厂。
You might wonder how you can know whether a particular component's dimensions have been specified explicitly or have been measured by overriding the measured method.
您可能很想知道怎样才能知道特定组件的大小是被显式地指定的,或通过覆盖度量方法进行度量。
It indicates that the annotated method is overriding a method in a superclass.
它指明注释的方法将覆盖超类中的方法。
By overriding the writeTo() method, the code converts the DojoTree object into a tree format and writes it in an HTTP Response output stream.
通过重写 writeTo()方法,代码将DojoTree对象转换成一个树格式然后写入一个HTTPResponse输出流。
Implementation hierarchy works the same way in Scala: We can apply final to the method to prevent a child class from overriding it or to the class declaration itself to prevent derivatives.
实现层次结构在Scala中的效果是相同的:我们可以向方法应用final来防止子类覆盖它,也可应用于类声明本身来防止继承。
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.
TemplateMethod模式定义了基类算法的骨架,使用了抽象方法和覆盖将具体细节放到子类中。
Second, given that this task class is a Runnable, the result of the array access needs to be assigned to the state field (and state needs to be used in an overriding toString method) to prevent DCE.
第二,既然这个任务类是Runnable,为了防止DCE,必须把数组访问的结果赋值给state字段(以及覆盖的toString方法中需要使用的state)。
Metaprogramming offers a quick and easy way to make potentially random behavior deterministic. For example, Listing 10 demonstrates overriding the static random method of the Math class.
元编程提供了快速、简单的方法,使潜在的随机行为具有了必然性。
In the majority of cases the insert-bolster method of construction is used, the ease of manufacture, mould alignment, and resulting lower mould costs being the overriding factors affecting the choice.
在大多例子中采用嵌入式方法结构,加工容易,模具的校直,最重要的因素是降低模具成本影响方法的选择。
By calling or overriding this invoking method, derived classes can invoke the event indirectly.
借由呼叫或覆写这个叫用方法,衍生类别便能够间接地叫用该事件。
An overriding method can also return a subtype of the type returned by the overridden method.
最重要的方法也将被重写的方法返回类型的子类型。
Scenarios for overriding this method might include if your derived class has a specialized style selector, or caches style values.
如果您的派生类有专用样式选择器或缓存样式值,则可以包含重写此方法的方案。
You can provide additional functionality necessary to have your service stopped by the workflow runtime engine by overriding this method.
通过重写此方法,可以提供由工作流运行时引擎停止服务时所需的附加功能。
You can provide additional functionality necessary to have your service started by the workflow runtime engine by overriding this method.
通过重写此方法,可以提供由工作流运行时引擎启动服务时所需的附加功能。
The scenario where overriding this method would be necessary is not common, because it requires you to modify the default layout system behavior.
需要覆写这个方法的案例并不常见,因为它需要您来修改预设的配置系统行为。
Discusses changes to the method for explicitly overriding an interface member.
讨论显式重写接口成员的方法的更改。
A class member, method, field, property, or event, on a derived class that is overriding a virtual member of the base class can declare that member as sealed.
若类别成员、方法、栏位、属性或事件是位于覆写基底类别虚拟成员的衍生类别上,则可宣告为密封。
When overriding, you change the method behavior for a derived class. Overloading simply involves having a method with the same name within the class.
当这个类中包含抽象方法时,或是该类并没有完全实现父类的抽象方法时。
When overriding, you change the method behavior for a derived class. Overloading simply involves having a method with the same name within the class.
当这个类中包含抽象方法时,或是该类并没有完全实现父类的抽象方法时。
应用推荐