If a subclass of one of these classes needed to override the default behavior, it could do so by overriding the method.
如果这些类中的任何一个的子类需要覆盖默认行为,那么可以通过覆盖这个方法实现。
This section offers a step-by-step description of the Extract and Override factory method refactoring.
本节将循序渐进地描述“抽取”和“覆盖”工厂方法重构。
When implementing an interface, your method must override all methods of the interface.
当您在实施一个界面时,您的方法必须替换界面的所有方法。
In a subclass you can make assumptions about the internal state of the superclass when the method you override is getting called.
当子类所重写的方法被调用时,你可以在子类中对父类的内部状态进行操作。
You just override them, which combines the strong points of existing object finding method.
您只是超越了它们,将已存在的对象搜索方法的最强部分结合起来。
The subclass can then override any particular method to alter the behavior of the base reader.
然后让子类改写某些特殊的方法从而改变基本读取器的行为。
So we override that method with an implementation which returns the notification's type and the time at which we received the notification.
因此我们用一个返回通知类型和接收到通知的时间的实现来覆盖那个方法。
The constructor method uses the normalize method to ensure that the override value strings do not contain symbols used by XML parser.
构造函数方法使用标准化的方法来确保重载值中不包含XML 解析器所使用的符号。
A custom component must override this method to commit properties before validation happens.
定制组件必须在验证发生之前覆盖这个方法以提交属性。
In the specialization object, override the creation method to return a mock object that accommodates your test.
在特殊化对象中,覆盖创建方法以返回为测试提供的模仿对象。
The next thing you have to do is override any method from the base class or classes to populate the column.
接下来需要覆盖来自基类或者类的任何方法来填充列。
Unlike Override, deprecated should be placed on the same line as the method being deprecated why?
与Override不一样的是,Deprecated应该与正在声明为过时的方法放在同一行中为什么这样?
In Listing 6, you override the header method, which is called to generate the content for each page's header.
在清单6中,您重写了Header方法,其被调用以便生成每一个页面的标题内容。
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.
现在您已经创建了一个原始标题的合理副本,您也需要重写Footer方法,以便于您生成页脚。
You also override the constructor where you instantiate the server class and the SugarRestServiceXML: : serve method to instantiate the response class.
我们还重写了构造函数,其中实例化了服务器类和SugarRestServiceXML:serve方法,以实例化响应类。
Because act is an abstract method, we don't need to explicitly override it with the override keyword.
因为act是一个抽象方法,我们不需要显式地用override关键字来重写。
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.
例如,您将在本文后面的Override注释中看到Tiger引入了一个这样的注释,用于允许您指定一种方法覆盖超类中的另一种方法。
The container can override an abstract (or concrete) method to return the result of performing a getBean() call at the time when the method is invoked.
容器能够重载一个抽象(或者具体)的方法来在方法被调用时返回执行getBean()调用的结果。
To work around this problem, you must extend the JETEmitter class to override the initialize method and add in your own classpath entries.
要解决这个问题,必须对JETEmitter类进行扩充,使其覆盖initialize方法,并将其加入您自己的classpath项中。
You need to override this method after calling super.updateDisplayList() if you're creating a custom layout, and then substitute the desired logic.
如果您正在创建定制布局,那么需要在调用 super.updateDisplayList() 之后覆盖该方法,然后替换为希望使用的逻辑。
Simply override each abstract method in BridgeFactory, and change it to return true or false, as appropriate.
只需覆盖BridgeFactory中的每个抽象方法,并适当地将它改为返回true或false。
In this sample, only one database is used, but in a multiple database solution, the derived business object classes can override this method, returning their appropriate home Notes database instance.
在这个示例中,只用到了一个数据库,但在多数据库解决方案中,派生的业务对象类可以覆盖该方法,返回其适当的主要Notes数据库实例。
For this purpose we can override the method px_freeze, which performs a "setup" on your data prior to it being stored, and the method px_thaw, which will be called when your data is extracted.
为此,我们可以覆盖方法px _ freeze(它在您的数据被存储之前对其进行“设置”)和方法px _ thaw(在提取数据时将调用它)。
You can also override a Dojo widget method, subclass an existing Dojo widget for special behavior, or create your own widget.
也可以覆盖一个Dojo小部件方法、针对特定行为子类化一个现有的Dojo小部件或创建您自己的小部件。
But if you do go with fixed sizes, you don't have to override the measure method, and you can even define the width and height when adding the component to its parent.
但是使用了固定大小时,您就不需要覆盖measure方法,甚至可以在将组件添加到其父组件时定义width和height。
If you override visit (Code) and call super.visit (Code) from it, when the superclass visit (Code) returns, it will have called visit (CodeException) for all the catch blocks in the method.
如果重写visit (Code),并从那里调用super .visit (Code),则当超类visit (Code)返回时,它将调用用于该方法中所有catch块的visit (CodeException)。
The annotation indicates that hasCode() should override a method.
注释指明hasCode()应该覆盖方法。
It looks like the add method is something you should override in FixedList, as in Listing 11.
似乎add方法应当在FixedList中被重写,如清单11所示。
Figure 2 is a snapshot of how your XML plug-in will look after you have added a rule to override the default method bodies in the generated code. Notice this line, in particular.
图2是在生成的代码中,添加一条规则,以改变默认的方法主体后,您的XML插件外观的快照。
Next, you override the measure() method and measure the height and width of the text using text-line metrics.
接下来,覆盖 measure()方法并使用文本行单位度量文本的height和width。
应用推荐