mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: This way we can avoid unnecessary ArrayList copies. Changelog: [Android][Changed] Generalized the return type of ViewManagerOnDemandReactPackage.getViewManagerNames Reviewed By: nlutsenko Differential Revision: D36131516 fbshipit-source-id: 6a42c76cadbcce4c3720875d80062e1ee237bc2f
28 lines
954 B
Java
28 lines
954 B
Java
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* 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 androidx.annotation.Nullable;
|
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
import com.facebook.react.uimanager.ViewManager;
|
|
import java.util.Collection;
|
|
|
|
public interface ViewManagerOnDemandReactPackage {
|
|
/**
|
|
* Provides a list of names of ViewManagers with which these modules can be accessed from JS.
|
|
* Typically, this is ViewManager.getName().
|
|
*/
|
|
Collection<String> getViewManagerNames(ReactApplicationContext reactContext);
|
|
/**
|
|
* Creates and returns a ViewManager with a specific name {@param viewManagerName}. It's up to an
|
|
* implementing package how to interpret the name.
|
|
*/
|
|
@Nullable
|
|
ViewManager createViewManager(ReactApplicationContext reactContext, String viewManagerName);
|
|
}
|