![]() Chapter Contents |
![]() Previous |
![]() Next |
| Class Class: _setMethod |
| Syntax | |
| Details |
Syntax |
| objectName._setMethod( methodName, entry ); |
| objectName._setMethod( methodName, entry, label ); |
| Argument | Type | Use | Description |
|---|---|---|---|
| methodName | Character | Input | specifies the name of the method to change or add on the class |
| entry | Character | Input | specifies the three- or four-level name of the SAS/AF entry where the method code is implemented |
| label | Character | Input | specifies the SCL label where the METHOD statement is found when the entry is an SCL entry |
| Details |
_setMethod allows you to add or replace a method for a class. After invoking _setMethod, a call to method on instances of objectName (or instances of its subclasses which have not overridden or disabled methodName) will execute the entry. If you replace a method in a class, there is no way to invoke the old method. For example, if you replace the _setMethod method of the Class class, you make it impossible to change any methods of any class (there will be no way to restore the old definition of the method).
![[cautionend]](../common/images/cautend.gif)
Note: Changes to a class's methods do not persist across
SAS sessions or separate SAS/AF sessions and are not stored in the CLASS entry
or the modified class. ![[cautionend]](../common/images/cautend.gif)
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.