Package com.google.protobuf
Class DescriptorProtos.SourceCodeInfo.Location.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<DescriptorProtos.SourceCodeInfo.Location.Builder>
com.google.protobuf.DescriptorProtos.SourceCodeInfo.Location.Builder
- All Implemented Interfaces:
DescriptorProtos.SourceCodeInfo.LocationOrBuilder,Message.Builder,MessageLite.Builder,MessageLiteOrBuilder,MessageOrBuilder,Cloneable
- Enclosing class:
- DescriptorProtos.SourceCodeInfo.Location
public static final class DescriptorProtos.SourceCodeInfo.Location.Builder
extends GeneratedMessageV3.Builder<DescriptorProtos.SourceCodeInfo.Location.Builder>
implements DescriptorProtos.SourceCodeInfo.LocationOrBuilder
Protobuf type
google.protobuf.SourceCodeInfo.Location-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite.Builder
AbstractMessageLite.Builder.LimitedInputStream -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate Objectprivate LazyStringArrayListprivate Internal.IntListprivate Internal.IntListprivate Object -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllLeadingDetachedComments(Iterable<String> values) repeated string leading_detached_comments = 6;addAllPath(Iterable<? extends Integer> values) Identifies which part of the FileDescriptorProto was defined at this location.addAllSpan(Iterable<? extends Integer> values) Always has exactly three or four elements: start line, start column, end line (optional, otherwise assumed same as start line), end column.addLeadingDetachedComments(String value) repeated string leading_detached_comments = 6;repeated string leading_detached_comments = 6;addPath(int value) Identifies which part of the FileDescriptorProto was defined at this location.addRepeatedField(Descriptors.FieldDescriptor field, Object value) LikesetRepeatedField, but appends the value as a new element.addSpan(int value) Always has exactly three or four elements: start line, start column, end line (optional, otherwise assumed same as start line), end column.build()Constructs the message based on the state of the Builder.LikeMessageLite.Builder.build(), but does not throw an exception if the message is missing required fields.private voidclear()Called by the initialization and clear code paths to allow subclasses to reset any of their builtin fields back to the initial values.Clears the field.If this SourceCodeInfo represents a complete declaration, these are any comments appearing before and after the declaration which appear to be attached to the declaration.repeated string leading_detached_comments = 6;TODO: Clear it when all subclasses have implemented this method.Identifies which part of the FileDescriptorProto was defined at this location.Always has exactly three or four elements: start line, start column, end line (optional, otherwise assumed same as start line), end column.optional string trailing_comments = 4;clone()Clones the Builder.private voidprivate voidprivate voidGet an instance of the type with no fields set.static final Descriptors.DescriptorGet the message's type's descriptor.If this SourceCodeInfo represents a complete declaration, these are any comments appearing before and after the declaration which appear to be attached to the declaration.If this SourceCodeInfo represents a complete declaration, these are any comments appearing before and after the declaration which appear to be attached to the declaration.getLeadingDetachedComments(int index) repeated string leading_detached_comments = 6;getLeadingDetachedCommentsBytes(int index) repeated string leading_detached_comments = 6;intrepeated string leading_detached_comments = 6;repeated string leading_detached_comments = 6;intgetPath(int index) Identifies which part of the FileDescriptorProto was defined at this location.intIdentifies which part of the FileDescriptorProto was defined at this location.Identifies which part of the FileDescriptorProto was defined at this location.intgetSpan(int index) Always has exactly three or four elements: start line, start column, end line (optional, otherwise assumed same as start line), end column.intAlways has exactly three or four elements: start line, start column, end line (optional, otherwise assumed same as start line), end column.Always has exactly three or four elements: start line, start column, end line (optional, otherwise assumed same as start line), end column.optional string trailing_comments = 4;optional string trailing_comments = 4;booleanIf this SourceCodeInfo represents a complete declaration, these are any comments appearing before and after the declaration which appear to be attached to the declaration.booleanoptional string trailing_comments = 4;protected GeneratedMessageV3.FieldAccessorTableGet the FieldAccessorTable for this type.final booleanReturns true if all required fields in the message and all embedded messages are set, false otherwise.mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) LikeMessageLite.Builder.mergeFrom(CodedInputStream), but also parses extensions.Mergeotherinto the message being built.mergeUnknownFields(UnknownFieldSet unknownFields) Merge some unknown fields into theUnknownFieldSetfor this message.setField(Descriptors.FieldDescriptor field, Object value) Sets a field to the given value.setLeadingComments(String value) If this SourceCodeInfo represents a complete declaration, these are any comments appearing before and after the declaration which appear to be attached to the declaration.If this SourceCodeInfo represents a complete declaration, these are any comments appearing before and after the declaration which appear to be attached to the declaration.setLeadingDetachedComments(int index, String value) repeated string leading_detached_comments = 6;setPath(int index, int value) Identifies which part of the FileDescriptorProto was defined at this location.setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value) Sets an element of a repeated field to the given value.setSpan(int index, int value) Always has exactly three or four elements: start line, start column, end line (optional, otherwise assumed same as start line), end column.setTrailingComments(String value) optional string trailing_comments = 4;optional string trailing_comments = 4;setUnknownFields(UnknownFieldSet unknownFields) Set theUnknownFieldSetfor this message.Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
dispose, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
bitField0_
private int bitField0_ -
path_
-
span_
-
leadingComments_
-
trailingComments_
-
leadingDetachedComments_
-
-
Constructor Details
-
Builder
private Builder() -
Builder
-
-
Method Details
-
getDescriptor
-
internalGetFieldAccessorTable
Description copied from class:GeneratedMessageV3.BuilderGet the FieldAccessorTable for this type. We can't have the message class pass this in to the constructor because of bootstrapping trouble with DescriptorProtos.- Specified by:
internalGetFieldAccessorTablein classGeneratedMessageV3.Builder<DescriptorProtos.SourceCodeInfo.Location.Builder>
-
clear
Description copied from class:GeneratedMessageV3.BuilderCalled by the initialization and clear code paths to allow subclasses to reset any of their builtin fields back to the initial values.- Specified by:
clearin interfaceMessage.Builder- Specified by:
clearin interfaceMessageLite.Builder- Overrides:
clearin classGeneratedMessageV3.Builder<DescriptorProtos.SourceCodeInfo.Location.Builder>
-
getDescriptorForType
Description copied from interface:Message.BuilderGet the message's type's descriptor. SeeMessageOrBuilder.getDescriptorForType().- Specified by:
getDescriptorForTypein interfaceMessage.Builder- Specified by:
getDescriptorForTypein interfaceMessageOrBuilder- Overrides:
getDescriptorForTypein classGeneratedMessageV3.Builder<DescriptorProtos.SourceCodeInfo.Location.Builder>
-
getDefaultInstanceForType
Description copied from interface:MessageLiteOrBuilderGet 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 thegetDefaultInstance()method of generated message classes in that this method is an abstract method of theMessageLiteinterface whereasgetDefaultInstance()is a static method of a specific class. They return the same thing.- Specified by:
getDefaultInstanceForTypein interfaceMessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfaceMessageOrBuilder
-
build
Description copied from interface:MessageLite.BuilderConstructs the message based on the state of the Builder. Subsequent changes to the Builder will not affect the returned message.- Specified by:
buildin interfaceMessage.Builder- Specified by:
buildin interfaceMessageLite.Builder
-
buildPartial
Description copied from interface:MessageLite.BuilderLikeMessageLite.Builder.build(), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned. Subsequent changes to the Builder will not affect the returned message.- Specified by:
buildPartialin interfaceMessage.Builder- Specified by:
buildPartialin interfaceMessageLite.Builder
-
buildPartial0
-
clone
Description copied from interface:MessageLite.BuilderClones the Builder.- Specified by:
clonein interfaceMessage.Builder- Specified by:
clonein interfaceMessageLite.Builder- Overrides:
clonein classGeneratedMessageV3.Builder<DescriptorProtos.SourceCodeInfo.Location.Builder>- See Also:
-
setField
public DescriptorProtos.SourceCodeInfo.Location.Builder setField(Descriptors.FieldDescriptor field, Object value) Description copied from interface:Message.BuilderSets a field to the given value. The value must be of the correct type for this field, that is, the same type thatMessageOrBuilder.getField(Descriptors.FieldDescriptor)returns.- Specified by:
setFieldin interfaceMessage.Builder- Overrides:
setFieldin classGeneratedMessageV3.Builder<DescriptorProtos.SourceCodeInfo.Location.Builder>
-
clearField
public DescriptorProtos.SourceCodeInfo.Location.Builder clearField(Descriptors.FieldDescriptor field) Description copied from interface:Message.BuilderClears the field. This is exactly equivalent to calling the generated "clear" accessor method corresponding to the field.- Specified by:
clearFieldin interfaceMessage.Builder- Overrides:
clearFieldin classGeneratedMessageV3.Builder<DescriptorProtos.SourceCodeInfo.Location.Builder>
-
clearOneof
public DescriptorProtos.SourceCodeInfo.Location.Builder clearOneof(Descriptors.OneofDescriptor oneof) Description copied from class:AbstractMessage.BuilderTODO: Clear it when all subclasses have implemented this method.- Specified by:
clearOneofin interfaceMessage.Builder- Overrides:
clearOneofin classGeneratedMessageV3.Builder<DescriptorProtos.SourceCodeInfo.Location.Builder>
-
setRepeatedField
public DescriptorProtos.SourceCodeInfo.Location.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value) Description copied from interface:Message.BuilderSets an element of a repeated field to the given value. The value must be of the correct type for this field; that is, the same type thatMessageOrBuilder.getRepeatedField(Descriptors.FieldDescriptor,int)returns.- Specified by:
setRepeatedFieldin interfaceMessage.Builder- Overrides:
setRepeatedFieldin classGeneratedMessageV3.Builder<DescriptorProtos.SourceCodeInfo.Location.Builder>
-
addRepeatedField
public DescriptorProtos.SourceCodeInfo.Location.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value) Description copied from interface:Message.BuilderLikesetRepeatedField, but appends the value as a new element.- Specified by:
addRepeatedFieldin interfaceMessage.Builder- Overrides:
addRepeatedFieldin classGeneratedMessageV3.Builder<DescriptorProtos.SourceCodeInfo.Location.Builder>
-
mergeFrom
Description copied from interface:Message.BuilderMergeotherinto the message being built.othermust have the exact same type asthis(i.e.getDescriptorForType() == other.getDescriptorForType()).Merging occurs as follows. For each field:
* For singular primitive fields, if the field is set inother, thenother's value overwrites the value in this message.
* For singular message fields, if the field is set inother, it is merged into the corresponding sub-message of this message using the same merging rules.
* For repeated fields, the elements inotherare concatenated with the elements in this message.
* For oneof groups, if the other message has one of the fields set, the group of this message is cleared and replaced by the field of the other message, so that the oneof constraint is preserved.This is equivalent to the
Message::MergeFrommethod in C++.- Specified by:
mergeFromin interfaceMessage.Builder- Overrides:
mergeFromin classAbstractMessage.Builder<DescriptorProtos.SourceCodeInfo.Location.Builder>
-
mergeFrom
public DescriptorProtos.SourceCodeInfo.Location.Builder mergeFrom(DescriptorProtos.SourceCodeInfo.Location other) -
isInitialized
public final boolean isInitialized()Description copied from interface:MessageLiteOrBuilderReturns true if all required fields in the message and all embedded messages are set, false otherwise.- Specified by:
isInitializedin interfaceMessageLiteOrBuilder- Overrides:
isInitializedin classGeneratedMessageV3.Builder<DescriptorProtos.SourceCodeInfo.Location.Builder>
-
mergeFrom
public DescriptorProtos.SourceCodeInfo.Location.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException Description copied from interface:MessageLite.BuilderLikeMessageLite.Builder.mergeFrom(CodedInputStream), but also parses extensions. The extensions that you want to be able to parse must be registered inextensionRegistry. Extensions not in the registry will be treated as unknown fields.- Specified by:
mergeFromin interfaceMessage.Builder- Specified by:
mergeFromin interfaceMessageLite.Builder- Overrides:
mergeFromin classAbstractMessage.Builder<DescriptorProtos.SourceCodeInfo.Location.Builder>- Throws:
InvalidProtocolBufferException- the bytes read are not syntactically correct according to the protobuf wire format specification. The data is corrupt, incomplete, or was never a protobuf in the first place.IOException- an I/O error reading from the stream
-
ensurePathIsMutable
private void ensurePathIsMutable() -
getPathList
Identifies which part of the FileDescriptorProto was defined at this location. Each element is a field number or an index. They form a path from the root FileDescriptorProto to the place where the definition occurs. For example, this path: [ 4, 3, 2, 7, 1 ] refers to: file.message_type(3) // 4, 3 .field(7) // 2, 7 .name() // 1 This is because FileDescriptorProto.message_type has field number 4: repeated DescriptorProto message_type = 4; and DescriptorProto.field has field number 2: repeated FieldDescriptorProto field = 2; and FieldDescriptorProto.name has field number 1: optional string name = 1; Thus, the above path gives the location of a field name. If we removed the last element: [ 4, 3, 2, 7 ] this path refers to the whole field declaration (from the beginning of the label to the terminating semicolon).repeated int32 path = 1 [packed = true];- Specified by:
getPathListin interfaceDescriptorProtos.SourceCodeInfo.LocationOrBuilder- Returns:
- A list containing the path.
-
getPathCount
public int getPathCount()Identifies which part of the FileDescriptorProto was defined at this location. Each element is a field number or an index. They form a path from the root FileDescriptorProto to the place where the definition occurs. For example, this path: [ 4, 3, 2, 7, 1 ] refers to: file.message_type(3) // 4, 3 .field(7) // 2, 7 .name() // 1 This is because FileDescriptorProto.message_type has field number 4: repeated DescriptorProto message_type = 4; and DescriptorProto.field has field number 2: repeated FieldDescriptorProto field = 2; and FieldDescriptorProto.name has field number 1: optional string name = 1; Thus, the above path gives the location of a field name. If we removed the last element: [ 4, 3, 2, 7 ] this path refers to the whole field declaration (from the beginning of the label to the terminating semicolon).repeated int32 path = 1 [packed = true];- Specified by:
getPathCountin interfaceDescriptorProtos.SourceCodeInfo.LocationOrBuilder- Returns:
- The count of path.
-
getPath
public int getPath(int index) Identifies which part of the FileDescriptorProto was defined at this location. Each element is a field number or an index. They form a path from the root FileDescriptorProto to the place where the definition occurs. For example, this path: [ 4, 3, 2, 7, 1 ] refers to: file.message_type(3) // 4, 3 .field(7) // 2, 7 .name() // 1 This is because FileDescriptorProto.message_type has field number 4: repeated DescriptorProto message_type = 4; and DescriptorProto.field has field number 2: repeated FieldDescriptorProto field = 2; and FieldDescriptorProto.name has field number 1: optional string name = 1; Thus, the above path gives the location of a field name. If we removed the last element: [ 4, 3, 2, 7 ] this path refers to the whole field declaration (from the beginning of the label to the terminating semicolon).repeated int32 path = 1 [packed = true];- Specified by:
getPathin interfaceDescriptorProtos.SourceCodeInfo.LocationOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The path at the given index.
-
setPath
Identifies which part of the FileDescriptorProto was defined at this location. Each element is a field number or an index. They form a path from the root FileDescriptorProto to the place where the definition occurs. For example, this path: [ 4, 3, 2, 7, 1 ] refers to: file.message_type(3) // 4, 3 .field(7) // 2, 7 .name() // 1 This is because FileDescriptorProto.message_type has field number 4: repeated DescriptorProto message_type = 4; and DescriptorProto.field has field number 2: repeated FieldDescriptorProto field = 2; and FieldDescriptorProto.name has field number 1: optional string name = 1; Thus, the above path gives the location of a field name. If we removed the last element: [ 4, 3, 2, 7 ] this path refers to the whole field declaration (from the beginning of the label to the terminating semicolon).repeated int32 path = 1 [packed = true];- Parameters:
index- The index to set the value at.value- The path to set.- Returns:
- This builder for chaining.
-
addPath
Identifies which part of the FileDescriptorProto was defined at this location. Each element is a field number or an index. They form a path from the root FileDescriptorProto to the place where the definition occurs. For example, this path: [ 4, 3, 2, 7, 1 ] refers to: file.message_type(3) // 4, 3 .field(7) // 2, 7 .name() // 1 This is because FileDescriptorProto.message_type has field number 4: repeated DescriptorProto message_type = 4; and DescriptorProto.field has field number 2: repeated FieldDescriptorProto field = 2; and FieldDescriptorProto.name has field number 1: optional string name = 1; Thus, the above path gives the location of a field name. If we removed the last element: [ 4, 3, 2, 7 ] this path refers to the whole field declaration (from the beginning of the label to the terminating semicolon).repeated int32 path = 1 [packed = true];- Parameters:
value- The path to add.- Returns:
- This builder for chaining.
-
addAllPath
public DescriptorProtos.SourceCodeInfo.Location.Builder addAllPath(Iterable<? extends Integer> values) Identifies which part of the FileDescriptorProto was defined at this location. Each element is a field number or an index. They form a path from the root FileDescriptorProto to the place where the definition occurs. For example, this path: [ 4, 3, 2, 7, 1 ] refers to: file.message_type(3) // 4, 3 .field(7) // 2, 7 .name() // 1 This is because FileDescriptorProto.message_type has field number 4: repeated DescriptorProto message_type = 4; and DescriptorProto.field has field number 2: repeated FieldDescriptorProto field = 2; and FieldDescriptorProto.name has field number 1: optional string name = 1; Thus, the above path gives the location of a field name. If we removed the last element: [ 4, 3, 2, 7 ] this path refers to the whole field declaration (from the beginning of the label to the terminating semicolon).repeated int32 path = 1 [packed = true];- Parameters:
values- The path to add.- Returns:
- This builder for chaining.
-
clearPath
Identifies which part of the FileDescriptorProto was defined at this location. Each element is a field number or an index. They form a path from the root FileDescriptorProto to the place where the definition occurs. For example, this path: [ 4, 3, 2, 7, 1 ] refers to: file.message_type(3) // 4, 3 .field(7) // 2, 7 .name() // 1 This is because FileDescriptorProto.message_type has field number 4: repeated DescriptorProto message_type = 4; and DescriptorProto.field has field number 2: repeated FieldDescriptorProto field = 2; and FieldDescriptorProto.name has field number 1: optional string name = 1; Thus, the above path gives the location of a field name. If we removed the last element: [ 4, 3, 2, 7 ] this path refers to the whole field declaration (from the beginning of the label to the terminating semicolon).repeated int32 path = 1 [packed = true];- Returns:
- This builder for chaining.
-
ensureSpanIsMutable
private void ensureSpanIsMutable() -
getSpanList
Always has exactly three or four elements: start line, start column, end line (optional, otherwise assumed same as start line), end column. These are packed into a single field for efficiency. Note that line and column numbers are zero-based -- typically you will want to add 1 to each before displaying to a user.
repeated int32 span = 2 [packed = true];- Specified by:
getSpanListin interfaceDescriptorProtos.SourceCodeInfo.LocationOrBuilder- Returns:
- A list containing the span.
-
getSpanCount
public int getSpanCount()Always has exactly three or four elements: start line, start column, end line (optional, otherwise assumed same as start line), end column. These are packed into a single field for efficiency. Note that line and column numbers are zero-based -- typically you will want to add 1 to each before displaying to a user.
repeated int32 span = 2 [packed = true];- Specified by:
getSpanCountin interfaceDescriptorProtos.SourceCodeInfo.LocationOrBuilder- Returns:
- The count of span.
-
getSpan
public int getSpan(int index) Always has exactly three or four elements: start line, start column, end line (optional, otherwise assumed same as start line), end column. These are packed into a single field for efficiency. Note that line and column numbers are zero-based -- typically you will want to add 1 to each before displaying to a user.
repeated int32 span = 2 [packed = true];- Specified by:
getSpanin interfaceDescriptorProtos.SourceCodeInfo.LocationOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The span at the given index.
-
setSpan
Always has exactly three or four elements: start line, start column, end line (optional, otherwise assumed same as start line), end column. These are packed into a single field for efficiency. Note that line and column numbers are zero-based -- typically you will want to add 1 to each before displaying to a user.
repeated int32 span = 2 [packed = true];- Parameters:
index- The index to set the value at.value- The span to set.- Returns:
- This builder for chaining.
-
addSpan
Always has exactly three or four elements: start line, start column, end line (optional, otherwise assumed same as start line), end column. These are packed into a single field for efficiency. Note that line and column numbers are zero-based -- typically you will want to add 1 to each before displaying to a user.
repeated int32 span = 2 [packed = true];- Parameters:
value- The span to add.- Returns:
- This builder for chaining.
-
addAllSpan
public DescriptorProtos.SourceCodeInfo.Location.Builder addAllSpan(Iterable<? extends Integer> values) Always has exactly three or four elements: start line, start column, end line (optional, otherwise assumed same as start line), end column. These are packed into a single field for efficiency. Note that line and column numbers are zero-based -- typically you will want to add 1 to each before displaying to a user.
repeated int32 span = 2 [packed = true];- Parameters:
values- The span to add.- Returns:
- This builder for chaining.
-
clearSpan
Always has exactly three or four elements: start line, start column, end line (optional, otherwise assumed same as start line), end column. These are packed into a single field for efficiency. Note that line and column numbers are zero-based -- typically you will want to add 1 to each before displaying to a user.
repeated int32 span = 2 [packed = true];- Returns:
- This builder for chaining.
-
hasLeadingComments
public boolean hasLeadingComments()If this SourceCodeInfo represents a complete declaration, these are any comments appearing before and after the declaration which appear to be attached to the declaration. A series of line comments appearing on consecutive lines, with no other tokens appearing on those lines, will be treated as a single comment. leading_detached_comments will keep paragraphs of comments that appear before (but not connected to) the current element. Each paragraph, separated by empty lines, will be one comment element in the repeated field. Only the comment content is provided; comment markers (e.g. //) are stripped out. For block comments, leading whitespace and an asterisk will be stripped from the beginning of each line other than the first. Newlines are included in the output. Examples: optional int32 foo = 1; // Comment attached to foo. // Comment attached to bar. optional int32 bar = 2; optional string baz = 3; // Comment attached to baz. // Another line attached to baz. // Comment attached to moo. // // Another line attached to moo. optional double moo = 4; // Detached comment for corge. This is not leading or trailing comments // to moo or corge because there are blank lines separating it from // both. // Detached comment for corge paragraph 2. optional string corge = 5; /* Block comment attached * to corge. Leading asterisks * will be removed. */ /* Block comment attached to * grault. */ optional int32 grault = 6; // ignored detached comments.optional string leading_comments = 3;- Specified by:
hasLeadingCommentsin interfaceDescriptorProtos.SourceCodeInfo.LocationOrBuilder- Returns:
- Whether the leadingComments field is set.
-
getLeadingComments
If this SourceCodeInfo represents a complete declaration, these are any comments appearing before and after the declaration which appear to be attached to the declaration. A series of line comments appearing on consecutive lines, with no other tokens appearing on those lines, will be treated as a single comment. leading_detached_comments will keep paragraphs of comments that appear before (but not connected to) the current element. Each paragraph, separated by empty lines, will be one comment element in the repeated field. Only the comment content is provided; comment markers (e.g. //) are stripped out. For block comments, leading whitespace and an asterisk will be stripped from the beginning of each line other than the first. Newlines are included in the output. Examples: optional int32 foo = 1; // Comment attached to foo. // Comment attached to bar. optional int32 bar = 2; optional string baz = 3; // Comment attached to baz. // Another line attached to baz. // Comment attached to moo. // // Another line attached to moo. optional double moo = 4; // Detached comment for corge. This is not leading or trailing comments // to moo or corge because there are blank lines separating it from // both. // Detached comment for corge paragraph 2. optional string corge = 5; /* Block comment attached * to corge. Leading asterisks * will be removed. */ /* Block comment attached to * grault. */ optional int32 grault = 6; // ignored detached comments.optional string leading_comments = 3;- Specified by:
getLeadingCommentsin interfaceDescriptorProtos.SourceCodeInfo.LocationOrBuilder- Returns:
- The leadingComments.
-
getLeadingCommentsBytes
If this SourceCodeInfo represents a complete declaration, these are any comments appearing before and after the declaration which appear to be attached to the declaration. A series of line comments appearing on consecutive lines, with no other tokens appearing on those lines, will be treated as a single comment. leading_detached_comments will keep paragraphs of comments that appear before (but not connected to) the current element. Each paragraph, separated by empty lines, will be one comment element in the repeated field. Only the comment content is provided; comment markers (e.g. //) are stripped out. For block comments, leading whitespace and an asterisk will be stripped from the beginning of each line other than the first. Newlines are included in the output. Examples: optional int32 foo = 1; // Comment attached to foo. // Comment attached to bar. optional int32 bar = 2; optional string baz = 3; // Comment attached to baz. // Another line attached to baz. // Comment attached to moo. // // Another line attached to moo. optional double moo = 4; // Detached comment for corge. This is not leading or trailing comments // to moo or corge because there are blank lines separating it from // both. // Detached comment for corge paragraph 2. optional string corge = 5; /* Block comment attached * to corge. Leading asterisks * will be removed. */ /* Block comment attached to * grault. */ optional int32 grault = 6; // ignored detached comments.optional string leading_comments = 3;- Specified by:
getLeadingCommentsBytesin interfaceDescriptorProtos.SourceCodeInfo.LocationOrBuilder- Returns:
- The bytes for leadingComments.
-
setLeadingComments
If this SourceCodeInfo represents a complete declaration, these are any comments appearing before and after the declaration which appear to be attached to the declaration. A series of line comments appearing on consecutive lines, with no other tokens appearing on those lines, will be treated as a single comment. leading_detached_comments will keep paragraphs of comments that appear before (but not connected to) the current element. Each paragraph, separated by empty lines, will be one comment element in the repeated field. Only the comment content is provided; comment markers (e.g. //) are stripped out. For block comments, leading whitespace and an asterisk will be stripped from the beginning of each line other than the first. Newlines are included in the output. Examples: optional int32 foo = 1; // Comment attached to foo. // Comment attached to bar. optional int32 bar = 2; optional string baz = 3; // Comment attached to baz. // Another line attached to baz. // Comment attached to moo. // // Another line attached to moo. optional double moo = 4; // Detached comment for corge. This is not leading or trailing comments // to moo or corge because there are blank lines separating it from // both. // Detached comment for corge paragraph 2. optional string corge = 5; /* Block comment attached * to corge. Leading asterisks * will be removed. */ /* Block comment attached to * grault. */ optional int32 grault = 6; // ignored detached comments.optional string leading_comments = 3;- Parameters:
value- The leadingComments to set.- Returns:
- This builder for chaining.
-
clearLeadingComments
If this SourceCodeInfo represents a complete declaration, these are any comments appearing before and after the declaration which appear to be attached to the declaration. A series of line comments appearing on consecutive lines, with no other tokens appearing on those lines, will be treated as a single comment. leading_detached_comments will keep paragraphs of comments that appear before (but not connected to) the current element. Each paragraph, separated by empty lines, will be one comment element in the repeated field. Only the comment content is provided; comment markers (e.g. //) are stripped out. For block comments, leading whitespace and an asterisk will be stripped from the beginning of each line other than the first. Newlines are included in the output. Examples: optional int32 foo = 1; // Comment attached to foo. // Comment attached to bar. optional int32 bar = 2; optional string baz = 3; // Comment attached to baz. // Another line attached to baz. // Comment attached to moo. // // Another line attached to moo. optional double moo = 4; // Detached comment for corge. This is not leading or trailing comments // to moo or corge because there are blank lines separating it from // both. // Detached comment for corge paragraph 2. optional string corge = 5; /* Block comment attached * to corge. Leading asterisks * will be removed. */ /* Block comment attached to * grault. */ optional int32 grault = 6; // ignored detached comments.optional string leading_comments = 3;- Returns:
- This builder for chaining.
-
setLeadingCommentsBytes
If this SourceCodeInfo represents a complete declaration, these are any comments appearing before and after the declaration which appear to be attached to the declaration. A series of line comments appearing on consecutive lines, with no other tokens appearing on those lines, will be treated as a single comment. leading_detached_comments will keep paragraphs of comments that appear before (but not connected to) the current element. Each paragraph, separated by empty lines, will be one comment element in the repeated field. Only the comment content is provided; comment markers (e.g. //) are stripped out. For block comments, leading whitespace and an asterisk will be stripped from the beginning of each line other than the first. Newlines are included in the output. Examples: optional int32 foo = 1; // Comment attached to foo. // Comment attached to bar. optional int32 bar = 2; optional string baz = 3; // Comment attached to baz. // Another line attached to baz. // Comment attached to moo. // // Another line attached to moo. optional double moo = 4; // Detached comment for corge. This is not leading or trailing comments // to moo or corge because there are blank lines separating it from // both. // Detached comment for corge paragraph 2. optional string corge = 5; /* Block comment attached * to corge. Leading asterisks * will be removed. */ /* Block comment attached to * grault. */ optional int32 grault = 6; // ignored detached comments.optional string leading_comments = 3;- Parameters:
value- The bytes for leadingComments to set.- Returns:
- This builder for chaining.
-
hasTrailingComments
public boolean hasTrailingComments()optional string trailing_comments = 4;- Specified by:
hasTrailingCommentsin interfaceDescriptorProtos.SourceCodeInfo.LocationOrBuilder- Returns:
- Whether the trailingComments field is set.
-
getTrailingComments
optional string trailing_comments = 4;- Specified by:
getTrailingCommentsin interfaceDescriptorProtos.SourceCodeInfo.LocationOrBuilder- Returns:
- The trailingComments.
-
getTrailingCommentsBytes
optional string trailing_comments = 4;- Specified by:
getTrailingCommentsBytesin interfaceDescriptorProtos.SourceCodeInfo.LocationOrBuilder- Returns:
- The bytes for trailingComments.
-
setTrailingComments
optional string trailing_comments = 4;- Parameters:
value- The trailingComments to set.- Returns:
- This builder for chaining.
-
clearTrailingComments
optional string trailing_comments = 4;- Returns:
- This builder for chaining.
-
setTrailingCommentsBytes
optional string trailing_comments = 4;- Parameters:
value- The bytes for trailingComments to set.- Returns:
- This builder for chaining.
-
ensureLeadingDetachedCommentsIsMutable
private void ensureLeadingDetachedCommentsIsMutable() -
getLeadingDetachedCommentsList
repeated string leading_detached_comments = 6;- Specified by:
getLeadingDetachedCommentsListin interfaceDescriptorProtos.SourceCodeInfo.LocationOrBuilder- Returns:
- A list containing the leadingDetachedComments.
-
getLeadingDetachedCommentsCount
public int getLeadingDetachedCommentsCount()repeated string leading_detached_comments = 6;- Specified by:
getLeadingDetachedCommentsCountin interfaceDescriptorProtos.SourceCodeInfo.LocationOrBuilder- Returns:
- The count of leadingDetachedComments.
-
getLeadingDetachedComments
repeated string leading_detached_comments = 6;- Specified by:
getLeadingDetachedCommentsin interfaceDescriptorProtos.SourceCodeInfo.LocationOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The leadingDetachedComments at the given index.
-
getLeadingDetachedCommentsBytes
repeated string leading_detached_comments = 6;- Specified by:
getLeadingDetachedCommentsBytesin interfaceDescriptorProtos.SourceCodeInfo.LocationOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the leadingDetachedComments at the given index.
-
setLeadingDetachedComments
public DescriptorProtos.SourceCodeInfo.Location.Builder setLeadingDetachedComments(int index, String value) repeated string leading_detached_comments = 6;- Parameters:
index- The index to set the value at.value- The leadingDetachedComments to set.- Returns:
- This builder for chaining.
-
addLeadingDetachedComments
repeated string leading_detached_comments = 6;- Parameters:
value- The leadingDetachedComments to add.- Returns:
- This builder for chaining.
-
addAllLeadingDetachedComments
public DescriptorProtos.SourceCodeInfo.Location.Builder addAllLeadingDetachedComments(Iterable<String> values) repeated string leading_detached_comments = 6;- Parameters:
values- The leadingDetachedComments to add.- Returns:
- This builder for chaining.
-
clearLeadingDetachedComments
repeated string leading_detached_comments = 6;- Returns:
- This builder for chaining.
-
addLeadingDetachedCommentsBytes
public DescriptorProtos.SourceCodeInfo.Location.Builder addLeadingDetachedCommentsBytes(ByteString value) repeated string leading_detached_comments = 6;- Parameters:
value- The bytes of the leadingDetachedComments to add.- Returns:
- This builder for chaining.
-
setUnknownFields
public final DescriptorProtos.SourceCodeInfo.Location.Builder setUnknownFields(UnknownFieldSet unknownFields) Description copied from interface:Message.BuilderSet theUnknownFieldSetfor this message.- Specified by:
setUnknownFieldsin interfaceMessage.Builder- Overrides:
setUnknownFieldsin classGeneratedMessageV3.Builder<DescriptorProtos.SourceCodeInfo.Location.Builder>
-
mergeUnknownFields
public final DescriptorProtos.SourceCodeInfo.Location.Builder mergeUnknownFields(UnknownFieldSet unknownFields) Description copied from interface:Message.BuilderMerge some unknown fields into theUnknownFieldSetfor this message.- Specified by:
mergeUnknownFieldsin interfaceMessage.Builder- Overrides:
mergeUnknownFieldsin classGeneratedMessageV3.Builder<DescriptorProtos.SourceCodeInfo.Location.Builder>
-