mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-04 17:39:48 +08:00
Summary:
Includes React Native and its dependencies Fresco, Metro, and Yoga. Excludes samples/examples/docs.
find: ^(?:( *)|( *(?:[\*~#]|::))( )? *)?Copyright (?:\(c\) )?(\d{4})\b.+Facebook[\s\S]+?BSD[\s\S]+?(?:this source tree|the same directory)\.$
replace: $1$2$3Copyright (c) $4-present, Facebook, Inc.\n$2\n$1$2$3This source code is licensed under the MIT license found in the\n$1$2$3LICENSE file in the root directory of this source tree.
Reviewed By: TheSavior, yungsters
Differential Revision: D7007050
fbshipit-source-id: 37dd6bf0ffec0923bfc99c260bb330683f35553e
44 lines
1.7 KiB
Java
44 lines
1.7 KiB
Java
/**
|
|
* Copyright (c) 2015-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 java.util.List;
|
|
|
|
import com.facebook.react.bridge.NativeModule;
|
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
import com.facebook.react.bridge.JavaScriptModule;
|
|
import com.facebook.react.uimanager.UIManagerModule;
|
|
import com.facebook.react.uimanager.ViewManager;
|
|
|
|
/**
|
|
* Main interface for providing additional capabilities to the catalyst framework by couple of
|
|
* different means:
|
|
* 1) Registering new native modules
|
|
* 2) Registering new JS modules that may be accessed from native modules or from other parts of the
|
|
* native code (requiring JS modules from the package doesn't mean it will automatically be included
|
|
* as a part of the JS bundle, so there should be a corresponding piece of code on JS side that will
|
|
* require implementation of that JS module so that it gets bundled)
|
|
* 3) Registering custom native views (view managers) and custom event types
|
|
* 4) Registering natively packaged assets/resources (e.g. images) exposed to JS
|
|
*
|
|
* TODO(6788500, 6788507): Implement support for adding custom views, events and resources
|
|
*/
|
|
public interface ReactPackage {
|
|
|
|
/**
|
|
* @param reactContext react application context that can be used to create modules
|
|
* @return list of native modules to register with the newly created catalyst instance
|
|
*/
|
|
List<NativeModule> createNativeModules(ReactApplicationContext reactContext);
|
|
|
|
/**
|
|
* @return a list of view managers that should be registered with {@link UIManagerModule}
|
|
*/
|
|
List<ViewManager> createViewManagers(ReactApplicationContext reactContext);
|
|
}
|