Try OpenEdge Now
skip to main content
Object-oriented Programming
Programming with Class-based Objects : Using built-in system and object reference elements : SUPER system reference
 

SUPER system reference

SUPER is a system reference available for use within an instantiated class hierarchy that, when executed from a subclass, invokes an instance method implemented in a super class. A common use for this system reference is to invoke a super class method that the subclass overrides. The SUPER system reference provides the only way a super class's implementation of an overridden method can be invoked, and it must be invoked from a method of a subclass. Also, the SUPER system reference can only be used within a subclass to invoke a super class method in the class hierarchy of that subclass. There is no way to directly invoke a super class version of an overridden method from outside of the class hierarchy. For more information on the syntax and use of this system reference, see Constructingan object.
Note: Unlike THIS-OBJECT, the SUPER system reference is not an object reference, and it can only be used to invoke a super class method from a subclass in the same class hierarchy. You cannot use SUPER, by itself for example, to pass an object reference to the current instance's super class as a parameter.
The SUPER system reference is not the same as the SUPER statement. For more information on the SUPER statement, see Constructingan object.
Note: You cannot use the SUPER system reference to access a static method.