next up previous
Next: How do attributes get their values?
Up: The WOM language
Previous: Elements that create instances

Attributes

It is worth saying a few words on attributes and methods. In the Object Rexx code generated by the compiler, every WOM attribute corresponds to two methods, one for setting it to a new value and one for fetching its current value. These methods have the same name as the attribute, prefixed with set and get respectively --- see the set methods above.

This use of get and set in method names is quite common amongst Object Rexx programmers, and also in some other object-oriented languages. JavaBeans follows the same convention, for example. Note that case in attribute names (and other names) does not matter: both the WOM compiler and Object Rexx ignore it.



Jocelyn Ireson-Paine
Fri May 30 14:03:06 BST 1997