FLEXRuntimeKeyPath.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // FLEXRuntimeKeyPath.h
  3. // FLEX
  4. //
  5. // Created by Tanner on 3/22/17.
  6. // Copyright © 2017 Tanner Bennett. All rights reserved.
  7. //
  8. #import "FLEXSearchToken.h"
  9. @class FLEXMethod;
  10. NS_ASSUME_NONNULL_BEGIN
  11. /// A key path represents a query into a set of bundles or classes
  12. /// for a set of one or more methods. It is composed of three tokens:
  13. /// bundle, class, and method. A key path may be incomplete if it
  14. /// is missing any of the tokens. A key path is considered "absolute"
  15. /// if all tokens have no options and if methodKey.string begins
  16. /// with a + or a -.
  17. ///
  18. /// The @code TBKeyPathTokenizer @endcode class is used to create
  19. /// a key path from a string.
  20. @interface FLEXRuntimeKeyPath : NSObject
  21. + (instancetype)empty;
  22. /// @param method must start with either a wildcard or a + or -.
  23. + (instancetype)bundle:(FLEXSearchToken *)bundle
  24. class:(FLEXSearchToken *)cls
  25. method:(FLEXSearchToken *)method
  26. isInstance:(NSNumber *)instance
  27. string:(NSString *)keyPathString;
  28. @property (nonatomic, nullable, readonly) FLEXSearchToken *bundleKey;
  29. @property (nonatomic, nullable, readonly) FLEXSearchToken *classKey;
  30. @property (nonatomic, nullable, readonly) FLEXSearchToken *methodKey;
  31. /// Indicates whether the method token specifies instance methods.
  32. /// Nil if not specified.
  33. @property (nonatomic, nullable, readonly) NSNumber *instanceMethods;
  34. @end
  35. NS_ASSUME_NONNULL_END