mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Migrate Nullable and NonNull annotations to AndroidX
Summary: This diff migrates the usages Nullable and NonNull annotations to AndroidX instead of javax. The purpose of this change is to bring consistency in the annotations used by the core of RN Reviewed By: makovkastar Differential Revision: D16054504 fbshipit-source-id: 21d888854da088d2a14615a90d4dc058e5286b91
This commit is contained in:
committed by
Facebook Github Bot
parent
96318e438f
commit
aa5edca0e2
@@ -6,11 +6,11 @@
|
||||
*/
|
||||
package com.facebook.react.bridge;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Interface for a map that allows typed access to its members. Used to pass parameters from JS to
|
||||
@@ -18,37 +18,37 @@ import javax.annotation.Nullable;
|
||||
*/
|
||||
public interface ReadableMap {
|
||||
|
||||
boolean hasKey(@Nonnull String name);
|
||||
boolean hasKey(@NonNull String name);
|
||||
|
||||
boolean isNull(@Nonnull String name);
|
||||
boolean isNull(@NonNull String name);
|
||||
|
||||
boolean getBoolean(@Nonnull String name);
|
||||
boolean getBoolean(@NonNull String name);
|
||||
|
||||
double getDouble(@Nonnull String name);
|
||||
double getDouble(@NonNull String name);
|
||||
|
||||
int getInt(@Nonnull String name);
|
||||
int getInt(@NonNull String name);
|
||||
|
||||
@Nullable
|
||||
String getString(@Nonnull String name);
|
||||
String getString(@NonNull String name);
|
||||
|
||||
@Nullable
|
||||
ReadableArray getArray(@Nonnull String name);
|
||||
ReadableArray getArray(@NonNull String name);
|
||||
|
||||
@Nullable
|
||||
ReadableMap getMap(@Nonnull String name);
|
||||
ReadableMap getMap(@NonNull String name);
|
||||
|
||||
@Nonnull
|
||||
Dynamic getDynamic(@Nonnull String name);
|
||||
@NonNull
|
||||
Dynamic getDynamic(@NonNull String name);
|
||||
|
||||
@Nonnull
|
||||
ReadableType getType(@Nonnull String name);
|
||||
@NonNull
|
||||
ReadableType getType(@NonNull String name);
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
Iterator<Map.Entry<String, Object>> getEntryIterator();
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
ReadableMapKeySetIterator keySetIterator();
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
HashMap<String, Object> toHashMap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user