Package dev.cel.common.internal
Class DefaultInstanceMessageLiteFactory
- java.lang.Object
-
- dev.cel.common.internal.DefaultInstanceMessageLiteFactory
-
@Internal public final class DefaultInstanceMessageLiteFactory extends java.lang.ObjectSingleton factory for creating default messages from a fully qualified protobuf type name and its java class name.CEL Library Internals. Do Not Use.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultInstanceMessageLiteFactorygetInstance()Gets a single instance of this DefaultInstanceMessageLiteFactoryjava.util.Optional<com.google.protobuf.MessageLite>getPrototype(java.lang.String protoFqn, java.lang.String protoJavaClassFqn)Creates a default instance of a protobuf message given a fully qualified type name.
-
-
-
Method Detail
-
getInstance
public static DefaultInstanceMessageLiteFactory getInstance()
Gets a single instance of this DefaultInstanceMessageLiteFactory
-
getPrototype
public java.util.Optional<com.google.protobuf.MessageLite> getPrototype(java.lang.String protoFqn, java.lang.String protoJavaClassFqn)Creates a default instance of a protobuf message given a fully qualified type name. This is essentially the same as calling FooMessage.getDefaultInstance(), except reflection is leveraged.- Returns:
- Default instance of a type. Returns an empty optional if the java class for the protobuf message isn't linked in the binary.
-
-