Class CelTypes


  • public final class CelTypes
    extends java.lang.Object
    Utility class for working with CelType.
    • Field Detail

      • DURATION_MESSAGE

        public static final java.lang.String DURATION_MESSAGE
        See Also:
        Constant Field Values
      • LIST_VALUE_MESSAGE

        public static final java.lang.String LIST_VALUE_MESSAGE
        See Also:
        Constant Field Values
      • TIMESTAMP_MESSAGE

        public static final java.lang.String TIMESTAMP_MESSAGE
        See Also:
        Constant Field Values
      • BOOL_WRAPPER_MESSAGE

        public static final java.lang.String BOOL_WRAPPER_MESSAGE
        See Also:
        Constant Field Values
      • BYTES_WRAPPER_MESSAGE

        public static final java.lang.String BYTES_WRAPPER_MESSAGE
        See Also:
        Constant Field Values
      • DOUBLE_WRAPPER_MESSAGE

        public static final java.lang.String DOUBLE_WRAPPER_MESSAGE
        See Also:
        Constant Field Values
      • FLOAT_WRAPPER_MESSAGE

        public static final java.lang.String FLOAT_WRAPPER_MESSAGE
        See Also:
        Constant Field Values
      • INT32_WRAPPER_MESSAGE

        public static final java.lang.String INT32_WRAPPER_MESSAGE
        See Also:
        Constant Field Values
      • INT64_WRAPPER_MESSAGE

        public static final java.lang.String INT64_WRAPPER_MESSAGE
        See Also:
        Constant Field Values
      • STRING_WRAPPER_MESSAGE

        public static final java.lang.String STRING_WRAPPER_MESSAGE
        See Also:
        Constant Field Values
      • UINT32_WRAPPER_MESSAGE

        public static final java.lang.String UINT32_WRAPPER_MESSAGE
        See Also:
        Constant Field Values
      • UINT64_WRAPPER_MESSAGE

        public static final java.lang.String UINT64_WRAPPER_MESSAGE
        See Also:
        Constant Field Values
    • Method Detail

      • isWrapperType

        public static boolean isWrapperType​(java.lang.String typeName)
        Checks if the fully-qualified protobuf type name is a wrapper type.
      • createFunctionType

        @Internal
        public static OpaqueType createFunctionType​(CelType resultType,
                                                    java.lang.Iterable<CelType> argumentTypes)
        Create an abstract type with an expected result type (first argument in the parameter) and the argument types.

        CEL Library Internals. Do Not Use.

      • formatFunction

        public static java.lang.String formatFunction​(CelType resultType,
                                                      java.lang.Iterable<CelType> argTypes,
                                                      boolean isInstance,
                                                      boolean typeParamToDyn)
        Format a function signature string from the input argTypes and resultType.

        When isInstance is true, the argTypes[0] type is used as the receiver type.

        When resultType is null, the function signature omits the result type. This is useful for computing overload signatures.

        When typeParamToDyn is true, parameterized type argument are represented as Types.DYN values.

      • isWellKnownType

        public static boolean isWellKnownType​(java.lang.String typeName)
      • getWellKnownCelType

        public static java.util.Optional<CelType> getWellKnownCelType​(java.lang.String typeName)