-
Notifications
You must be signed in to change notification settings - Fork 0
Interface Concept
ALexeyP0708 edited this page Jul 5, 2020
·
3 revisions
- A class is declared that is marked as an interface.
- In the Interface, each interface member forms its own verification criteria.
- An interface is inherited (direct / indirect inheritance) by a class or assigned through an interface manager.
- Using the interface manager, interface rules for the class are generated, and sandboxes for class members are also assembled.
- Interface rules are generated recursively for each class in the prototype chain.
- When generating interface rules, interfaces are compared / combined into a single rule. For each interface, interface rules are generated from their own generated rules and the rules of inherited interfaces.
- After generating the interface rules for the class, the process of validating the class assembly according to these rules starts.
- Validation of arguments and return results for methods or reactive properties of a class occurs at the moment the method / reactive property is executed.
- Interface rules are initialized once and all declared properties / methods / reactive properties are removed from the interface.
- For each class, its own rules are generated from inherited interfaces once. These rules are then used throughout code execution.
- The class inherits (clones) the rules of the parent class.
- If validation fails, an exception is thrown