Interface MessageParser

All Known Subinterfaces:
MessageParserSingle

public interface MessageParser
The interface for creating message protobuf functions.
  • Method Details

    • builtin

      static List<MessageParser> builtin()
      The built-in message parsers.
      message type function type
      Timestamp Instant
      Duration Duration
      BoolValue boolean
      Int32Value int
      UInt32Value int
      Int64Value long
      UInt64Value long
      FloatValue float
      DoubleValue double
      StringValue String
      BytesValue byte[] (or ByteString, see FieldOptions.bytes())
      Any Any
      FieldMask FieldMask
      Returns:
      the built-in parsers
    • serviceLoaders

      static Iterable<MessageParser> serviceLoaders()
      Equivalent to ServiceLoader.load(MessageParser.class).
      Returns:
      the service-loader message parsers
      See Also:
    • defaults

      static List<MessageParser> defaults()
      The default single-valued message parsers. Is the concatenation of builtin() and serviceLoaders().
      Returns:
      the default message parsers
    • canonicalDescriptor

      com.google.protobuf.Descriptors.Descriptor canonicalDescriptor()
      The canonical descriptor for the message.
      Returns:
      the descriptor
    • messageParsers

      ProtobufFunctions messageParsers(com.google.protobuf.Descriptors.Descriptor descriptor, ProtobufDescriptorParserOptions options, FieldPath fieldPath)
      The protobuf functions.
      Parameters:
      descriptor - the actual descriptor
      options - the parser options
      fieldPath - the field path
      Returns:
      the protobuf functions