Skip to content

Commit

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

# Changelog:
[Internal] -

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

Differential Revision: D57329244
  • Loading branch information
rshest authored and facebook-github-bot committed May 15, 2024
1 parent 7408992 commit bcd30c1
Show file tree
Hide file tree
Showing 7 changed files with 308 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 @@ -1411,7 +1411,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 @@ -1539,7 +1539,7 @@ public final class com/facebook/react/bridge/WritableNativeArray : com/facebook/
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.

Loading

0 comments on commit bcd30c1

Please sign in to comment.