创建一个从预定义grammar类继承而来的派生类。
Create a derived class inherited from the predefined grammar class.
某些情况下,此公共功能不够完整,无法生成一个可用的对象,因此每个派生类都需要单独定义所缺少的功能。
In some cases, this common functionality is not complete enough to make a usable object, and each derived class defines the missing functionality.
隐藏和重写都在派生类继承基类时使用,并且都是用另外的元素重定义一个已声明的元素。
Shadowing and overriding are both used when a derived class inherits from a base class, and both redefine one declared element with another.
当您定义从基类继承的类时,有时会需要重定义派生类中的一个或多个基类元素。
When you define a class that inherits from a base class, you sometimes want to redefine one or more of the base class elements in the derived class.
当您定义从基类继承的类时,有时会需要重定义派生类中的一个或多个基类元素。
When you define a class that inherits from a base class, you sometimes want to redefine one or more of the base class elements in the derived class.
应用推荐