mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Simplify ViewManagerOnDemandReactPackage.getViewManagerNames to return Collection
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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d7921f0504
commit
51e029ec3c
@@ -10,15 +10,14 @@ package com.facebook.react;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.uimanager.ViewManager;
|
||||
import java.util.List;
|
||||
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().
|
||||
*/
|
||||
@Nullable
|
||||
List<String> getViewManagerNames(ReactApplicationContext reactContext);
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user