-
public class ModuleHolder
Holder to enable us to lazy create native modules.
This works by taking a provider instead of an instance, when it is first required we'll create and initialize it. Initialization currently always happens on the UI thread but this is due to change for performance reasons.
Lifecycle events via a LifecycleEventListener will still always happen on the UI thread.
-
-
Constructor Summary
Constructors Constructor Description ModuleHolder(ReactModuleInfo moduleInfo, Provider<out NativeModule> provider)
ModuleHolder(NativeModule nativeModule)
-
Method Summary
Modifier and Type Method Description synchronized void
destroy()
String
getName()
boolean
getCanOverrideExistingModule()
boolean
getHasConstants()
boolean
isTurboModule()
boolean
isCxxModule()
String
getClassName()
NativeModule
getModule()
-
-
Constructor Detail
-
ModuleHolder
ModuleHolder(ReactModuleInfo moduleInfo, Provider<out NativeModule> provider)
-
ModuleHolder
ModuleHolder(NativeModule nativeModule)
-
-
Method Detail
-
destroy
synchronized void destroy()
-
getCanOverrideExistingModule
boolean getCanOverrideExistingModule()
-
getHasConstants
boolean getHasConstants()
-
isTurboModule
boolean isTurboModule()
-
isCxxModule
boolean isCxxModule()
-
getClassName
String getClassName()
-
getModule
NativeModule getModule()
-
-
-
-