Previous Topic Next topic Print topic


MF 

Instance-of Condition

The instance-of condition determines whether an object reference is an instance of a particular class or interface.

General Format


*

Syntax Rules

  1. Object-identifier-1 must be an object reference.
  2. Class-name-1 must be the name of a class specified in the Repository paragraph or the Class-Control paragraph of this source element.
  3. Interface-name-1 must be the name of an interface specified in the Repository paragraph or the Class-Control paragraph of this source element.

General Rules

  1. If none of the optional phrases is specified, the result of the instance-of test is true if the object named by object-identifier-1 is an instance of the class named by class-name-1 or one of its subclasses, or the interface named by interface-name-1 or one of its subinterfaces.
  2. If the FACTORY phrase is specified and the ONLY phrase is not specified, the result of the instance-of test is true if the object named by object-identifier-1 is the factory of the class named by class-name-1.
  3. If the ONLY phrase is specified and the FACTORY phrase is not specified, the result of the instance-of test is true if the object named by object-identifier-1 is an instance of the class named by class-name-1, and not one of its subclasses.
  4. If both the FACTORY phrase and the ONLY phrase are specified, the result of the instance-of test is true if the object named by object-identifier-1 is the factory of the class named by class-name-1, and not one of its subclasses
Previous Topic Next topic Print topic