Use the root class: Progress.Lang.Object
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Progress.Lang.Object is an ABL built-in
class definition that is the ultimate super class (root class) for
all classes. In other words, if a class does not inherit from another
class it implicitly inherits from Progress.Lang.Object.
Thus, at the top of every class inheritance chain is the Progress.Lang.Object class.
Progress.Lang.Object is a fully implemented (non-abstract)
class that provides a common set of properties and methods that are
available for an instance of any class.
The following table describes the common properties and methods
on Progress.Lang.Object.
| Property or method | Description |
|---|---|
|
A read-only property that contains an object reference
to the next object in the linked list of instantiated objects for
the session. You use this property together with the FIRST-OBJECT attribute
on the SESSION system handle in order to walk the
list from the first to the last instantiated object. |
|
A read-only property that contains an object reference
to the previous object in the linked list of instantiated objects
for the session. You use this property together with the LAST-OBJECT attribute on
the SESSION system handle in order to walk the
list from the last to the first instantiated object. |
|
Constructor for this class. You can instantiate Progress.Lang.Object,
but its functionality is limited to the public properties and methods
defined in this table. This class is normally used to define a variable
or parameter that can represent any class-based object in ABL (because
all class-based objects inherit from Progress.Lang.Object). |
|
Returns an object reference to a built-in instance
of Progress.Lang.Class that provides type information
for the current class instance. Each ABL session contains a single
instance of Progress.Lang.Class for each type of
class-based object created in the session. The lifetime of this
built-in object is controlled by the ABL session and therefore cannot
be deleted. For more information on the built-in class, Progress.Lang.Class,
see Reflection. |
|
Returns the type name of the object followed by a unique object identifier in the ABL session. This method is normally overridden by a subclass. |
|
Returns TRUE if two different
object references point to the same object or are both the Unknown value (?),
and returns FALSE otherwise. The two compared object
references include the current object reference and the object reference
specified by other-obj. Note: This default behavior is equivalent to comparing
two object references using the equals operator ( EQ or =). |
|
Has no default behavior and returns the Unknown value (?) and
an error message if it is invoked and not overridden by a subclass.
The subclass should define a method to create a copy of an object
and return a reference to the new copy. |
Because every object ultimately derives from Progress.Lang.Object,
you can define an object reference data element with the data type Progress.Lang.Object and
set it to reference any class-based object that you create in an
ABL session. As with any object reference, the use of a Progress.Lang.Object object reference
is limited to the properties and methods defined for Progress.Lang.Object.
However, you can cast any object reference to an appropriate subclass
to access functionality in that subclass. For more information on
casting, see Object reference assignment and casting.