BuilderInfo class

Per-message type setup.

Constructors

BuilderInfo(String? messageName, {PackageName package = const PackageName(''), CreateBuilderFunc? createEmptyInstance, Object? toProto3Json(GeneratedMessage message, TypeRegistry typeRegistry)?, dynamic fromProto3Json(GeneratedMessage targetMessage, Object json, TypeRegistry typeRegistry, JsonParsingContext context)?})

Properties

byIndex List<FieldInfo>
Mapping from FieldInfo.indexs to FieldInfos.
final
byName Map<String, FieldInfo>
Mapping from FieldInfo.names to FieldInfos.
final
byTagAsString Map<String, FieldInfo>
Mapping from string representation of FieldInfo.tagNumbers to FieldInfos.
final
createEmptyInstance CreateBuilderFunc?
final
fieldInfo Map<int, FieldInfo>
Mapping from FieldInfo.tagNumbers to FieldInfos.
final
fromProto3Json → dynamic Function(GeneratedMessage targetMessage, Object json, TypeRegistry typeRegistry, JsonParsingContext context)?
final
hasExtensions bool
Whether the message has extension fields.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasRequiredFields bool
Whether the message has required fields.
getter/setter pair
messageName String
The message name. Also see qualifiedMessageName.
no setter
oneofs Map<int, int>
Mapping from oneof field FieldInfo.tagNumbers to the their indices in _FieldSet._oneofCases.
final
qualifiedMessageName String
Fully qualified name of this message.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sortedByTag List<FieldInfo>
The FieldInfo for each field in tag number order.
no setter
toProto3Json Object? Function(GeneratedMessage message, TypeRegistry typeRegistry)?
final

Methods

a<T>(int tagNumber, String name, int fieldType, {dynamic defaultOrMaker, CreateBuilderFunc? subBuilder, ValueOfFunc? valueOf, List<ProtobufEnum>? enumValues, String? protoName}) → void
add<T>(int tagNumber, String name, int? fieldType, dynamic defaultOrMaker, CreateBuilderFunc? subBuilder, ValueOfFunc? valueOf, List<ProtobufEnum>? enumValues, {String? protoName}) → void
addMapField<K, V>(int tagNumber, String name, int keyFieldType, int valueFieldType, BuilderInfo mapEntryBuilderInfo, CreateBuilderFunc? valueCreator, {ProtobufEnum? defaultEnumValue, String? protoName}) → void
addRepeated<T>(int tagNumber, String name, int fieldType, CheckFunc<T> check, CreateBuilderFunc? subBuilder, ValueOfFunc? valueOf, List<ProtobufEnum>? enumValues, {ProtobufEnum? defaultEnumValue, String? protoName}) → void
aInt64(int tagNumber, String name, {String? protoName}) → void
Adds Int64 field with Int64.ZERO default.
aOB(int tagNumber, String name, {String? protoName}) → void
Adds a boolean with no default value.
aOM<T extends GeneratedMessage>(int tagNumber, String name, {required T subBuilder(), String? protoName}) → void
aOS(int tagNumber, String name, {String? protoName}) → void
Adds PbFieldType.OS String with no default value to reduce generated code size.
aQM<T extends GeneratedMessage>(int tagNumber, String name, {required T subBuilder(), String? protoName}) → void
aQS(int tagNumber, String name, {String? protoName}) → void
Adds PbFieldType.QS String with no default value.
containsTagNumber(int tagNumber) bool
defaultValue(int tagNumber) → dynamic
e<T>(int tagNumber, String name, int fieldType, {dynamic defaultOrMaker, ValueOfFunc? valueOf, List<ProtobufEnum>? enumValues, String? protoName}) → void
fieldName(int tagNumber) String?
fieldType(int tagNumber) int?
m<K, V>(int tagNumber, String name, {String? entryClassName, required int keyFieldType, required int valueFieldType, CreateBuilderFunc? valueCreator, ValueOfFunc? valueOf, List<ProtobufEnum>? enumValues, ProtobufEnum? defaultEnumValue, PackageName packageName = const PackageName(''), String? protoName, dynamic valueDefaultOrMaker}) → void
makeDefault(int tagNumber) MakeDefaultFunc?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
oo(int oneofIndex, List<int> tags) → void
p<T>(int tagNumber, String name, int fieldType, {String? protoName}) → void
pc<T>(int tagNumber, String name, int fieldType, {CreateBuilderFunc? subBuilder, ValueOfFunc? valueOf, List<ProtobufEnum>? enumValues, ProtobufEnum? defaultEnumValue, String? protoName}) → void
pPS(int tagNumber, String name, {String? protoName}) → void
Adds PbFieldType.PS String with no default value.
subBuilder(int tagNumber) CreateBuilderFunc?
tagNumber(String fieldName) int?
toString() String
A string representation of this object.
inherited
valueOfFunc(int tagNumber) ValueOfFunc?

Operators

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