When you import a class using REXX, the REXX class has all the methods included in the SOM class, as well as the methods in REXX's own Class class. This means you can use all the methods of the Class class and the SOM class. You cannot, however, create new methods for SOM classes from REXX.
For example, the NEW method (for creating new instances of a class) is part of the Class class. You can send a NEW message to Beastclass to create a new beast:
beast=beastclass~new
As part of its processing, the NEW method calls the somNew method on the SOM class to create the SOM object. NEW returns this newly created object. Use this instance of Beastclass just as you would any other REXX object. You can send it any of the SOM messages appropriate for the object. The following statement, for example, returns the name of the SOM class to which the object belongs:
beast~somGetClassName
Note that we do not need to worry about any conversions from REXX objects (Beastclass) to the real SOM object (the Animal class itself). REXX takes care of that for us.