It indicates that the annotated method is overriding a method in a superclass.
它指明注释的方法将覆盖超类中的方法。
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.
当最后认识到方法的参数有错,且该方法实际上没有覆盖超类中的方法时,您可能更感到难受。
If a subclass of one of these classes needed to override the default behavior, it could do so by overriding the method.
如果这些类中的任何一个的子类需要覆盖默认行为,那么可以通过覆盖这个方法实现。
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.
您可能很想知道怎样才能知道特定组件的大小是被显式地指定的,或通过覆盖度量方法进行度量。
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输出流。
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模式定义了基类算法的骨架,使用了抽象方法和覆盖将具体细节放到子类中。
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来防止子类覆盖它,也可应用于类声明本身来防止继承。
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的父类可能用类型参数被实例化,因此类型检查器就不能确定意外方法覆盖的所有情况。
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.
元编程提供了快速、简单的方法,使潜在的随机行为具有了必然性。
An overriding method can also return a subtype of the type returned by the overridden method.
最重要的方法也将被重写的方法返回类型的子类型。
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.
当这个类中包含抽象方法时,或是该类并没有完全实现父类的抽象方法时。
Scenarios for overriding this method might include if your derived class has a specialized style selector, or caches style values.
如果您的派生类有专用样式选择器或缓存样式值,则可以包含重写此方法的方案。
Scenarios for overriding this method might include if your derived class has a specialized style selector, or caches style values.
如果您的派生类有专用样式选择器或缓存样式值,则可以包含重写此方法的方案。
应用推荐