BaseObject is the base class that implements the property feature.
Property names are case-insensitive.
- Besides the property feature, BaseObject also introduces an important object initialization life cycle. In particular,
- creating an new instance of BaseObject or its derived class will involve the following life cycles sequentially:
- the class constructor is invoked;
- object properties are initialized according to the given configuration;
- the
init()
method is invoked.
In the above, both Step 2 and 3 occur at the end of the class constructor. It is recommended that you perform object initialization in theinit()
method because at that stage, the object configuration is already applied.
网友评论