mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-01 22:35:29 +08:00
Add annotation processor to create static ReactModule infos
Reviewed By: lexs Differential Revision: D3781016 fbshipit-source-id: 8169e8b55fc044df2230fd01e912c4e96a044f98
This commit is contained in:
committed by
Facebook Github Bot 6
parent
c06c1e1786
commit
605a0a62dc
@@ -0,0 +1,16 @@
|
||||
include_defs('//ReactAndroid/DEFS')
|
||||
|
||||
android_library(
|
||||
name = 'model',
|
||||
srcs = glob(['**/*.java']),
|
||||
deps = [
|
||||
react_native_dep('third-party/java/jsr-305:jsr-305'),
|
||||
],
|
||||
visibility=[
|
||||
'PUBLIC'
|
||||
]
|
||||
)
|
||||
|
||||
project_config(
|
||||
src_target = ':model',
|
||||
)
|
||||
@@ -0,0 +1,25 @@
|
||||
// Copyright 2004-present Facebook. All Rights Reserved.
|
||||
|
||||
package com.facebook.react.module.model;
|
||||
|
||||
/**
|
||||
* Data holder class holding native module specifications.
|
||||
*/
|
||||
public class ReactModuleInfo {
|
||||
|
||||
public final String mName;
|
||||
public final boolean mCanOverrideExistingModule;
|
||||
public final boolean mSupportsWebWorkers;
|
||||
public final boolean mNeedsEagerInit;
|
||||
|
||||
public ReactModuleInfo(
|
||||
String name,
|
||||
boolean canOverrideExistingModule,
|
||||
boolean supportsWebWorkers,
|
||||
boolean needsEagerInit) {
|
||||
mName = name;
|
||||
mCanOverrideExistingModule = canOverrideExistingModule;
|
||||
mSupportsWebWorkers = supportsWebWorkers;
|
||||
mNeedsEagerInit = needsEagerInit;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user