mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
489d9f6c62
commit
1e44cbe9f4
@@ -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;
|
||||
}
|
||||
|
||||
-26
@@ -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;
|
||||
}
|
||||
}
|
||||
+15
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user