Manages the installation and uninstallation of advice objects. More...
#import <AOCAspectManager.h>
Public Member Functions | |
| (BOOL) | - installAdvice:forSelector:ofClass:error: |
| Installs an advice object. | |
| (void) | - uninstallAdvice:forSelector:ofClass: |
| Uninstalls an advice object. | |
| (void) | - uninstallAllAdvice |
| Uninstalls all advice objects. | |
| (void) | - dealloc |
Calls [self uninstallAllAdvice]. | |
Static Public Member Functions | |
| (AOCAspectManager *) | + defaultAspectManager |
Manages the installation and uninstallation of advice objects.
AOCAspectManager is not a singleton. defaultAspectManager (AOCAspectManager) will return an application-wide default object, but you may create other AOCAspectManager objects if you wish.
| - (void) dealloc |
Calls [self uninstallAllAdvice].
| + (AOCAspectManager *) defaultAspectManager |
| - (BOOL) installAdvice: | (id<AOCAdviceProtocol>) | advice | ||
| forSelector: | (SEL) | selector | ||
| ofClass: | (Class) | cls | ||
| error: | (NSError**) | outError | ||
Installs an advice object.
If two separate AOCAspectManager try to install advice for the same selector and class, then the second installation will fail.
| advice | The advice object to install | |
| selector | The selector to install the advice for. Must be an instance method. | |
| cls | The class to install the advice for. The selector must be implemented on this class, not on a superclass. | |
| outError | A pointer to an NSError*. If this method returns NO, *outError will be set to an NSError* that describes the problem. This argument may be NULL if you don't want the error. |
| - (void) uninstallAdvice: | (id<AOCAdviceProtocol>) | advice | ||
| forSelector: | (SEL) | selector | ||
| ofClass: | (Class) | cls | ||
Uninstalls an advice object.
| advice | The advice object to uninstall | |
| selector | The selector the advice was installed for | |
| cls | The class the advice was installed for |
| - (void) uninstallAllAdvice |
Uninstalls all advice objects.
1.6.3