Tests if the specified element complies with one of the specified Element Types.
Note: Since in some DSMs (Data Source Models) there is no direct inherent
association between elements and Element Types, testing if an element complies
with a certain Element Type can be done much quicker than finding the exact Element Type
associated with this element.
When you need only to test if some element belongs to a certain Element Type,
always use this function instead of the GOMElement.elementType
property.
Parameters:
element
contextElement.instanceOf(elementTypeSpec)
elementTypeSpec
true
if the element complies with at least one of
the specified Element Types;false
otherwise (or in the case element == null
)
checkElementType(), resolveElementType(), findElementType(), GOMElement.elementType
You may call this function in a method-like style, e.g.:
element.instanceOf("UseCase")
element.instanceOf("Class | Interface")