mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Make WritableMapBuffer internal (#49914)
Summary: This class can be internalized as part of the initiative to reduce the public API surface. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+NOT+user%3Acortinico+NOT+repo%3AMaxdev18%2Fpowersync_app+NOT+repo%3Acarter-0%2Finstagram-decompiled+NOT+repo%3Am0mosenpai%2Finstadamn+NOT+repo%3AA-Star100%2FA-Star100-AUG2-2024+NOT+repo%3Alclnrd%2Fdetox-scrollview-reproductible+NOT+repo%3ADionisisChytiris%2FWorldWiseTrivia_Main+NOT+repo%3Apast3l%2Fhi2+NOT+repo%3AoneDotpy%2FCaribouQuest+NOT+repo%3Abejayoharen%2Fdailytodo+NOT+repo%3Amolangning%2Freversing-discord+NOT+repo%3AScottPrzy%2Freact-native+NOT+repo%3Agabrieldonadel%2Freact-native-visionos+NOT+repo%3AGabriel2308%2FTestes-Soft+NOT+repo%3Adawnzs03%2FflakyBuild+NOT+repo%3Acga2351%2Fcode+NOT+repo%3Astreeg%2Ftcc+NOT+repo%3Asoftware-mansion-labs%2Freact-native-swiftui+NOT+repo%3Apkcsecurity%2Fdecompiled-lightbulb+com.facebook.react.common.mapbuffer.WritableMapBuffer). ## Changelog: [INTERNAL] - Make com.facebook.react.common.mapbuffer.WritableMapBuffer internal Pull Request resolved: https://github.com/facebook/react-native/pull/49914 Test Plan: ```bash yarn test-android yarn android ``` Reviewed By: javache Differential Revision: D70884414 Pulled By: cortinico fbshipit-source-id: de1a298f7c7d5da8edf029e8d4dd31a9b334b853
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ddb8c27ab3
commit
4046441997
@@ -1904,29 +1904,6 @@ public final class com/facebook/react/common/mapbuffer/ReadableMapBuffer : com/f
|
||||
public final class com/facebook/react/common/mapbuffer/ReadableMapBuffer$Companion {
|
||||
}
|
||||
|
||||
public final class com/facebook/react/common/mapbuffer/WritableMapBuffer : com/facebook/react/common/mapbuffer/MapBuffer {
|
||||
public fun <init> ()V
|
||||
public fun contains (I)Z
|
||||
public fun entryAt (I)Lcom/facebook/react/common/mapbuffer/MapBuffer$Entry;
|
||||
public fun getBoolean (I)Z
|
||||
public fun getCount ()I
|
||||
public fun getDouble (I)D
|
||||
public fun getInt (I)I
|
||||
public fun getKeyOffset (I)I
|
||||
public fun getLong (I)J
|
||||
public fun getMapBuffer (I)Lcom/facebook/react/common/mapbuffer/MapBuffer;
|
||||
public fun getMapBufferList (I)Ljava/util/List;
|
||||
public fun getString (I)Ljava/lang/String;
|
||||
public fun getType (I)Lcom/facebook/react/common/mapbuffer/MapBuffer$DataType;
|
||||
public fun iterator ()Ljava/util/Iterator;
|
||||
public final fun put (ID)Lcom/facebook/react/common/mapbuffer/WritableMapBuffer;
|
||||
public final fun put (II)Lcom/facebook/react/common/mapbuffer/WritableMapBuffer;
|
||||
public final fun put (IJ)Lcom/facebook/react/common/mapbuffer/WritableMapBuffer;
|
||||
public final fun put (ILcom/facebook/react/common/mapbuffer/MapBuffer;)Lcom/facebook/react/common/mapbuffer/WritableMapBuffer;
|
||||
public final fun put (ILjava/lang/String;)Lcom/facebook/react/common/mapbuffer/WritableMapBuffer;
|
||||
public final fun put (IZ)Lcom/facebook/react/common/mapbuffer/WritableMapBuffer;
|
||||
}
|
||||
|
||||
public final class com/facebook/react/config/ReactFeatureFlags {
|
||||
public static final field INSTANCE Lcom/facebook/react/config/ReactFeatureFlags;
|
||||
public static field dispatchPointerEvents Z
|
||||
|
||||
+7
-7
@@ -23,7 +23,7 @@ import javax.annotation.concurrent.NotThreadSafe
|
||||
@StableReactNativeAPI
|
||||
@NotThreadSafe
|
||||
@DoNotStrip
|
||||
public class WritableMapBuffer : MapBuffer {
|
||||
internal class WritableMapBuffer : MapBuffer {
|
||||
private val values: SparseArray<Any> = SparseArray<Any>()
|
||||
|
||||
/*
|
||||
@@ -37,7 +37,7 @@ public class WritableMapBuffer : MapBuffer {
|
||||
* @param value entry value
|
||||
* @throws IllegalArgumentException if key is out of [UShort] range
|
||||
*/
|
||||
public fun put(key: Int, value: Boolean): WritableMapBuffer = putInternal(key, value)
|
||||
fun put(key: Int, value: Boolean): WritableMapBuffer = putInternal(key, value)
|
||||
|
||||
/**
|
||||
* Adds an int value for given key to the MapBuffer.
|
||||
@@ -46,7 +46,7 @@ public class WritableMapBuffer : MapBuffer {
|
||||
* @param value entry value
|
||||
* @throws IllegalArgumentException if key is out of [UShort] range
|
||||
*/
|
||||
public fun put(key: Int, value: Int): WritableMapBuffer = putInternal(key, value)
|
||||
fun put(key: Int, value: Int): WritableMapBuffer = putInternal(key, value)
|
||||
|
||||
/**
|
||||
* Adds a long value for given key to the MapBuffer.
|
||||
@@ -55,7 +55,7 @@ public class WritableMapBuffer : MapBuffer {
|
||||
* @param value entry value
|
||||
* @throws IllegalArgumentException if key is out of [UShort] range
|
||||
*/
|
||||
public fun put(key: Int, value: Long): WritableMapBuffer = putInternal(key, value)
|
||||
fun put(key: Int, value: Long): WritableMapBuffer = putInternal(key, value)
|
||||
|
||||
/**
|
||||
* Adds a double value for given key to the MapBuffer.
|
||||
@@ -64,7 +64,7 @@ public class WritableMapBuffer : MapBuffer {
|
||||
* @param value entry value
|
||||
* @throws IllegalArgumentException if key is out of [UShort] range
|
||||
*/
|
||||
public fun put(key: Int, value: Double): WritableMapBuffer = putInternal(key, value)
|
||||
fun put(key: Int, value: Double): WritableMapBuffer = putInternal(key, value)
|
||||
|
||||
/**
|
||||
* Adds a string value for given key to the MapBuffer.
|
||||
@@ -73,7 +73,7 @@ public class WritableMapBuffer : MapBuffer {
|
||||
* @param value entry value
|
||||
* @throws IllegalArgumentException if key is out of [UShort] range
|
||||
*/
|
||||
public fun put(key: Int, value: String): WritableMapBuffer = putInternal(key, value)
|
||||
fun put(key: Int, value: String): WritableMapBuffer = putInternal(key, value)
|
||||
|
||||
/**
|
||||
* Adds a [MapBuffer] value for given key to the current MapBuffer.
|
||||
@@ -82,7 +82,7 @@ public class WritableMapBuffer : MapBuffer {
|
||||
* @param value entry value
|
||||
* @throws IllegalArgumentException if key is out of [UShort] range
|
||||
*/
|
||||
public fun put(key: Int, value: MapBuffer): WritableMapBuffer = putInternal(key, value)
|
||||
fun put(key: Int, value: MapBuffer): WritableMapBuffer = putInternal(key, value)
|
||||
|
||||
private fun putInternal(key: Int, value: Any): WritableMapBuffer {
|
||||
require(key in KEY_RANGE) {
|
||||
|
||||
Reference in New Issue
Block a user