🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
OCLOperators superTypes
This page was created by Peter on 2019-12-19. Last edited by 62.169.16.147 on 2026-09-12.


Returns a set of all the direct supertypes of the type.

ReturnType:[edit source]

Collection(System.String)

Example:[edit source]

Example showing OCL operator superTypes
Mango.superTypes

Returns

['Fruit']


It's like asking, "Who are my parents?" for any class you have.

The superTypes operator only returns the first level of inheritance (direct parents), not the complete inheritance hierarchy. For all ancestors, use allSuperTypes instead.

See also:[edit source]