diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaWrap.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaWrap.java deleted file mode 100644 index cf87e9ef5ec..00000000000 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaWrap.java +++ /dev/null @@ -1,35 +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 YogaWrap { - NO_WRAP(0), - WRAP(1), - WRAP_REVERSE(2); - - private final int mIntValue; - - YogaWrap(int intValue) { - mIntValue = intValue; - } - - public int intValue() { - return mIntValue; - } - - public static YogaWrap fromInt(int value) { - switch (value) { - case 0: return NO_WRAP; - case 1: return WRAP; - case 2: return WRAP_REVERSE; - default: throw new IllegalArgumentException("Unknown enum value: " + value); - } - } -} diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaWrap.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaWrap.kt new file mode 100644 index 00000000000..31e20f2aec1 --- /dev/null +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaWrap.kt @@ -0,0 +1,29 @@ +/* + * 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 YogaWrap(public val intValue: Int) { + NO_WRAP(0), + WRAP(1), + WRAP_REVERSE(2); + + public fun intValue(): Int = intValue + + public companion object { + @JvmStatic + public fun fromInt(value: Int): YogaWrap = + when (value) { + 0 -> NO_WRAP + 1 -> WRAP + 2 -> WRAP_REVERSE + else -> throw IllegalArgumentException("Unknown enum value: $value") + } + } +}