// // FLEXObjectExplorer.h // FLEX // // Created by Tanner Bennett on 8/28/19. // Copyright © 2020 FLEX Team. All rights reserved. // #import "FLEXRuntime+UIKitHelpers.h" /// Carries state about the current user defaults settings @interface FLEXObjectExplorerDefaults : NSObject + (instancetype)canEdit:(BOOL)editable wantsPreviews:(BOOL)showPreviews; /// Only \c YES for properties and ivars @property (nonatomic, readonly) BOOL isEditable; /// Only affects properties and ivars @property (nonatomic, readonly) BOOL wantsDynamicPreviews; @end @interface FLEXObjectExplorer : NSObject + (instancetype)forObject:(id)objectOrClass; + (void)configureDefaultsForItems:(NSArray> *)items; @property (nonatomic, readonly) id object; /// Subclasses can override to provide a more useful description @property (nonatomic, readonly) NSString *objectDescription; /// @return \c YES if \c object is an instance of a class, /// or \c NO if \c object is a class itself. @property (nonatomic, readonly) BOOL objectIsInstance; /// An index into the `classHierarchy` array. /// /// This property determines which set of data comes out of the metadata arrays below /// For example, \c properties contains the properties of the selected class scope, /// while \c allProperties is an array of arrays where each array is a set of /// properties for a class in the class hierarchy of the current object. @property (nonatomic) NSInteger classScope; @property (nonatomic, readonly) NSArray *> *allProperties; @property (nonatomic, readonly) NSArray *properties; @property (nonatomic, readonly) NSArray *> *allClassProperties; @property (nonatomic, readonly) NSArray *classProperties; @property (nonatomic, readonly) NSArray *> *allIvars; @property (nonatomic, readonly) NSArray *ivars; @property (nonatomic, readonly) NSArray *> *allMethods; @property (nonatomic, readonly) NSArray *methods; @property (nonatomic, readonly) NSArray *> *allClassMethods; @property (nonatomic, readonly) NSArray *classMethods; @property (nonatomic, readonly) NSArray *classHierarchyClasses; @property (nonatomic, readonly) NSArray *classHierarchy; @property (nonatomic, readonly) NSArray *> *allConformedProtocols; @property (nonatomic, readonly) NSArray *conformedProtocols; @property (nonatomic, readonly) NSArray *allInstanceSizes; @property (nonatomic, readonly) FLEXStaticMetadata *instanceSize; @property (nonatomic, readonly) NSArray *allImageNames; @property (nonatomic, readonly) FLEXStaticMetadata *imageName; - (void)reloadMetadata; - (void)reloadClassHierarchy; @end