Class ExtendedSourceContext.Builder (1.12.0)

publicstaticfinalclass ExtendedSourceContext.BuilderextendsGeneratedMessageV3.Builder<ExtendedSourceContext.Builder>implementsExtendedSourceContextOrBuilder

An ExtendedSourceContext is a SourceContext combined with additional details describing the context.

Protobuf type google.devtools.source.v1.ExtendedSourceContext

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicExtendedSourceContext.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
value Object
Returns
Type Description
Overrides

build()

publicExtendedSourceContextbuild()
Returns
Type Description

buildPartial()

publicExtendedSourceContextbuildPartial()
Returns
Type Description

clear()

publicExtendedSourceContext.Builderclear()
Returns
Type Description
Overrides

clearContext()

publicExtendedSourceContext.BuilderclearContext()

Any source context.

.google.devtools.source.v1.SourceContext context = 1;

Returns
Type Description

clearField(Descriptors.FieldDescriptor field)

publicExtendedSourceContext.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
Returns
Type Description
Overrides

clearLabels()

publicExtendedSourceContext.BuilderclearLabels()
Returns
Type Description

clearOneof(Descriptors.OneofDescriptor oneof)

publicExtendedSourceContext.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
Returns
Type Description
Overrides

clone()

publicExtendedSourceContext.Builderclone()
Returns
Type Description
Overrides

containsLabels(String key)

publicbooleancontainsLabels(Stringkey)

Labels with user defined metadata.

map<string, string> labels = 2;

Parameter
Name Description
key String
Returns
Type Description

getContext()

publicSourceContextgetContext()

Any source context.

.google.devtools.source.v1.SourceContext context = 1;

Returns
Type Description
SourceContext

The context.

getContextBuilder()

publicSourceContext.BuildergetContextBuilder()

Any source context.

.google.devtools.source.v1.SourceContext context = 1;

Returns
Type Description

getContextOrBuilder()

publicSourceContextOrBuildergetContextOrBuilder()

Any source context.

.google.devtools.source.v1.SourceContext context = 1;

Returns
Type Description

getDefaultInstanceForType()

publicExtendedSourceContextgetDefaultInstanceForType()
Returns
Type Description

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Overrides

getLabels()

publicMap<String,String>getLabels()

Use #getLabelsMap() instead.

Returns
Type Description

getLabelsCount()

publicintgetLabelsCount()

Labels with user defined metadata.

map<string, string> labels = 2;

Returns
Type Description
int

getLabelsMap()

publicMap<String,String>getLabelsMap()

Labels with user defined metadata.

map<string, string> labels = 2;

Returns
Type Description

getLabelsOrDefault(String key, String defaultValue)

publicStringgetLabelsOrDefault(Stringkey,StringdefaultValue)

Labels with user defined metadata.

map<string, string> labels = 2;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description

getLabelsOrThrow(String key)

publicStringgetLabelsOrThrow(Stringkey)

Labels with user defined metadata.

map<string, string> labels = 2;

Parameter
Name Description
key String
Returns
Type Description

getMutableLabels()

publicMap<String,String>getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description

hasContext()

publicbooleanhasContext()

Any source context.

.google.devtools.source.v1.SourceContext context = 1;

Returns
Type Description
boolean

Whether the context field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
Overrides

internalGetMapField(int number)

protectedMapFieldinternalGetMapField(intnumber)
Parameter
Name Description
number int
Returns
Type Description
Overrides

internalGetMutableMapField(int number)

protectedMapFieldinternalGetMutableMapField(intnumber)
Parameter
Name Description
number int
Returns
Type Description
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
Overrides

mergeContext(SourceContext value)

publicExtendedSourceContext.BuildermergeContext(SourceContextvalue)

Any source context.

.google.devtools.source.v1.SourceContext context = 1;

Parameter
Name Description
Returns
Type Description

mergeFrom(ExtendedSourceContext other)

publicExtendedSourceContext.BuildermergeFrom(ExtendedSourceContextother)
Parameter
Name Description
Returns
Type Description

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicExtendedSourceContext.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Overrides Exceptions
Type Description

mergeFrom(Message other)

publicExtendedSourceContext.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalExtendedSourceContext.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Overrides

putAllLabels(Map<String,String> values)

publicExtendedSourceContext.BuilderputAllLabels(Map<String,String>values)

Labels with user defined metadata.

map<string, string> labels = 2;

Parameter
Name Description
values Map<String,String>
Returns
Type Description

putLabels(String key, String value)

publicExtendedSourceContext.BuilderputLabels(Stringkey,Stringvalue)

Labels with user defined metadata.

map<string, string> labels = 2;

Parameters
Name Description
key String
value String
Returns
Type Description

removeLabels(String key)

publicExtendedSourceContext.BuilderremoveLabels(Stringkey)

Labels with user defined metadata.

map<string, string> labels = 2;

Parameter
Name Description
key String
Returns
Type Description

setContext(SourceContext value)

publicExtendedSourceContext.BuildersetContext(SourceContextvalue)

Any source context.

.google.devtools.source.v1.SourceContext context = 1;

Parameter
Name Description
Returns
Type Description

setContext(SourceContext.Builder builderForValue)

publicExtendedSourceContext.BuildersetContext(SourceContext.BuilderbuilderForValue)

Any source context.

.google.devtools.source.v1.SourceContext context = 1;

Parameter
Name Description
builderForValue SourceContext.Builder
Returns
Type Description

setField(Descriptors.FieldDescriptor field, Object value)

publicExtendedSourceContext.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
value Object
Returns
Type Description
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

publicExtendedSourceContext.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
index int
value Object
Returns
Type Description
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalExtendedSourceContext.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.