Class DefaultInstanceMessageLiteFactory


  • @Internal
    public final class DefaultInstanceMessageLiteFactory
    extends java.lang.Object
    Singleton 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 DefaultInstanceMessageLiteFactory getInstance()
      Gets a single instance of this DefaultInstanceMessageLiteFactory
      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.
      • Methods inherited from class java.lang.Object

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

      • 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.