mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-09 09:30:10 +08:00
move more bugreporting logic to bugreporting module
Reviewed By: astreet Differential Revision: D3168205 fb-gh-sync-id: 3cf5691acb258f9741c61005bbec0a8507bc8162 fbshipit-source-id: 3cf5691acb258f9741c61005bbec0a8507bc8162
This commit is contained in:
committed by
Facebook Github Bot 3
parent
89340f1620
commit
4ddb7c59d0
@@ -144,6 +144,10 @@ public class NativeModuleRegistry {
|
||||
}
|
||||
}
|
||||
|
||||
public <T extends NativeModule> boolean hasModule(Class<T> moduleInterface) {
|
||||
return mModuleInstances.containsKey(moduleInterface);
|
||||
}
|
||||
|
||||
public <T extends NativeModule> T getModule(Class<T> moduleInterface) {
|
||||
return (T) Assertions.assertNotNull(mModuleInstances.get(moduleInterface));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user