Skip to content

Commit

Permalink
Migrate *NativeMap classes to Kotlin
Browse files Browse the repository at this point in the history
Summary:
# 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 292ebd8 commit ff719eb
Show file tree
Hide file tree
Showing 7 changed files with 327 additions and 412 deletions.
9 changes: 7 additions & 2 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,7 @@ public final class com/facebook/react/bridge/ReadableNativeArray$Companion {
}

public class com/facebook/react/bridge/ReadableNativeMap : com/facebook/react/bridge/NativeMap, com/facebook/react/bridge/ReadableMap {
public static final field Companion Lcom/facebook/react/bridge/ReadableNativeMap$Companion;
protected fun <init> (Lcom/facebook/jni/HybridData;)V
public fun equals (Ljava/lang/Object;)Z
public fun getArray (Ljava/lang/String;)Lcom/facebook/react/bridge/ReadableArray;
Expand All @@ -1420,7 +1421,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 All @@ -1433,6 +1434,10 @@ public class com/facebook/react/bridge/ReadableNativeMap : com/facebook/react/br
public fun toHashMap ()Ljava/util/HashMap;
}

public final class com/facebook/react/bridge/ReadableNativeMap$Companion {
public final fun getJNIPassCounter ()I
}

public final class com/facebook/react/bridge/ReadableType : java/lang/Enum {
public static final field Array Lcom/facebook/react/bridge/ReadableType;
public static final field Boolean Lcom/facebook/react/bridge/ReadableType;
Expand Down Expand Up @@ -1548,7 +1553,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 ff719eb

Please sign in to comment.