Package com.google.protobuf
Class FieldInfo.Builder
java.lang.Object
com.google.protobuf.FieldInfo.Builder
- Enclosing class:
FieldInfo
A builder for
FieldInfo
instances.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
withCachedSizeField
(Field cachedSizeField) withEnforceUtf8
(boolean enforceUtf8) withEnumVerifier
(Internal.EnumVerifier enumVerifier) Specifies the actual field on the message represented by this field.withFieldNumber
(int fieldNumber) Specifies the unique field number for this field within the message.withMapDefaultEntry
(Object mapDefaultEntry) Sets the information for building a oneof member field.withPresence
(Field presenceField, int presenceMask) Specifies proto2 presence information.withRequired
(boolean required) Specifies the type of this field.
-
Field Details
-
field
-
type
-
fieldNumber
private int fieldNumber -
presenceField
-
presenceMask
private int presenceMask -
required
private boolean required -
enforceUtf8
private boolean enforceUtf8 -
oneof
-
oneofStoredType
-
mapDefaultEntry
-
enumVerifier
-
cachedSizeField
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
withField
Specifies the actual field on the message represented by this field. This should not be called for oneof member fields. -
withType
Specifies the type of this field. -
withFieldNumber
Specifies the unique field number for this field within the message. -
withPresence
Specifies proto2 presence information. This should not be called for oneof fields. -
withOneof
Sets the information for building a oneof member field. This is incompatible withwithField(Field)
andwithPresence(Field, int)
.- Parameters:
oneof
- the oneof for which this field is associated.oneofStoredType
- the actual type stored in the oneof value for this field. Since the oneof value is anObject
, primitives will store their boxed type.
-
withRequired
-
withMapDefaultEntry
-
withEnforceUtf8
-
withEnumVerifier
-
withCachedSizeField
-
build
-