forked from shaojiankui/JKCategories
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jakey
committed
Dec 22, 2015
1 parent
d2e6e2b
commit 3642420
Showing
5 changed files
with
619 additions
and
202 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// | ||
// NSObject+Reflection.h | ||
// NSObject-Reflection | ||
// | ||
// Created by Jakey on 15/12/22. | ||
// Copyright © 2015年 Jakey. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface NSObject (Reflection) | ||
//类名 | ||
- (NSString *)className; | ||
+ (NSString *)className; | ||
//父类名称 | ||
- (NSString *)superClassName; | ||
+ (NSString *)superClassName; | ||
|
||
//实例属性字典 | ||
-(NSDictionary *)propertyDictionary; | ||
|
||
//属性名称列表 | ||
- (NSArray*)propertyKeys; | ||
+ (NSArray *)propertyKeys; | ||
|
||
//属性详细信息列表 | ||
- (NSArray *)propertiesInfo; | ||
+ (NSArray *)propertiesInfo; | ||
|
||
//格式化后的属性列表 | ||
+ (NSArray *)propertiesWithCodeFormat; | ||
|
||
//方法列表 | ||
-(NSArray*)methodList; | ||
+(NSArray*)methodList; | ||
|
||
-(NSArray*)methodListInfo; | ||
|
||
//创建并返回一个指向所有已注册类的指针列表 | ||
+ (NSArray *)registedClassList; | ||
//实例变量 | ||
+ (NSArray *)instanceVariable; | ||
|
||
//协议列表 | ||
-(NSDictionary *)protocolList; | ||
+ (NSDictionary *)protocolList; | ||
|
||
|
||
- (BOOL)hasPropertyForKey:(NSString*)key; | ||
- (BOOL)hasIvarForKey:(NSString*)key; | ||
|
||
@end |
Oops, something went wrong.