OCLOperators oclIsTypeOf
From MDrivenWiki
oclIsTypeOf( typespec : Class ) : Boolean
Returns true if the type of self is the same as typespec, or false otherwise. 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 |