OCLOperators allSubClasses
The allSubClass operator is a meta-model operation that returns a collection of all subclasses (child classes) of a given class. This includes both direct and indirect subclasses in the inheritance hierarchy. It is mainly used for model introspection, allowing you to analyze class hierarchies rather than instance-level data.
Meta-information on all the subclasses the class has.
Example:
Assume the following inheritance structure:
Department
├── ClinicalDepartment
└── AdministrativeDepartment
Department.allSubClassesIt returns a collection of subclasses.
ClinicalDepartment, AdministrativeDepartment
