Package dev.cel.common.internal
Interface ProtoMessageFactory
-
- All Known Implementing Classes:
DefaultMessageFactory
,ProtoMessageFactory.CombinedMessageFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@Immutable @FunctionalInterface public interface ProtoMessageFactory
ProtoMessageFactory
provides a method to create a protobuf builder objects by name.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ProtoMessageFactory.CombinedMessageFactory
TheProtoMessageFactory.CombinedMessageFactory
takes one or moreProtoMessageFactory
instances and attempts to create aMessage.Builder
instance for a given message name by calling each message factory in the order that they are provided to the constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default CelDescriptorPool
getDescriptorPool()
Gets the underlying descriptor pool used to construct proto messages.java.util.Optional<com.google.protobuf.Message.Builder>
newBuilder(java.lang.String messageName)
Constructs a newMessage.Builder
for a fully qualified proto message type.
-
-
-
Method Detail
-
newBuilder
java.util.Optional<com.google.protobuf.Message.Builder> newBuilder(java.lang.String messageName)
Constructs a newMessage.Builder
for a fully qualified proto message type. An empty result is returned if a descriptor is missing for the message type name.
-
getDescriptorPool
default CelDescriptorPool getDescriptorPool()
Gets the underlying descriptor pool used to construct proto messages.
-
-