mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-12 22:39:06 +08:00
Use string class names for native modules
Summary: Using strings as keys for module names instead of actuall `.class` prevents additional class loading Reviewed By: achen1 Differential Revision: D8955006 fbshipit-source-id: 12e6ad35fc35c969c05ca081976cc05b054f6821
This commit is contained in:
committed by
Facebook Github Bot
parent
c8e000b19a
commit
c383138842
@@ -70,6 +70,11 @@ public class ModuleSpec {
|
||||
return new ModuleSpec(provider, type.getName());
|
||||
}
|
||||
|
||||
public static ModuleSpec nativeModuleSpec(
|
||||
String className, Provider<? extends NativeModule> provider) {
|
||||
return new ModuleSpec(provider, className);
|
||||
}
|
||||
|
||||
private ModuleSpec(
|
||||
@Nullable Class<? extends NativeModule> type, Provider<? extends NativeModule> provider) {
|
||||
mType = type;
|
||||
|
||||
Reference in New Issue
Block a user