mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Quick refactor to reuse EmptyReactNativeConfig from ReactNativeConfig changelog: [internal] internal Reviewed By: genkikondo Differential Revision: D34283060 fbshipit-source-id: 32400d5ed6defd9f82953dc49ae365598db71bbc
60 lines
1.7 KiB
Java
60 lines
1.7 KiB
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.fabric;
|
|
|
|
import androidx.annotation.NonNull;
|
|
import com.facebook.proguard.annotations.DoNotStrip;
|
|
|
|
/**
|
|
* ReactNative Configuration that allows to customize the behavior of key/value pairs used by the
|
|
* framework to enable/disable capabilities.
|
|
*
|
|
* <p>The hosting app should provide an implementation of this interface to allow specific
|
|
* customization of single keys. An empty implementation is available as {@link
|
|
* EmptyReactNativeConfig}.
|
|
*
|
|
* <p>This is a wrapper for the ReactNativeConfig object in C++
|
|
*/
|
|
@DoNotStrip
|
|
public interface ReactNativeConfig {
|
|
|
|
public final ReactNativeConfig DefaultValuesReactNativeConfig = new EmptyReactNativeConfig();
|
|
|
|
/**
|
|
* Get a boolean param by string name. Default should be false.
|
|
*
|
|
* @param param The string name of the parameter being requested.
|
|
*/
|
|
@DoNotStrip
|
|
boolean getBool(@NonNull String param);
|
|
|
|
/**
|
|
* Get a Long param by string name. Default should be 0.
|
|
*
|
|
* @param param The string name of the parameter being requested.
|
|
*/
|
|
@DoNotStrip
|
|
long getInt64(@NonNull String param);
|
|
|
|
/**
|
|
* Get a string param by string name. Default should be "", empty string.
|
|
*
|
|
* @param param The string name of the parameter being requested.
|
|
*/
|
|
@DoNotStrip
|
|
String getString(@NonNull String param);
|
|
|
|
/**
|
|
* Get a double param by string name. Default should be 0.
|
|
*
|
|
* @param param The string name of the parameter being requested.
|
|
*/
|
|
@DoNotStrip
|
|
double getDouble(@NonNull String param);
|
|
}
|