TBRuntime.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // FLEXRuntime.h
  3. // FLEX
  4. //
  5. // Created by Tanner on 3/22/17.
  6. // Copyright © 2017 Tanner Bennett. All rights reserved.
  7. //
  8. #import "TBToken.h"
  9. @class FLEXMethod;
  10. /// Accepts runtime queries given a token.
  11. @interface TBRuntime : NSObject
  12. + (instancetype)runtime;
  13. /// Called automatically when \c TBRuntime 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. /// An array of strings representing the currently loaded libraries.
  18. @property (nonatomic, readonly) NSArray<NSString*> *imageDisplayNames;
  19. /// "Image name" is the path of the bundle
  20. - (NSString *)shortNameForImageName:(NSString *)imageName;
  21. /// "Image name" is the path of the bundle
  22. - (NSString *)imageNameForShortName:(NSString *)imageName;
  23. /// @return Bundle names for the UI
  24. - (NSMutableArray<NSString *> *)bundleNamesForToken:(TBToken *)token;
  25. /// @return Bundle paths for more queries
  26. - (NSMutableArray<NSString *> *)bundlePathsForToken:(TBToken *)token;
  27. /// @return Class names
  28. - (NSMutableArray<NSString *> *)classesForToken:(TBToken *)token
  29. inBundles:(NSMutableArray<NSString *> *)bundlePaths;
  30. /// @return A list of lists of \c FLEXMethods where
  31. /// each list corresponds to one of the given classes
  32. - (NSArray<NSMutableArray<FLEXMethod *> *> *)methodsForToken:(TBToken *)token
  33. instance:(NSNumber *)onlyInstanceMethods
  34. inClasses:(NSArray<NSString*> *)classes;
  35. @end