FLEXRuntimeClient.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //
  2. // FLEXRuntimeClient.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. /// Accepts runtime queries given a token.
  11. @interface FLEXRuntimeClient : NSObject
  12. @property (nonatomic, readonly, class) FLEXRuntimeClient *runtime;
  13. /// Called automatically when \c FLEXRuntime is first used.
  14. /// You may call it again when you think a library has
  15. /// been loaded since this method was first called.
  16. - (void)reloadLibrariesList;
  17. /// You must call this method on the main thread
  18. /// before you attempt to call \c copySafeClassList.
  19. + (void)initializeWebKitLegacy;
  20. /// Do not call unless you absolutely need all classes. This will cause
  21. /// every class in the runtime to initialize itself, which is not common.
  22. /// Before you call this method, call \c initializeWebKitLegacy on the main thread.
  23. - (NSArray<Class> *)copySafeClassList;
  24. - (NSArray<Protocol *> *)copyProtocolList;
  25. /// An array of strings representing the currently loaded libraries.
  26. @property (nonatomic, readonly) NSArray<NSString *> *imageDisplayNames;
  27. /// "Image name" is the path of the bundle
  28. - (NSString *)shortNameForImageName:(NSString *)imageName;
  29. /// "Image name" is the path of the bundle
  30. - (NSString *)imageNameForShortName:(NSString *)imageName;
  31. /// @return Bundle names for the UI
  32. - (NSMutableArray<NSString *> *)bundleNamesForToken:(FLEXSearchToken *)token;
  33. /// @return Bundle paths for more queries
  34. - (NSMutableArray<NSString *> *)bundlePathsForToken:(FLEXSearchToken *)token;
  35. /// @return Class names
  36. - (NSMutableArray<NSString *> *)classesForToken:(FLEXSearchToken *)token
  37. inBundles:(NSMutableArray<NSString *> *)bundlePaths;
  38. /// @return A list of lists of \c FLEXMethods where
  39. /// each list corresponds to one of the given classes
  40. - (NSArray<NSMutableArray<FLEXMethod *> *> *)methodsForToken:(FLEXSearchToken *)token
  41. instance:(NSNumber *)onlyInstanceMethods
  42. inClasses:(NSArray<NSString *> *)classes;
  43. @end