RQReflection.h 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. //
  2. // RQReflection.h
  3. // RQCommon
  4. //
  5. // Created by 张嵘 on 2018/11/16.
  6. // Copyright © 2018 张嵘. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. // Creates a selector from a key and a constant string.
  10. //
  11. // key - The key to insert into the generated selector. This key should be in
  12. // its natural case.
  13. // suffix - A string to append to the key as part of the selector.
  14. //
  15. // Returns a selector, or NULL if the input strings cannot form a valid
  16. // selector.
  17. SEL RQSelectorWithKeyPattern(NSString *key, const char *suffix) __attribute__((pure, nonnull(1, 2)));
  18. // Creates a selector from a key and a constant prefix and suffix.
  19. //
  20. // prefix - A string to prepend to the key as part of the selector.
  21. // key - The key to insert into the generated selector. This key should be in
  22. // its natural case, and will have its first letter capitalized when
  23. // inserted.
  24. // suffix - A string to append to the key as part of the selector.
  25. //
  26. // Returns a selector, or NULL if the input strings cannot form a valid
  27. // selector.
  28. SEL RQSelectorWithCapitalizedKeyPattern(const char *prefix, NSString *key, const char *suffix) __attribute__((pure, nonnull(1, 2, 3)));