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 29fa2bc commit 60fa05b
Show file tree
Hide file tree
Showing 7 changed files with 289 additions and 546 deletions.
138 changes: 2 additions & 136 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 Expand Up @@ -5979,140 +5979,6 @@ public final class com/facebook/react/util/RNLog {
public static final fun w (Lcom/facebook/react/bridge/ReactContext;Ljava/lang/String;)V
}

public class com/facebook/react/viewmanagers/ActivityIndicatorViewManagerDelegate : com/facebook/react/uimanager/BaseViewManagerDelegate {
public fun <init> (Lcom/facebook/react/uimanager/BaseViewManagerInterface;)V
public fun setProperty (Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
}

public abstract interface class com/facebook/react/viewmanagers/ActivityIndicatorViewManagerInterface {
public abstract fun setAnimating (Landroid/view/View;Z)V
public abstract fun setColor (Landroid/view/View;Ljava/lang/Integer;)V
public abstract fun setHidesWhenStopped (Landroid/view/View;Z)V
public abstract fun setSize (Landroid/view/View;Ljava/lang/String;)V
}

public class com/facebook/react/viewmanagers/AndroidDrawerLayoutManagerDelegate : com/facebook/react/uimanager/BaseViewManagerDelegate {
public fun <init> (Lcom/facebook/react/uimanager/BaseViewManagerInterface;)V
public fun receiveCommand (Landroid/view/View;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
public fun setProperty (Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
}

public abstract interface class com/facebook/react/viewmanagers/AndroidDrawerLayoutManagerInterface {
public abstract fun closeDrawer (Landroid/view/View;)V
public abstract fun openDrawer (Landroid/view/View;)V
public abstract fun setDrawerBackgroundColor (Landroid/view/View;Ljava/lang/Integer;)V
public abstract fun setDrawerLockMode (Landroid/view/View;Ljava/lang/String;)V
public abstract fun setDrawerPosition (Landroid/view/View;Ljava/lang/String;)V
public abstract fun setDrawerWidth (Landroid/view/View;Ljava/lang/Float;)V
public abstract fun setKeyboardDismissMode (Landroid/view/View;Ljava/lang/String;)V
public abstract fun setStatusBarBackgroundColor (Landroid/view/View;Ljava/lang/Integer;)V
}

public class com/facebook/react/viewmanagers/AndroidHorizontalScrollContentViewManagerDelegate : com/facebook/react/uimanager/BaseViewManagerDelegate {
public fun <init> (Lcom/facebook/react/uimanager/BaseViewManagerInterface;)V
public fun setProperty (Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
}

public abstract interface class com/facebook/react/viewmanagers/AndroidHorizontalScrollContentViewManagerInterface {
public abstract fun setRemoveClippedSubviews (Landroid/view/View;Z)V
}

public class com/facebook/react/viewmanagers/AndroidProgressBarManagerDelegate : com/facebook/react/uimanager/BaseViewManagerDelegate {
public fun <init> (Lcom/facebook/react/uimanager/BaseViewManagerInterface;)V
public fun setProperty (Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
}

public abstract interface class com/facebook/react/viewmanagers/AndroidProgressBarManagerInterface {
public abstract fun setAnimating (Landroid/view/View;Z)V
public abstract fun setColor (Landroid/view/View;Ljava/lang/Integer;)V
public abstract fun setIndeterminate (Landroid/view/View;Z)V
public abstract fun setProgress (Landroid/view/View;D)V
public abstract fun setStyleAttr (Landroid/view/View;Ljava/lang/String;)V
public abstract fun setTestID (Landroid/view/View;Ljava/lang/String;)V
public abstract fun setTypeAttr (Landroid/view/View;Ljava/lang/String;)V
}

public class com/facebook/react/viewmanagers/AndroidSwipeRefreshLayoutManagerDelegate : com/facebook/react/uimanager/BaseViewManagerDelegate {
public fun <init> (Lcom/facebook/react/uimanager/BaseViewManagerInterface;)V
public fun receiveCommand (Landroid/view/View;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
public fun setProperty (Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
}

public abstract interface class com/facebook/react/viewmanagers/AndroidSwipeRefreshLayoutManagerInterface {
public abstract fun setColors (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
public abstract fun setEnabled (Landroid/view/View;Z)V
public abstract fun setNativeRefreshing (Landroid/view/View;Z)V
public abstract fun setProgressBackgroundColor (Landroid/view/View;Ljava/lang/Integer;)V
public abstract fun setProgressViewOffset (Landroid/view/View;F)V
public abstract fun setRefreshing (Landroid/view/View;Z)V
public abstract fun setSize (Landroid/view/View;Ljava/lang/String;)V
}

public class com/facebook/react/viewmanagers/AndroidSwitchManagerDelegate : com/facebook/react/uimanager/BaseViewManagerDelegate {
public fun <init> (Lcom/facebook/react/uimanager/BaseViewManagerInterface;)V
public fun receiveCommand (Landroid/view/View;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
public fun setProperty (Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
}

public abstract interface class com/facebook/react/viewmanagers/AndroidSwitchManagerInterface {
public abstract fun setDisabled (Landroid/view/View;Z)V
public abstract fun setEnabled (Landroid/view/View;Z)V
public abstract fun setNativeValue (Landroid/view/View;Z)V
public abstract fun setOn (Landroid/view/View;Z)V
public abstract fun setThumbColor (Landroid/view/View;Ljava/lang/Integer;)V
public abstract fun setThumbTintColor (Landroid/view/View;Ljava/lang/Integer;)V
public abstract fun setTrackColorForFalse (Landroid/view/View;Ljava/lang/Integer;)V
public abstract fun setTrackColorForTrue (Landroid/view/View;Ljava/lang/Integer;)V
public abstract fun setTrackTintColor (Landroid/view/View;Ljava/lang/Integer;)V
public abstract fun setValue (Landroid/view/View;Z)V
}

public class com/facebook/react/viewmanagers/DebuggingOverlayManagerDelegate : com/facebook/react/uimanager/BaseViewManagerDelegate {
public fun <init> (Lcom/facebook/react/uimanager/BaseViewManagerInterface;)V
public fun receiveCommand (Landroid/view/View;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
public fun setProperty (Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
}

public abstract interface class com/facebook/react/viewmanagers/DebuggingOverlayManagerInterface {
public abstract fun clearElementsHighlights (Landroid/view/View;)V
public abstract fun highlightElements (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
public abstract fun highlightTraceUpdates (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
}

public class com/facebook/react/viewmanagers/ModalHostViewManagerDelegate : com/facebook/react/uimanager/BaseViewManagerDelegate {
public fun <init> (Lcom/facebook/react/uimanager/BaseViewManagerInterface;)V
public fun setProperty (Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
}

public abstract interface class com/facebook/react/viewmanagers/ModalHostViewManagerInterface {
public abstract fun setAnimated (Landroid/view/View;Z)V
public abstract fun setAnimationType (Landroid/view/View;Ljava/lang/String;)V
public abstract fun setHardwareAccelerated (Landroid/view/View;Z)V
public abstract fun setIdentifier (Landroid/view/View;I)V
public abstract fun setPresentationStyle (Landroid/view/View;Ljava/lang/String;)V
public abstract fun setStatusBarTranslucent (Landroid/view/View;Z)V
public abstract fun setSupportedOrientations (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
public abstract fun setTransparent (Landroid/view/View;Z)V
public abstract fun setVisible (Landroid/view/View;Z)V
}

public class com/facebook/react/viewmanagers/SafeAreaViewManagerDelegate : com/facebook/react/uimanager/BaseViewManagerDelegate {
public fun <init> (Lcom/facebook/react/uimanager/BaseViewManagerInterface;)V
public fun setProperty (Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
}

public abstract interface class com/facebook/react/viewmanagers/SafeAreaViewManagerInterface {
}

public class com/facebook/react/viewmanagers/UnimplementedNativeViewManagerDelegate : com/facebook/react/uimanager/BaseViewManagerDelegate {
public fun <init> (Lcom/facebook/react/uimanager/BaseViewManagerInterface;)V
public fun setProperty (Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
}

public abstract interface class com/facebook/react/viewmanagers/UnimplementedNativeViewManagerInterface {
public abstract fun setName (Landroid/view/View;Ljava/lang/String;)V
}

public final class com/facebook/react/views/common/ContextUtils {
public static final field INSTANCE Lcom/facebook/react/views/common/ContextUtils;
public static final fun findContextOfType (Landroid/content/Context;Ljava/lang/Class;)Ljava/lang/Object;
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()
}
}
}
Loading

0 comments on commit 60fa05b

Please sign in to comment.