Package dev.cel.runtime
Class DynamicMessageFactory
- java.lang.Object
-
- dev.cel.runtime.DynamicMessageFactory
-
- All Implemented Interfaces:
MessageFactory
@Immutable @Deprecated public final class DynamicMessageFactory extends java.lang.Object implements MessageFactory
Deprecated.Do not use. CEL-Java users should leverage the Fluent APIs instead. SeeCelRuntimeFactory.TheDynamicMessageFactorycreatesDynamicMessageinstances by protobuf name.Creating message with
DynamicMessageis significantly slower than instantiating messages directly as it uses Java reflection.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface dev.cel.runtime.MessageFactory
MessageFactory.CombinedMessageFactory
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description @Nullable Message.BuildernewBuilder(java.lang.String messageName)Deprecated.Create aMessage.Builderinstance for the protobuf bymessageName.ProtoMessageFactorytoProtoMessageFactory()Deprecated.Exists only to maintain FunctionalInterface requirement and to make legacy Dynamic/Linked message factories compatible with the new ProtoMessageFactory.static MessageFactorytypeFactory(java.util.Collection<Descriptors.Descriptor> descriptors)Deprecated.Use CEL Fluent APIs instead.static RuntimeTypeProvidertypeProvider(java.util.Collection<Descriptors.Descriptor> descriptors)Deprecated.Use CEL Fluent APIs instead.
-
-
-
Method Detail
-
typeProvider
@Deprecated public static RuntimeTypeProvider typeProvider(java.util.Collection<Descriptors.Descriptor> descriptors)
Deprecated.Use CEL Fluent APIs instead. Directly instantiating DynamicMessageFactory's RuntimeTypeProvider is no longer needed.Create aRuntimeTypeProviderwhich can access only the types listed in the inputdescriptorsusing theCelOptions.LEGACYsettings.
-
typeFactory
@Deprecated public static MessageFactory typeFactory(java.util.Collection<Descriptors.Descriptor> descriptors)
Deprecated.Use CEL Fluent APIs instead. Directly instantiating DynamicMessageFactory is no longer needed.Create aMessageFactorywhich can produce any protobuf type in the generated descriptor pool or in the inputdescriptors.
-
toProtoMessageFactory
public ProtoMessageFactory toProtoMessageFactory()
Deprecated.Description copied from interface:MessageFactoryExists only to maintain FunctionalInterface requirement and to make legacy Dynamic/Linked message factories compatible with the new ProtoMessageFactory.- Specified by:
toProtoMessageFactoryin interfaceMessageFactory
-
newBuilder
public @Nullable Message.Builder newBuilder(java.lang.String messageName)
Deprecated.Description copied from interface:MessageFactoryCreate aMessage.Builderinstance for the protobuf bymessageName.Returns
nullif the builder could not be created.- Specified by:
newBuilderin interfaceMessageFactory
-
-