ProtobufField class

Constructors

ProtobufField.extension(FieldDescriptorProto descriptor, ProtobufContainer parent, GenerationContext ctx)
ProtobufField.message(FieldNames names, ProtobufContainer parent, GenerationContext ctx)

Properties

baseType BaseType
final
descriptor → FieldDescriptorProto
final
fullName String
final
hashCode int
The hash code for this object.
no setterinherited
hasPresence bool
Whether this field should have a hazzer generated.
no setter
index int?
The index of this field in MessageGenerator.fieldList.
no setter
isDeprecated bool
Whether the field is to be encoded with deprecated = true encoding.
no setter
isMapField bool
Whether this field is a map field definition: map<key_type, value_type> map_field = N.
no setter
isPacked bool
Whether a numeric field is repeated and must be encoded with packed encoding.
no setter
isRepeated bool
no setter
isRequired bool
no setter
memberNames FieldNames?
Dart names within a GeneratedMessage or null for an extension.
final
needsFixnumImport bool
Whether this field uses the Int64 from the fixnum package.
no setter
number int
Returns the tag number of the underlying proto field.
no setter
overridesClearMethod bool
Whether the field has the overrideClearMethod annotation set to true.
no setter
overridesGetter bool
Whether the field has the overrideGetter annotation set to true.
no setter
overridesHasMethod bool
Whether the field has the overrideHasMethod annotation set to true.
no setter
overridesSetter bool
Whether the field has the overrideSetter annotation set to true.
no setter
parent ProtobufContainer
final
quotedProtoName String?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourcePosition int?
The position of this field as it appeared in the original DescriptorProto.
no setter
typeConstant String
Returns the constant in PbFieldType corresponding to this type.
no setter

Methods

generateBuilderInfoCall(IndentingWriter out, String package) → void
Returns Dart code adding this field to a BuilderInfo object. The call will start with ".." and a method name.
generateDefaultFunction() String?
Returns a function expression that returns the field's default value.
getDartType() String
Returns the expression to use for the Dart type.
getDefaultExpr() String
Returns a Dart expression that evaluates to this field's default value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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