单军华
2018-03-28 f99cf1d5cc50407394501853be06cb39f38a092c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//
//  LHObjectInfo.h
//  LHDBDemo
//
//  Created by 3wchina01 on 16/3/21.
//  Copyright © 2016年 李浩. All rights reserved.
//
 
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
 
typedef NS_ENUM(NSUInteger,LHBaseTypeEcoding) {
    LHBaseTypeEcodingUnknow,
    LHBaseTypeEcodingINT,
    LHBaseTypeEcodingLONG,
    LHBaseTypeEcodingULONG,
    LHBaseTypeEcodingCHAR,
    LHBaseTypeEcodingFLOAT,
    LHBaseTypeEcodingBOOL,
    LHBaseTypeEcodingDOUBLE
};
 
typedef NS_ENUM(NSUInteger,LHNSTypeEcoding) {
    LHNSTypeUNknow,
    LHNSTypeNSString,
    LHNSTypeNSNumber,
    LHNSTypeNSDate,
    LHNSTypeNSData,
    LHNSTypeNSURL,
    LHNSTypeNSArray,
    LHNSTypeNSDictionary,
    LHNSTypeUIImage
};
 
@interface LHObjectInfo : NSObject
 
@property (nonatomic) Class cls;
 
@property (nonatomic) objc_property_t property_t;
 
@property (nonatomic,copy) NSString* name;
 
@property (nonatomic,assign) LHBaseTypeEcoding baseTypeEcoding;
 
@property (nonatomic,assign) LHNSTypeEcoding nsTypeEcoding;
 
@property (nonatomic) SEL set;
 
@property (nonatomic) SEL get;
 
@property (nonatomic,copy) NSString* type;
 
- (instancetype)initWithProperty:(objc_property_t)property;
 
@end
 
@interface LHClassInfo : NSObject
 
@property (nonatomic)Class cls;
 
@property (nonatomic)Class superClass;
 
@property (nonatomic)Class metaClass;
 
@property (nonatomic,assign) BOOL isMetaClass;
 
@property (nonatomic,strong) NSMutableDictionary* objectInfoDic;
 
- (instancetype)initWithClass:(Class)cls;
 
+ (BOOL)isCacheWithClass:(Class)cls;
 
+ (LHClassInfo*)classInfoWithClass:(Class)cls;
 
- (LHObjectInfo*)objectInfoWithName:(NSString*)name;
 
@end