Class ProtoCelValueConverter


  • @Immutable
    @Internal
    public final class ProtoCelValueConverter
    extends java.lang.Object
    CelValueConverter handles bidirectional conversion between native Java and protobuf objects to CelValue.

    Protobuf semantics take precedence for conversion. For example, CEL's TimestampValue will be converted into Protobuf's Timestamp instead of java.time.Instant.

    CEL Library Internals. Do Not Use.

    • Field Detail

      • celOptions

        protected final CelOptions celOptions
    • Method Detail

      • fromCelValueToJavaObject

        public java.lang.Object fromCelValueToJavaObject​(CelValue celValue)
        Adapts a CelValue to a native Java object. The CelValue is adapted into protobuf object when an equivalent exists.
      • fromJavaObjectToCelValue

        public CelValue fromJavaObjectToCelValue​(java.lang.Object value)
        Adapts a plain old Java Object to a CelValue. Protobuf semantics take precedence for conversion.
      • fromJavaPrimitiveToCelValue

        protected CelValue fromJavaPrimitiveToCelValue​(java.lang.Object value)
        Adapts a plain old Java Object that are considered primitives to a CelValue.