MessageGenerator class

Inheritance

Constructors

MessageGenerator.nested(DescriptorProto descriptor, ProtobufContainer parent, Map<String, PbMixin> declaredMixins, PbMixin? defaultMixin, Set<String> usedNames, int repeatedFieldIndex)
MessageGenerator.topLevel(DescriptorProto descriptor, ProtobufContainer parent, Map<String, PbMixin> declaredMixins, PbMixin? defaultMixin, Set<String> usedNames, int repeatedFieldIndex)

Properties

binaryDescriptorName → String
no setterinherited
classname → String
The name of the Dart class to generate.
final
dottedName → String
The fully qualified name with a leading '.'.
no setterinherited
enumCount → int
no setter
features → FeatureSet
final
fieldList ↔ List<ProtobufField>
getter/setter pair
fieldPath → List<int>
The field path contains the field IDs and indices (for repeated fields) that lead to the proto member corresponding to a piece of generated code. Repeated fields in the descriptor are further identified by the index of the message in question. For more information see https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/descriptor.proto#L728
final
fileGen → FileGenerator
The generator of the .pb.dart file that will declare this type.
no setteroverride
fullName → String
The fully-qualified name of the message (without any leading '.').
final
hashCode → int
The hash code for this object.
no setterinherited
messageName → String
The part of the fully qualified name that comes after the package prefix.
no setter
mixin ↔ PbMixin?
getter/setter pair
needsFixnumImport → bool
no setter
package → String
no setteroverride
parent → ProtobufContainer
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
toplevelParent → ProtobufContainer?
The top-level parent of this entity, or itself if it is a top-level entity.
no setterinherited

Methods

addConstantImportsTo(Set<FileGenerator> imports) → void
Adds dependencies of generateConstants to imports.
addImportsTo(Set<FileGenerator> imports, Set<FileGenerator> enumImports) → void
Adds dependencies of generate to imports.
addMixinsTo(Set<PbMixin> output) → void
Adds all mixins used in this message and any submessages.
checkResolved() → void
Throws an exception if resolve hasn't been called yet.
generate(IndentingWriter out) → void
generateConstants(IndentingWriter out) → void
Writes a Dart constant containing the JSON for the ProtoDescriptor. Also writes a separate constant for each nested message, to avoid duplication.
generateEnums(IndentingWriter out) → void
generateFieldAccessorsMutators(ProtobufField field, IndentingWriter out, List<int> memberFieldPath) → void
generateFieldsAccessorsMutators(IndentingWriter out) → void
generateOneofAccessors(IndentingWriter out, OneofNames oneof) → void
getJsonConstant(FileGenerator context) → String
Returns a const expression that evaluates to the JSON for this message.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register(GenerationContext ctx) → void
resolve(GenerationContext ctx) → void
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited