Migrate ErrorType.java to Kotlin (#43727)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43727

# Changelog:
[Internal] -

As in the title, converts this one particular Java file to Kotlin.

Reviewed By: arushikesarwani94

Differential Revision: D55574526

fbshipit-source-id: 04af5b870670a5560eaba7ab8c029c580032d09a
This commit is contained in:
Ruslan Shestopalyuk
2024-04-01 12:37:48 -07:00
committed by Facebook GitHub Bot
parent 489d9f6c62
commit 1e44cbe9f4
3 changed files with 17 additions and 27 deletions
@@ -2421,7 +2421,8 @@ public abstract interface class com/facebook/react/devsupport/interfaces/ErrorCu
public final class com/facebook/react/devsupport/interfaces/ErrorType : java/lang/Enum {
public static final field JS Lcom/facebook/react/devsupport/interfaces/ErrorType;
public static final field NATIVE Lcom/facebook/react/devsupport/interfaces/ErrorType;
public fun getName ()Ljava/lang/String;
public final fun getDisplayName ()Ljava/lang/String;
public fun toString ()Ljava/lang/String;
public static fun valueOf (Ljava/lang/String;)Lcom/facebook/react/devsupport/interfaces/ErrorType;
public static fun values ()[Lcom/facebook/react/devsupport/interfaces/ErrorType;
}
@@ -1,26 +0,0 @@
/*
* 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.devsupport.interfaces;
import com.facebook.infer.annotation.Nullsafe;
@Nullsafe(Nullsafe.Mode.LOCAL)
public enum ErrorType {
JS("JS"),
NATIVE("Native");
private final String name;
ErrorType(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
@@ -0,0 +1,15 @@
/*
* 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.devsupport.interfaces
public enum class ErrorType(public val displayName: String) {
JS("JS"),
NATIVE("Native");
override fun toString(): String = displayName
}