mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 20:15:11 +00:00
rename javaModules -> nativeModules
Reviewed By: AaaChiuuu Differential Revision: D4631758 fbshipit-source-id: 3b62ada1bf32467b67cd8529d4b7873b43898ee4
This commit is contained in:
parent
e622d51e20
commit
87137cadd7
@ -56,7 +56,7 @@ import static com.facebook.react.bridge.ReactMarkerConstants.PROCESS_CORE_REACT_
|
|||||||
* view managers from).
|
* view managers from).
|
||||||
*/
|
*/
|
||||||
@ReactModuleList(
|
@ReactModuleList(
|
||||||
javaModules = {
|
nativeModules = {
|
||||||
AndroidInfoModule.class,
|
AndroidInfoModule.class,
|
||||||
AnimationsDebugModule.class,
|
AnimationsDebugModule.class,
|
||||||
DeviceEventManagerModule.class,
|
DeviceEventManagerModule.class,
|
||||||
|
@ -19,10 +19,10 @@ import static java.lang.annotation.RetentionPolicy.SOURCE;
|
|||||||
public @interface ReactModuleList {
|
public @interface ReactModuleList {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Java modules in this list should be annotated with {@link ReactModule}.
|
* The Native modules in this list should be annotated with {@link ReactModule}.
|
||||||
* @return List of Java modules in the package.
|
* @return List of Native modules in the package.
|
||||||
*/
|
*/
|
||||||
Class<? extends NativeModule>[] javaModules();
|
Class<? extends NativeModule>[] nativeModules();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The View Managers in this list should be annotated with {@link ReactModule}.
|
* The View Managers in this list should be annotated with {@link ReactModule}.
|
||||||
|
@ -87,7 +87,7 @@ public class ReactModuleSpecProcessor extends AbstractProcessor {
|
|||||||
ReactModuleList reactModuleList = typeElement.getAnnotation(ReactModuleList.class);
|
ReactModuleList reactModuleList = typeElement.getAnnotation(ReactModuleList.class);
|
||||||
List<String> nativeModules = new ArrayList<>();
|
List<String> nativeModules = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
reactModuleList.javaModules(); // throws MirroredTypesException
|
reactModuleList.nativeModules(); // throws MirroredTypesException
|
||||||
} catch (MirroredTypesException mirroredTypesException) {
|
} catch (MirroredTypesException mirroredTypesException) {
|
||||||
List<? extends TypeMirror> typeMirrors = mirroredTypesException.getTypeMirrors();
|
List<? extends TypeMirror> typeMirrors = mirroredTypesException.getTypeMirrors();
|
||||||
for (TypeMirror typeMirror : typeMirrors) {
|
for (TypeMirror typeMirror : typeMirrors) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user