Migrate YogaExperimentalFeature enum to Kotlin (#56797)

Summary:
X-link: https://github.com/facebook/yoga/pull/1946

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

Migrate YogaExperimentalFeature.java to YogaExperimentalFeature.kt by adding ExperimentalFeature to KOTLIN_ENUM_NAMES in enums.py and regenerating.

Reviewed By: fabriziocucci

Differential Revision: D104666330

fbshipit-source-id: 803d54b16697015b4ddf91d1c145179e9635b183
This commit is contained in:
Nicola Corti authored and meta-codesync[bot] committed 2026-05-12 07:48:48 -07:00
1 parent d695a5cff4
commit 70ebd43a1a
2 files changed
+27 -33

No files matched your search

@@ -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 YogaExperimentalFeature {
WEB_FLEX_BASIS(0),
FIX_FLEX_BASIS_FIT_CONTENT(1);
private final int mIntValue;
YogaExperimentalFeature(int intValue) {
mIntValue = intValue;
}
public int intValue() {
return mIntValue;
}
public static YogaExperimentalFeature fromInt(int value) {
switch (value) {
case 0: return WEB_FLEX_BASIS;
case 1: return FIX_FLEX_BASIS_FIT_CONTENT;
default: throw new IllegalArgumentException("Unknown enum value: " + value);
}
}
}
@@ -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 YogaExperimentalFeature(public val intValue: Int) {
WEB_FLEX_BASIS(0),
FIX_FLEX_BASIS_FIT_CONTENT(1);
public fun intValue(): Int = intValue
public companion object {
@JvmStatic
public fun fromInt(value: Int): YogaExperimentalFeature =
when (value) {
0 -> WEB_FLEX_BASIS
1 -> FIX_FLEX_BASIS_FIT_CONTENT
else -> throw IllegalArgumentException("Unknown enum value: $value")
}
}
}