Enum Class CelExecutor.UnsignedFieldType
java.lang.Object
java.lang.Enum<CelExecutor.UnsignedFieldType>
io.confluent.kafka.schemaregistry.rules.cel.CelExecutor.UnsignedFieldType
- All Implemented Interfaces:
Serializable,Comparable<CelExecutor.UnsignedFieldType>,Constable
- Enclosing class:
- CelExecutor
How a protobuf unsigned integer field is presented to CEL by
CelFieldExecutor,
selected by CelExecutor.CEL_UNSIGNED_FIELD_TYPE.
INT— the field binds as a signed CELintcarrying theLongorIntegerprotobuf reflection hands back. A rule written with a plain integer literal (value == 25) compiles and one written against the field's declared type (value == 25u) does not, and a value aboveLong.MAX_VALUEcompares as negative. This is what domain rules shipped with, so it stays the default.UINT— the field binds as a CELuintcarrying anUnsignedLong. That is what protobuf's own type says, what the Go and Python clients and protovalidate-java do, and whatCelValidatordoes unconditionally for inline validation rules. Unsigned literals work and large values compare correctly; equality and arithmetic against a plain integer literal stop type-checking, because CEL declares no mixeduint/intoverloads for them. Ordering keeps working either way, through heterogeneous numeric comparisons.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CelExecutor.UnsignedFieldTypeThe mode when none is declared. -
Method Summary
Modifier and TypeMethodDescriptionfromString(String s) Returns the enum constant of this class with the specified name.static CelExecutor.UnsignedFieldType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INT
-
UINT
-
-
Field Details
-
DEFAULT
The mode when none is declared. Unsigned fields stay signed, as they always have.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
fromString
-