Every object in a running program, including objects your program defines via "object" and "class" definitions and instances of intrinsic classes, ultimately derives from the intrinsic class "Object."
You can never instantiate Object directly, since this is an "abstract" class. However, since every object is a subclass of Object, the methods that Object defines are inherited by every object in the system.
The Object class defines a number of methods that can be used with any object. Most of these methods are related to the the relationships between objects and classes.
getSuperclassList() – returns a list containing the immediate superclasses of the object. The list contains only the object's direct superclasses, which are the superclasses that were explicitly listed in the object's declaration for static objects, or the class used with the "new" operator for dynamic objects. This function returns an empty list for an object with no superclass. For an object with more than one direct superclass, the list contains the superclasses in the same order in which they were specified in the object's declaration.
For example, consider these definitions:
class A: object;
class B: object;
class C: B;
myObj: C, A;
The result of myObj.getSuperclassList() will be the list [C, A]. Note that class B is not included in the list, because it is not a direct superclass of myObj, but is a superclass only indirectly through class C.
isClass(cls) – determines if the object is an instance of the class cls, or an instance of any subclass of cls. Returns true if so, nil if not. This method always returns true if cls is Object, since every object ultimately derives from the Object intrinsic class.
propDefined(prop, flags?) – determines if the object defines or inherits the property prop (a property pointer value – specify this by applying an ampersand ("&") to a property name), according to the flags value. If flags is not specified, a default value of PROPDEF_ANY is used. The valid flags values are:
propType(prop) – returns the datatype of the given property of the given object, or nil if the object does not define or inherit the property. This function does not evaluate the property, but merely determines its type. The return value is one of the TYPE_xxx values.