Class DescriptorTypeResolver


  • @Immutable
    @Internal
    public final class DescriptorTypeResolver
    extends TypeResolver
    DescriptorTypeResolver extends TypeResolver and additionally resolves incoming protobuf message types using descriptors.

    CEL Library Internals. Do Not Use.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static DescriptorTypeResolver create()
      Creates a DescriptorTypeResolver.
      static DescriptorTypeResolver create​(dev.cel.common.types.CelTypeProvider typeProvider)
      Creates a DescriptorTypeResolver.
      dev.cel.common.types.TypeType resolveObjectType​(java.lang.Object obj, dev.cel.common.types.CelType typeCheckedType)
      Resolve the CEL type of the obj.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

        public static DescriptorTypeResolver create()
        Creates a DescriptorTypeResolver. All protobuf messages are resolved as a type of StructTypeReference.
      • create

        public static DescriptorTypeResolver create​(dev.cel.common.types.CelTypeProvider typeProvider)
        Creates a DescriptorTypeResolver. If the protobuf message to be resolved can be found in the provided CelTypeProvider, the message is resolved as a concrete ProtoMessageType instead of a StructTypeReference.
      • resolveObjectType

        public dev.cel.common.types.TypeType resolveObjectType​(java.lang.Object obj,
                                                               dev.cel.common.types.CelType typeCheckedType)
        Description copied from class: TypeResolver
        Resolve the CEL type of the obj.
        Overrides:
        resolveObjectType in class TypeResolver