OCLOperators oclIsKindOf
No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
|} | |} | ||
[[Category:OCLOperators]] | [[Category:OCLOperators]] | ||
[[Category:OCL General Operators]] |
Revision as of 07:13, 14 April 2023
This page was created by Alexandra on 2017-08-13. Last edited by Stephanie on 2025-02-12.
oclIsKindOf( typespec : Class ) : Boolean
Returns true if the type of self corresponds to the type or supertype of typespec - otherwise, returns false. This operation allows users to check the class hierarchy of self much like they would an instance of Java.
Expression | Result |
---|---|
anEmployee.oclIsKindOf(Employee) | true |
anEmployee.oclIsKindOf(Person) | true |
aCat.oclIsKindOf(Person) | false |