MessageGenerator class
- Inheritance
-
- Object
- ProtobufContainer
- MessageGenerator
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
-
fieldPath
→ List<
int> -
See [ProtobufContainer
latefinal
- fileGen → FileGenerator
-
The generator of the .pb.dart file that will declare this type.
no setteroverride
- fileImportPrefix → String
-
no setterinherited
- 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 usage) → String -
Returns a const expression that evaluates to the JSON for this message.
usage
represents the .pb.dart file where the expression will be used. -
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