mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-04 22:56:32 +08:00
Reviewed By: fkgozali Differential Revision: D8065619 fbshipit-source-id: 719c303b40c96950bab8e5dde9a75f449b2956c6
28 lines
612 B
Java
28 lines
612 B
Java
// Copyright (c) 2004-present, Facebook, Inc.
|
|
|
|
// This source code is licensed under the MIT license found in the
|
|
// LICENSE file in the root directory of this source tree.
|
|
|
|
package com.facebook.react;
|
|
|
|
import javax.inject.Provider;
|
|
|
|
import com.facebook.react.bridge.NativeModule;
|
|
|
|
/**
|
|
* Provider for an already initialized and non-lazy NativeModule.
|
|
*/
|
|
public class EagerModuleProvider implements Provider<NativeModule> {
|
|
|
|
private final NativeModule mModule;
|
|
|
|
public EagerModuleProvider(NativeModule module) {
|
|
mModule = module;
|
|
}
|
|
|
|
@Override
|
|
public NativeModule get() {
|
|
return mModule;
|
|
}
|
|
}
|