Skip to content

Commit

Permalink
Migrate *NativeMap classes to Kotlin (#44581)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #44581

# Changelog:
[Internal] -

This converts the vertical of NativeArray/ReadableNativeArray/WritableNativeArray classes to Kotlin.

Reviewed By: javache

Differential Revision: D57329244

fbshipit-source-id: 8c6b8138801c6e07c21da65a2dbf1dcb7e0f2183
  • Loading branch information
rshest authored and facebook-github-bot committed May 16, 2024
1 parent 44bac48 commit 6b2e5df
Show file tree
Hide file tree
Showing 7 changed files with 285 additions and 412 deletions.
4 changes: 2 additions & 2 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,7 @@ public class com/facebook/react/bridge/ReadableNativeMap : com/facebook/react/br
public fun getDynamic (Ljava/lang/String;)Lcom/facebook/react/bridge/Dynamic;
public fun getEntryIterator ()Ljava/util/Iterator;
public fun getInt (Ljava/lang/String;)I
public static fun getJNIPassCounter ()I
public static final fun getJNIPassCounter ()I
public fun getLong (Ljava/lang/String;)J
public synthetic fun getMap (Ljava/lang/String;)Lcom/facebook/react/bridge/ReadableMap;
public fun getMap (Ljava/lang/String;)Lcom/facebook/react/bridge/ReadableNativeMap;
Expand Down Expand Up @@ -1542,7 +1542,7 @@ public class com/facebook/react/bridge/WritableNativeArray : com/facebook/react/
public fun pushString (Ljava/lang/String;)V
}

public class com/facebook/react/bridge/WritableNativeMap : com/facebook/react/bridge/ReadableNativeMap, com/facebook/react/bridge/WritableMap {
public final class com/facebook/react/bridge/WritableNativeMap : com/facebook/react/bridge/ReadableNativeMap, com/facebook/react/bridge/WritableMap {
public fun <init> ()V
public fun copy ()Lcom/facebook/react/bridge/WritableMap;
public fun merge (Lcom/facebook/react/bridge/ReadableMap;)V
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* 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.bridge

import com.facebook.jni.HybridData
import com.facebook.proguard.annotations.DoNotStrip

/** Base class for a Map whose keys and values are stored in native code (C++). */
@DoNotStrip
public abstract class NativeMap(@field:DoNotStrip private val mHybridData: HybridData?) {
external override fun toString(): String

private companion object {
init {
ReactBridge.staticInit()
}
}
}

This file was deleted.

0 comments on commit 6b2e5df

Please sign in to comment.