An application may ensure at compile time that an object of one class, say employee, will never be used as an object of an unrelated class, say account. This is done by using an object reference described with either a classname, an interface-name, or an ACTIVE-CLASS phrase. If a class-name is specified, the data item can only be used to reference an object of the class specified, or one of its subclasses, as discussed in Inheritance. If an interface-name is specified, the data item can only be used to reference an object described with an IMPLEMENTS clause that references the interface specified, as discussed in
Class polymorphism. If the ACTIVE-CLASS phrase is specified, the data item can only be used to reference an object of the same class as that of the object with which the method was invoked. Object references for ACTIVE-CLASS are of special significance as returning items. This capability is needed for defining a new method in the BASE class that works as documented without violating the conformance rules, and it allows writing user methods that do object creation in conformance with the definition of the class hierarchy.