Kotlinify NativeKind (#43775)

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

Changelog: [Internal]

As part of the Sustainability Week (see [post](https://fb.workplace.com/groups/251759413609061/permalink/742797531171911/)).

Reviewed By: cortinico

Differential Revision: D55640039

fbshipit-source-id: 5e8f395db0b7010e9a8b225a472db3bb46459d00
This commit is contained in:
Fabrizio Cucci
2024-04-03 02:43:36 -07:00
committed by Facebook GitHub Bot
parent de617d03e1
commit 7df9dbbccf
@@ -5,16 +5,13 @@
* LICENSE file in the root directory of this source tree.
*/
package com.facebook.react.uimanager;
import com.facebook.infer.annotation.Nullsafe;
package com.facebook.react.uimanager
// Common conditionals:
// - `kind == PARENT` checks whether the node can host children in the native tree.
// - `kind != NONE` checks whether the node appears in the native tree.
@Nullsafe(Nullsafe.Mode.LOCAL)
public enum NativeKind {
public enum class NativeKind {
// Node is in the native hierarchy and the HierarchyOptimizer should assume it can host children
// (e.g. because it's a ViewGroup). Note that it's okay if the node doesn't support children. When
// the HierarchyOptimizer generates children manipulation commands for that node, the
@@ -24,5 +21,5 @@ public enum NativeKind {
// because it isn't a ViewGroup). Consequently, its children need to be hosted by an ancestor.
LEAF,
// Node is not in the native hierarchy.
NONE
NONE,
}