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:
Ram N 2018-07-28 00:15:24 -07:00 committed by Facebook Github Bot
parent c8e000b19a
commit c383138842
1 changed files with 5 additions and 0 deletions

View File

@ -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;