KWMessagePattern.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // Licensed under the terms in License.txt
  3. //
  4. // Copyright 2010 Allen Ding. All rights reserved.
  5. //
  6. #import "KiwiConfiguration.h"
  7. @interface KWMessagePattern : NSObject
  8. #pragma mark - Initializing
  9. - (id)initWithSelector:(SEL)aSelector;
  10. - (id)initWithSelector:(SEL)aSelector argumentFilters:(NSArray *)anArray;
  11. - (id)initWithSelector:(SEL)aSelector firstArgumentFilter:(id)firstArgumentFilter argumentList:(va_list)argumentList;
  12. + (id)messagePatternWithSelector:(SEL)aSelector;
  13. + (id)messagePatternWithSelector:(SEL)aSelector argumentFilters:(NSArray *)anArray;
  14. + (id)messagePatternWithSelector:(SEL)aSelector firstArgumentFilter:(id)firstArgumentFilter argumentList:(va_list)argumentList;
  15. + (id)messagePatternFromInvocation:(NSInvocation *)anInvocation;
  16. #pragma mark - Properties
  17. @property (nonatomic, readonly) SEL selector;
  18. @property (nonatomic, readonly) NSArray *argumentFilters;
  19. #pragma mark - Matching Invocations
  20. - (BOOL)matchesInvocation:(NSInvocation *)anInvocation;
  21. #pragma mark - Comparing Message Patterns
  22. - (BOOL)isEqualToMessagePattern:(KWMessagePattern *)aMessagePattern;
  23. #pragma mark - Retrieving String Representations
  24. - (NSString *)stringValue;
  25. @end