diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeType.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeType.java deleted file mode 100644 index b8828014cf8..00000000000 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeType.java +++ /dev/null @@ -1,33 +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. - */ - -// @generated by enums.py - -package com.facebook.yoga; - -public enum YogaNodeType { - DEFAULT(0), - TEXT(1); - - private final int mIntValue; - - YogaNodeType(int intValue) { - mIntValue = intValue; - } - - public int intValue() { - return mIntValue; - } - - public static YogaNodeType fromInt(int value) { - switch (value) { - case 0: return DEFAULT; - case 1: return TEXT; - default: throw new IllegalArgumentException("Unknown enum value: " + value); - } - } -} diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeType.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeType.kt new file mode 100644 index 00000000000..a3f38adcdb1 --- /dev/null +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeType.kt @@ -0,0 +1,27 @@ +/* + * 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. + */ + +// @generated by enums.py + +package com.facebook.yoga + +public enum class YogaNodeType(public val intValue: Int) { + DEFAULT(0), + TEXT(1); + + public fun intValue(): Int = intValue + + public companion object { + @JvmStatic + public fun fromInt(value: Int): YogaNodeType = + when (value) { + 0 -> DEFAULT + 1 -> TEXT + else -> throw IllegalArgumentException("Unknown enum value: $value") + } + } +}