OCLOperators oclIsTypeOf
This page was created by Alexandra on 2017-08-13. Last edited by Stephanie@mdriven.net on 2025-02-12.

oclIsTypeOf( typespec : Class ) : Boolean

Returns true if the type of self is the same as typespec - otherwise, returns false. This operation allows users to check the exact class type of self.

Expression Result
anEmployee.oclIsTypeOf(Employee) true
anEmployee.oclIsTypeOf(Person) false
aCat.oclIsTypeOf(Person) false