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 SummaryNested Classes Modifier and Type Class Description static classCelConstant.CelConstantNotSetAn unset constant.static classCelConstant.KindRepresents the type of the Constant
 - 
Constructor SummaryConstructors Constructor Description CelConstant()
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract booleanbooleanValue()abstract com.google.protobuf.ByteStringbytesValue()abstract doubledoubleValue()abstract com.google.protobuf.DurationdurationValue()Deprecated.Do not use.abstract CelConstant.KindgetKind()abstract longint64Value()static booleanisConstantValue(java.lang.Object value)Checks whether the provided Java object is a valid CelConstant value.abstract CelConstant.CelConstantNotSetnotSet()abstract com.google.protobuf.NullValuenullValue()static CelConstantofNotSet()static CelConstantofObjectValue(java.lang.Object value)Converts the given Java object into a CelConstant value.static CelConstantofValue(boolean value)static CelConstantofValue(double value)static CelConstantofValue(long value)static CelConstantofValue(com.google.common.primitives.UnsignedLong value)static CelConstantofValue(com.google.protobuf.ByteString value)static CelConstantofValue(com.google.protobuf.Duration value)Deprecated.Do not use.static CelConstantofValue(com.google.protobuf.NullValue value)static CelConstantofValue(com.google.protobuf.Timestamp value)Deprecated.Do not use.static CelConstantofValue(java.lang.String value)abstract java.lang.StringstringValue()abstract com.google.protobuf.TimestamptimestampValue()Deprecated.Do not use.abstract com.google.common.primitives.UnsignedLonguint64Value()
 
- 
- 
- 
Method Detail- 
getKindpublic abstract CelConstant.Kind getKind() 
 - 
notSetpublic abstract CelConstant.CelConstantNotSet notSet() 
 - 
nullValuepublic abstract com.google.protobuf.NullValue nullValue() 
 - 
booleanValuepublic abstract boolean booleanValue() 
 - 
int64Valuepublic abstract long int64Value() 
 - 
uint64Valuepublic abstract com.google.common.primitives.UnsignedLong uint64Value() 
 - 
doubleValuepublic abstract double doubleValue() 
 - 
stringValuepublic abstract java.lang.String stringValue() 
 - 
bytesValuepublic abstract com.google.protobuf.ByteString bytesValue() 
 - 
timestampValue@Deprecated public abstract com.google.protobuf.Timestamp timestampValue() Deprecated.Do not use. Timestamp is no longer built-in CEL type.
 - 
durationValue@Deprecated public abstract com.google.protobuf.Duration durationValue() Deprecated.Do not use. Duration is no longer built-in CEL type.
 - 
ofNotSetpublic static CelConstant ofNotSet() 
 - 
ofValuepublic static CelConstant ofValue(com.google.protobuf.NullValue value) 
 - 
ofValuepublic static CelConstant ofValue(boolean value) 
 - 
ofValuepublic static CelConstant ofValue(long value) 
 - 
ofValuepublic static CelConstant ofValue(com.google.common.primitives.UnsignedLong value) 
 - 
ofValuepublic static CelConstant ofValue(double value) 
 - 
ofValuepublic static CelConstant ofValue(java.lang.String value) 
 - 
ofValuepublic static CelConstant ofValue(com.google.protobuf.ByteString value) 
 - 
isConstantValuepublic static boolean isConstantValue(java.lang.Object value) Checks whether the provided Java object is a valid CelConstant value.
 - 
ofObjectValuepublic static CelConstant ofObjectValue(java.lang.Object value) Converts the given Java object into a CelConstant value. This is equivalent of callingofValue(com.google.protobuf.NullValue)with concrete types.- Throws:
- java.lang.IllegalArgumentException- If the value is not a supported CelConstant. This includes the deprecated duration and timestamp values.
 
 - 
ofValue@Deprecated public static CelConstant ofValue(com.google.protobuf.Duration value) Deprecated.Do not use. Duration is no longer built-in CEL type.
 - 
ofValue@Deprecated public static CelConstant ofValue(com.google.protobuf.Timestamp value) Deprecated.Do not use. Timestamp is no longer built-in CEL type.
 
- 
 
-