GeneratedMessage

nscn.polaris2.protoc.runtime.GeneratedMessage

Base trait of every generated message.

Serialization is the generated code's own specialized loop over protobuf-java's CodedOutputStream; this trait only adds the conveniences that do not depend on the message's shape. Reflective access goes through getFieldByNumber, which returns base values - the proto-level type, with any TypeMapper already undone - so the generic machinery in DynamicMessages never has to know about custom types.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def getFieldByNumber(fieldNumber: Int): Any

The base-typed value of one field, or null when the number is not a field of this message.

The base-typed value of one field, or null when the number is not a field of this message.

Shapes, mirroring the generated constructor: Option[T] for a field with explicit presence, Vector[T] for a repeated field, Map[K, V] for a map field, and the bare value for a field with implicit presence. A oneof member reads as Some only while that case is the active one.

Attributes

def serializedSize: Int

Size in bytes of this message's wire encoding, unknown fields included.

Size in bytes of this message's wire encoding, unknown fields included.

Attributes

def unknownFields: UnknownFieldSet

Fields this message was parsed with but does not know, preserved for re-emission.

Fields this message was parsed with but does not know, preserved for re-emission.

Attributes

def writeTo(output: CodedOutputStream): Unit

Concrete methods

final def getField(field: FieldDescriptor): Any
final def toByteArray: Array[Byte]
final def toByteString: ByteString
final def toProtoString: String

protobuf text format, by way of a DynamicMessage built from this message.

protobuf text format, by way of a DynamicMessage built from this message.

Attributes

final def writeDelimitedTo(output: OutputStream): Unit

Writes a varint length followed by the message, the framing used to put several messages in one stream.

Writes a varint length followed by the message, the framing used to put several messages in one stream.

Attributes

final def writeTo(output: OutputStream): Unit