-
- All Implemented Interfaces:
-
java.lang.annotation.Annotation
@Retention(value = RUNTIME)@Target(value = TYPE) public @interface ReactModule
Annotation for use on com.facebook.react.bridge.BaseJavaModules to describe properties for that module.
-
-
Method Summary
Modifier and Type Method Description abstract Stringname()Name used to {@code require()}this module from JavaScript.abstract booleancanOverrideExistingModule()True if you intend to override some other native module that was registered e.g. abstract booleanneedsEagerInit()Whether this module needs to be loaded immediately. abstract booleanhasConstants()Whether this module has constants to add, defaults to true as that is safer for when a correctannotation is not included abstract booleanisCxxModule()Indicates if a module is a C++ module or a Java Module -
-
Method Detail
-
canOverrideExistingModule
abstract boolean canOverrideExistingModule()
True if you intend to override some other native module that was registered e.g. as part of adifferent package (such as the core one). Trying to override without returning true from thismethod is considered an error and will throw an exception during initialization. By default allmodules return false.
-
needsEagerInit
abstract boolean needsEagerInit()
Whether this module needs to be loaded immediately.
-
hasConstants
abstract boolean hasConstants()
Whether this module has constants to add, defaults to true as that is safer for when a correctannotation is not included
-
isCxxModule
abstract boolean isCxxModule()
Indicates if a module is a C++ module or a Java Module
-
-
-
-