Class ExtendedSourceContext.Builder (1.33.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.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
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
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

publicExtendedSourceContextbuild()
Returns
Type Description
ExtendedSourceContext

buildPartial()

publicExtendedSourceContextbuildPartial()
Returns
Type Description
ExtendedSourceContext

clear()

publicExtendedSourceContext.Builderclear()
Returns
Type Description
ExtendedSourceContext.Builder
Overrides

clearContext()

publicExtendedSourceContext.BuilderclearContext()

Any source context.

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

Returns
Type Description
ExtendedSourceContext.Builder

clearField(Descriptors.FieldDescriptor field)

publicExtendedSourceContext.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ExtendedSourceContext.Builder
Overrides

clearLabels()

publicExtendedSourceContext.BuilderclearLabels()
Returns
Type Description
ExtendedSourceContext.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

publicExtendedSourceContext.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ExtendedSourceContext.Builder
Overrides

clone()

publicExtendedSourceContext.Builderclone()
Returns
Type Description
ExtendedSourceContext.Builder
Overrides

containsLabels(String key)

publicbooleancontainsLabels(Stringkey)

Labels with user defined metadata.

map<string, string> labels = 2;

Parameter
Name Description
key String
Returns
Type Description
boolean

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
SourceContext.Builder

getContextOrBuilder()

publicSourceContextOrBuildergetContextOrBuilder()

Any source context.

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

Returns
Type Description
SourceContextOrBuilder

getDefaultInstanceForType()

publicExtendedSourceContextgetDefaultInstanceForType()
Returns
Type Description
ExtendedSourceContext

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getLabels() (deprecated)

publicMap<String,String>getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

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
Map<String,String>

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
String

getLabelsOrThrow(String key)

publicStringgetLabelsOrThrow(Stringkey)

Labels with user defined metadata.

map<string, string> labels = 2;

Parameter
Name Description
key String
Returns
Type Description
String

getMutableLabels() (deprecated)

publicMap<String,String>getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

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
FieldAccessorTable
Overrides

internalGetMapField(int number)

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

internalGetMutableMapField(int number)

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

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeContext(SourceContext value)

publicExtendedSourceContext.BuildermergeContext(SourceContextvalue)

Any source context.

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

Parameter
Name Description
value SourceContext
Returns
Type Description
ExtendedSourceContext.Builder

mergeFrom(ExtendedSourceContext other)

publicExtendedSourceContext.BuildermergeFrom(ExtendedSourceContextother)
Parameter
Name Description
other ExtendedSourceContext
Returns
Type Description
ExtendedSourceContext.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicExtendedSourceContext.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ExtendedSourceContext.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalExtendedSourceContext.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ExtendedSourceContext.Builder
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
ExtendedSourceContext.Builder

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
ExtendedSourceContext.Builder

removeLabels(String key)

publicExtendedSourceContext.BuilderremoveLabels(Stringkey)

Labels with user defined metadata.

map<string, string> labels = 2;

Parameter
Name Description
key String
Returns
Type Description
ExtendedSourceContext.Builder

setContext(SourceContext value)

publicExtendedSourceContext.BuildersetContext(SourceContextvalue)

Any source context.

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

Parameter
Name Description
value SourceContext
Returns
Type Description
ExtendedSourceContext.Builder

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
ExtendedSourceContext.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalExtendedSourceContext.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ExtendedSourceContext.Builder
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.