🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
OCLOperators allSubClasses
Created by Alexandra on 2017-08-13 · Last edited by Colline.ssali on 2025-12-29.


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 sub classes the class has.

Example:

Assume the following inheritance structure:

Department

   ├── ClinicalDepartment

   └── AdministrativeDepartment

Department.allSubClasses

It returns a collection of subclasses

ClinicalDepartment, AdministrativeDepartment