Package dev.cel.common.values
Class StructValue<T extends CelValue>
- java.lang.Object
-
- dev.cel.common.values.CelValue
-
- dev.cel.common.values.StructValue<T>
-
- All Implemented Interfaces:
SelectableValue<T>
@Immutable public abstract class StructValue<T extends CelValue> extends CelValue implements SelectableValue<T>
StructValue is a representation of a structured object with typed properties.Users may extend from this class to provide a custom struct that CEL can understand (ex: POJOs). Custom struct implementations must provide all functionalities denoted in the CEL specification, such as field selection, presence testing and new object creation.
For an expression `e` selecting a field `f`, `e.f` must throw an exception if `f` does not exist in the struct (i.e: hasField returns false). If the field exists but is not set, the implementation should return an appropriate default value based on the struct's semantics.
-
-
Constructor Summary
Constructors Constructor Description StructValue()
-
Method Summary
-
Methods inherited from class dev.cel.common.values.CelValue
celType, isZeroValue, value
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface dev.cel.common.values.SelectableValue
find, select
-
-