Chapter 4. Objects and Classes
A Rexx object consists of object methods
and object variables ("attributes"). Sending
a message to an object causes the object to perform some action; a method
whose name matches the message name defines the action that is performed.
Only an object's methods can access the object variables belonging to
an object. EXPOSE instructions within an object's methods specify which object
variables the methods will use. Any variables not exposed are local to the method and
are dropped on return from a method.
You can create
an object by sending a message to a class object—typically a "new" method. An object created from a
class is an
instance of that class.
The methods a class defines
for its instances are called the
instance methods
of that class. These are the object methods that are available for every instance of the class. Classes can also
define
class methods, which are a class's own
object methods.