Class DescriptorProtos.FieldDescriptorProto.Builder

    • Method Detail

      • internalGetFieldAccessorTable

        protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
        Description copied from class: GeneratedMessage.Builder
        Get the FieldAccessorTable for this type. We can't have the message class pass this in to the constructor because of bootstrapping trouble with DescriptorProtos.
      • getDefaultInstanceForType

        public DescriptorProtos.FieldDescriptorProto getDefaultInstanceForType()
        Description copied from interface: MessageLiteOrBuilder
        Get an instance of the type with no fields set. Because no fields are set, all getters for singular fields will return default values and repeated fields will appear empty. This may or may not be a singleton. This differs from the getDefaultInstance() method of generated message classes in that this method is an abstract method of the MessageLite interface whereas getDefaultInstance() is a static method of a specific class. They return the same thing.
      • mergeFrom

        public DescriptorProtos.FieldDescriptorProto.Builder mergeFrom(Message other)
        Description copied from interface: Message.Builder
        Merge other into the message being built. other must have the exact same type as this (i.e. getDescriptorForType() == other.getDescriptorForType()). Merging occurs as follows. For each field:
        * For singular primitive fields, if the field is set in other, then other's value overwrites the value in this message.
        * For singular message fields, if the field is set in other, it is merged into the corresponding sub-message of this message using the same merging rules.
        * For repeated fields, the elements in other are concatenated with the elements in this message. This is equivalent to the Message::MergeFrom method in C++.
      • hasName

        public boolean hasName()
        optional string name = 1;
      • getName

        public String getName()
        optional string name = 1;
      • getNameBytes

        public ByteString getNameBytes()
        optional string name = 1;
      • hasNumber

        public boolean hasNumber()
        optional int32 number = 3;
      • getNumber

        public int getNumber()
        optional int32 number = 3;
      • hasLabel

        public boolean hasLabel()
        optional .google.protobuf.FieldDescriptorProto.Label label = 4;
      • hasType

        public boolean hasType()
        optional .google.protobuf.FieldDescriptorProto.Type type = 5;
         If type_name is set, this need not be set.  If both this and type_name
         are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
         
      • getType

        public DescriptorProtos.FieldDescriptorProto.Type getType()
        optional .google.protobuf.FieldDescriptorProto.Type type = 5;
         If type_name is set, this need not be set.  If both this and type_name
         are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
         
      • clearType

        public DescriptorProtos.FieldDescriptorProto.Builder clearType()
        optional .google.protobuf.FieldDescriptorProto.Type type = 5;
         If type_name is set, this need not be set.  If both this and type_name
         are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
         
      • hasTypeName

        public boolean hasTypeName()
        optional string type_name = 6;
         For message and enum types, this is the name of the type.  If the name
         starts with a '.', it is fully-qualified.  Otherwise, C++-like scoping
         rules are used to find the type (i.e. first the nested types within this
         message are searched, then within the parent, on up to the root
         namespace).
         
      • getTypeName

        public String getTypeName()
        optional string type_name = 6;
         For message and enum types, this is the name of the type.  If the name
         starts with a '.', it is fully-qualified.  Otherwise, C++-like scoping
         rules are used to find the type (i.e. first the nested types within this
         message are searched, then within the parent, on up to the root
         namespace).
         
      • getTypeNameBytes

        public ByteString getTypeNameBytes()
        optional string type_name = 6;
         For message and enum types, this is the name of the type.  If the name
         starts with a '.', it is fully-qualified.  Otherwise, C++-like scoping
         rules are used to find the type (i.e. first the nested types within this
         message are searched, then within the parent, on up to the root
         namespace).
         
      • setTypeName

        public DescriptorProtos.FieldDescriptorProto.Builder setTypeName(String value)
        optional string type_name = 6;
         For message and enum types, this is the name of the type.  If the name
         starts with a '.', it is fully-qualified.  Otherwise, C++-like scoping
         rules are used to find the type (i.e. first the nested types within this
         message are searched, then within the parent, on up to the root
         namespace).
         
      • clearTypeName

        public DescriptorProtos.FieldDescriptorProto.Builder clearTypeName()
        optional string type_name = 6;
         For message and enum types, this is the name of the type.  If the name
         starts with a '.', it is fully-qualified.  Otherwise, C++-like scoping
         rules are used to find the type (i.e. first the nested types within this
         message are searched, then within the parent, on up to the root
         namespace).
         
      • setTypeNameBytes

        public DescriptorProtos.FieldDescriptorProto.Builder setTypeNameBytes(ByteString value)
        optional string type_name = 6;
         For message and enum types, this is the name of the type.  If the name
         starts with a '.', it is fully-qualified.  Otherwise, C++-like scoping
         rules are used to find the type (i.e. first the nested types within this
         message are searched, then within the parent, on up to the root
         namespace).
         
      • hasExtendee

        public boolean hasExtendee()
        optional string extendee = 2;
         For extensions, this is the name of the type being extended.  It is
         resolved in the same manner as type_name.
         
      • getExtendee

        public String getExtendee()
        optional string extendee = 2;
         For extensions, this is the name of the type being extended.  It is
         resolved in the same manner as type_name.
         
      • getExtendeeBytes

        public ByteString getExtendeeBytes()
        optional string extendee = 2;
         For extensions, this is the name of the type being extended.  It is
         resolved in the same manner as type_name.
         
      • hasDefaultValue

        public boolean hasDefaultValue()
        optional string default_value = 7;
         For numeric types, contains the original text representation of the value.
         For booleans, "true" or "false".
         For strings, contains the default text contents (not escaped in any way).
         For bytes, contains the C escaped value.  All bytes >= 128 are escaped.
         TODO(kenton):  Base-64 encode?
         
      • getDefaultValue

        public String getDefaultValue()
        optional string default_value = 7;
         For numeric types, contains the original text representation of the value.
         For booleans, "true" or "false".
         For strings, contains the default text contents (not escaped in any way).
         For bytes, contains the C escaped value.  All bytes >= 128 are escaped.
         TODO(kenton):  Base-64 encode?
         
      • getDefaultValueBytes

        public ByteString getDefaultValueBytes()
        optional string default_value = 7;
         For numeric types, contains the original text representation of the value.
         For booleans, "true" or "false".
         For strings, contains the default text contents (not escaped in any way).
         For bytes, contains the C escaped value.  All bytes >= 128 are escaped.
         TODO(kenton):  Base-64 encode?
         
      • setDefaultValue

        public DescriptorProtos.FieldDescriptorProto.Builder setDefaultValue(String value)
        optional string default_value = 7;
         For numeric types, contains the original text representation of the value.
         For booleans, "true" or "false".
         For strings, contains the default text contents (not escaped in any way).
         For bytes, contains the C escaped value.  All bytes >= 128 are escaped.
         TODO(kenton):  Base-64 encode?
         
      • clearDefaultValue

        public DescriptorProtos.FieldDescriptorProto.Builder clearDefaultValue()
        optional string default_value = 7;
         For numeric types, contains the original text representation of the value.
         For booleans, "true" or "false".
         For strings, contains the default text contents (not escaped in any way).
         For bytes, contains the C escaped value.  All bytes >= 128 are escaped.
         TODO(kenton):  Base-64 encode?
         
      • setDefaultValueBytes

        public DescriptorProtos.FieldDescriptorProto.Builder setDefaultValueBytes(ByteString value)
        optional string default_value = 7;
         For numeric types, contains the original text representation of the value.
         For booleans, "true" or "false".
         For strings, contains the default text contents (not escaped in any way).
         For bytes, contains the C escaped value.  All bytes >= 128 are escaped.
         TODO(kenton):  Base-64 encode?
         
      • hasOneofIndex

        public boolean hasOneofIndex()
        optional int32 oneof_index = 9;
         If set, gives the index of a oneof in the containing type's oneof_decl
         list.  This field is a member of that oneof.  Extensions of a oneof should
         not set this since the oneof to which they belong will be inferred based
         on the extension range containing the extension's field number.
         
      • getOneofIndex

        public int getOneofIndex()
        optional int32 oneof_index = 9;
         If set, gives the index of a oneof in the containing type's oneof_decl
         list.  This field is a member of that oneof.  Extensions of a oneof should
         not set this since the oneof to which they belong will be inferred based
         on the extension range containing the extension's field number.
         
      • setOneofIndex

        public DescriptorProtos.FieldDescriptorProto.Builder setOneofIndex(int value)
        optional int32 oneof_index = 9;
         If set, gives the index of a oneof in the containing type's oneof_decl
         list.  This field is a member of that oneof.  Extensions of a oneof should
         not set this since the oneof to which they belong will be inferred based
         on the extension range containing the extension's field number.
         
      • clearOneofIndex

        public DescriptorProtos.FieldDescriptorProto.Builder clearOneofIndex()
        optional int32 oneof_index = 9;
         If set, gives the index of a oneof in the containing type's oneof_decl
         list.  This field is a member of that oneof.  Extensions of a oneof should
         not set this since the oneof to which they belong will be inferred based
         on the extension range containing the extension's field number.
         
      • hasOptions

        public boolean hasOptions()
        optional .google.protobuf.FieldOptions options = 8;