Product Site

5.1.1.18. methods

Returns a Supplier object for all the instance methods of the receiving class and its superclasses, if no argument is specified. In this case, the supplier's indexes may contain duplicate entries, if classes override methods in superclasses.

If class_object is .nil, methods returns a Supplier object for only the instance methods of the receiving class. If a class_object is specified, this method returns a Supplier object containing only the instance methods that class_object defines.

The returned supplier's indexes are the method names and the supplier's items are their associated Method objects. The Supplier enumerates all the names and methods existing at the time of the supplier's creation.

Note

Methods that have been hidden with a setMethod or define method are included with the other methods that methods returns. The hidden methods have .nil for their associated method.
Example 5.12. Class class — methods method
objsupp = .object~methods
do while objsupp~available
  say objsupp~index           -- displays all instance method
  objsupp~next                -- names of the Object class
end