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:
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;
|
||||
|
|
Loading…
Reference in New Issue