mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-21 10:34:31 +08:00
merge module info into ModuleHolder
Reviewed By: javache Differential Revision: D4512982 fbshipit-source-id: e1272812f95d08f2c3eb834a18da842d425b3edb
This commit is contained in:
committed by
Facebook Github Bot
parent
7555ae13d1
commit
9f3e928f83
@@ -1,17 +0,0 @@
|
||||
// Copyright 2004-present Facebook. All Rights Reserved.
|
||||
|
||||
package com.facebook.react.module.model;
|
||||
|
||||
/**
|
||||
* Interface for static information about native modules.
|
||||
*/
|
||||
public interface Info {
|
||||
|
||||
String name();
|
||||
|
||||
boolean canOverrideExistingModule();
|
||||
|
||||
boolean supportsWebWorkers();
|
||||
|
||||
boolean needsEagerInit();
|
||||
}
|
||||
@@ -6,7 +6,7 @@ package com.facebook.react.module.model;
|
||||
* Data holder class holding native module specifications. {@link ReactModuleSpecProcessor} creates
|
||||
* these so Java modules don't have to be instantiated at React Native start up.
|
||||
*/
|
||||
public class ReactModuleInfo implements Info {
|
||||
public class ReactModuleInfo {
|
||||
|
||||
private final String mName;
|
||||
private final boolean mCanOverrideExistingModule;
|
||||
@@ -24,22 +24,18 @@ public class ReactModuleInfo implements Info {
|
||||
mNeedsEagerInit = needsEagerInit;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String name() {
|
||||
return mName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canOverrideExistingModule() {
|
||||
return mCanOverrideExistingModule;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsWebWorkers() {
|
||||
return mSupportsWebWorkers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean needsEagerInit() {
|
||||
return mNeedsEagerInit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user