Package dev.cel.common.ast
Class CelConstant
- java.lang.Object
-
- dev.cel.common.ast.CelConstant
-
@Internal @Immutable public abstract class CelConstant extends java.lang.Object
Represents a primitive literal.This is the CEL-Java native type equivalent of Constant message type from syntax.proto.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCelConstant.KindRepresents the type of the Constant
-
Constructor Summary
Constructors Constructor Description CelConstant()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract booleanbooleanValue()abstract ByteStringbytesValue()abstract doubledoubleValue()abstract DurationdurationValue()Deprecated.Do not use.abstract CelConstant.KindgetKind()abstract longint64Value()abstract NullValuenullValue()static CelConstantofValue(boolean value)static CelConstantofValue(double value)static CelConstantofValue(long value)static CelConstantofValue(com.google.common.primitives.UnsignedLong value)static CelConstantofValue(ByteString value)static CelConstantofValue(Duration value)Deprecated.Do not use.static CelConstantofValue(NullValue value)static CelConstantofValue(Timestamp value)Deprecated.Do not use.static CelConstantofValue(java.lang.String value)abstract java.lang.StringstringValue()abstract TimestamptimestampValue()Deprecated.Do not use.abstract com.google.common.primitives.UnsignedLonguint64Value()
-
-
-
Method Detail
-
getKind
public abstract CelConstant.Kind getKind()
-
nullValue
public abstract NullValue nullValue()
-
booleanValue
public abstract boolean booleanValue()
-
int64Value
public abstract long int64Value()
-
uint64Value
public abstract com.google.common.primitives.UnsignedLong uint64Value()
-
doubleValue
public abstract double doubleValue()
-
stringValue
public abstract java.lang.String stringValue()
-
bytesValue
public abstract ByteString bytesValue()
-
timestampValue
@Deprecated public abstract Timestamp timestampValue()
Deprecated.Do not use. Timestamp is no longer built-in CEL type.
-
durationValue
@Deprecated public abstract Duration durationValue()
Deprecated.Do not use. Duration is no longer built-in CEL type.
-
ofValue
public static CelConstant ofValue(NullValue value)
-
ofValue
public static CelConstant ofValue(boolean value)
-
ofValue
public static CelConstant ofValue(long value)
-
ofValue
public static CelConstant ofValue(com.google.common.primitives.UnsignedLong value)
-
ofValue
public static CelConstant ofValue(double value)
-
ofValue
public static CelConstant ofValue(java.lang.String value)
-
ofValue
public static CelConstant ofValue(ByteString value)
-
ofValue
@Deprecated public static CelConstant ofValue(Duration value)
Deprecated.Do not use. Duration is no longer built-in CEL type.
-
ofValue
@Deprecated public static CelConstant ofValue(Timestamp value)
Deprecated.Do not use. Timestamp is no longer built-in CEL type.
-
-