123456789101112131415161718192021222324252627282930313233343536373839 |
- /*
- * AlibcReflectionUtil.h
- *
- * 阿里百川电商
- * 项目名称:阿里巴巴电商 AlibcTradeCommon
- * 版本号:3.1.1.93
- * 发布时间:2017-03-06
- * 开发团队:阿里巴巴百川商业化团队
- * 阿里巴巴电商SDK答疑群号:1229144682(阿里旺旺)
- * Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
- */
- #import <Foundation/Foundation.h>
- #ifndef AlibcReflectionUtil_h
- #define AlibcReflectionUtil_h
- @interface AlibcReflectionUtil : NSObject
- + (id)getSharedInstance:(NSString *)className;
- + (id)getInstance:(NSString *)className instanceMethodName:(NSString *)instanceMethodName;
- + (id)executeInstanceMethod:(NSString *)methodName instance:(id)instance params:(NSArray *)params;
- + (id)executeClassMethod:(NSString *)methodName clazz:(Class)clazz;
- + (id)executeInstanceMethod:(NSString *)methodName instanceAndargs:(id)instance, ...;
- @end
- #define BC_MAKE_SELECTOR(var_name, sel_name) _Pragma("clang diagnostic push")\
- _Pragma("clang diagnostic ignored \"-Wundeclared-selector\"")\
- SEL var_name = @selector(sel_name);\
- _Pragma("clang diagnostic pop")
- #define BC_FETCH_CLASS(className) [NSClassFromString(@#className) class]
- #endif
|