Files
react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/ReactNativeConfig.java
T
David Vacca 619e27e9a1 Annotate core classes of Fabric with NonNull and Nullable annotations
Summary:
This diff annotates core classes of Fabric with NonNull and Nullable annotations, this will help analysis of nullability plus improving integration with Kotlin clients

Changelog: Add NonNull annotation to Fabric core classes

Reviewed By: shergin

Differential Revision: D18010918

fbshipit-source-id: 40fe68470b97cdf740f52dfeb9130465aab5e6df
2019-10-25 15:11:51 -07:00

48 lines
1.2 KiB
Java

/*
* Copyright (c) Facebook, Inc. and its 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;
// This is a wrapper for the ReactNativeConfig object in C++
@DoNotStrip
public interface ReactNativeConfig {
/**
* 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 an integer param by string name. Default should be 0.
*
* @param param The string name of the parameter being requested.
*/
@DoNotStrip
int 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);
}