Package dev.cel.common.internal
Class ProtoMessageFactory.CombinedMessageFactory
- java.lang.Object
-
- dev.cel.common.internal.ProtoMessageFactory.CombinedMessageFactory
-
- All Implemented Interfaces:
ProtoMessageFactory
- Enclosing interface:
- ProtoMessageFactory
@Immutable public static final class ProtoMessageFactory.CombinedMessageFactory extends java.lang.Object implements ProtoMessageFactory
TheProtoMessageFactory.CombinedMessageFactorytakes one or moreProtoMessageFactoryinstances and attempts to create aMessage.Builderinstance for a given message name by calling each message factory in the order that they are provided to the constructor.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface dev.cel.common.internal.ProtoMessageFactory
ProtoMessageFactory.CombinedMessageFactory
-
-
Constructor Summary
Constructors Constructor Description CombinedMessageFactory(java.lang.Iterable<ProtoMessageFactory> messageFactories)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<Message.Builder>newBuilder(java.lang.String messageName)Constructs a newMessage.Builderfor a fully qualified proto message type.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface dev.cel.common.internal.ProtoMessageFactory
getDescriptorPool
-
-
-
-
Constructor Detail
-
CombinedMessageFactory
public CombinedMessageFactory(java.lang.Iterable<ProtoMessageFactory> messageFactories)
-
-
Method Detail
-
newBuilder
public java.util.Optional<Message.Builder> newBuilder(java.lang.String messageName)
Description copied from interface:ProtoMessageFactoryConstructs a newMessage.Builderfor a fully qualified proto message type. An empty result is returned if a descriptor is missing for the message type name.- Specified by:
newBuilderin interfaceProtoMessageFactory
-
-