Class ExtendedSourceContext.Builder (1.17.0)

public static final class ExtendedSourceContext.Builder extends GeneratedMessageV3.Builder<ExtendedSourceContext.Builder> implements ExtendedSourceContextOrBuilder

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

Protobuf type google.devtools.source.v1.ExtendedSourceContext

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ExtendedSourceContext.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ExtendedSourceContext.Builder
Overrides

build()

public ExtendedSourceContext build()
Returns
TypeDescription
ExtendedSourceContext

buildPartial()

public ExtendedSourceContext buildPartial()
Returns
TypeDescription
ExtendedSourceContext

clear()

public ExtendedSourceContext.Builder clear()
Returns
TypeDescription
ExtendedSourceContext.Builder
Overrides

clearContext()

public ExtendedSourceContext.Builder clearContext()

Any source context.

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

Returns
TypeDescription
ExtendedSourceContext.Builder

clearField(Descriptors.FieldDescriptor field)

public ExtendedSourceContext.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ExtendedSourceContext.Builder
Overrides

clearLabels()

public ExtendedSourceContext.Builder clearLabels()
Returns
TypeDescription
ExtendedSourceContext.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public ExtendedSourceContext.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
ExtendedSourceContext.Builder
Overrides

clone()

public ExtendedSourceContext.Builder clone()
Returns
TypeDescription
ExtendedSourceContext.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

Labels with user defined metadata.

map<string, string> labels = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getContext()

public SourceContext getContext()

Any source context.

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

Returns
TypeDescription
SourceContext

The context.

getContextBuilder()

public SourceContext.Builder getContextBuilder()

Any source context.

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

Returns
TypeDescription
SourceContext.Builder

getContextOrBuilder()

public SourceContextOrBuilder getContextOrBuilder()

Any source context.

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

Returns
TypeDescription
SourceContextOrBuilder

getDefaultInstanceForType()

public ExtendedSourceContext getDefaultInstanceForType()
Returns
TypeDescription
ExtendedSourceContext

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Labels with user defined metadata.

map<string, string> labels = 2;

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Labels with user defined metadata.

map<string, string> labels = 2;

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Labels with user defined metadata.

map<string, string> labels = 2;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Labels with user defined metadata.

map<string, string> labels = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMutableLabels()

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

hasContext()

public boolean hasContext()

Any source context.

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

Returns
TypeDescription
boolean

Whether the context field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeContext(SourceContext value)

public ExtendedSourceContext.Builder mergeContext(SourceContext value)

Any source context.

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

Parameter
NameDescription
valueSourceContext
Returns
TypeDescription
ExtendedSourceContext.Builder

mergeFrom(ExtendedSourceContext other)

public ExtendedSourceContext.Builder mergeFrom(ExtendedSourceContext other)
Parameter
NameDescription
otherExtendedSourceContext
Returns
TypeDescription
ExtendedSourceContext.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ExtendedSourceContext.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ExtendedSourceContext.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ExtendedSourceContext.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ExtendedSourceContext.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ExtendedSourceContext.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ExtendedSourceContext.Builder
Overrides

putAllLabels(Map<String,String> values)

public ExtendedSourceContext.Builder putAllLabels(Map<String,String> values)

Labels with user defined metadata.

map<string, string> labels = 2;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
ExtendedSourceContext.Builder

putLabels(String key, String value)

public ExtendedSourceContext.Builder putLabels(String key, String value)

Labels with user defined metadata.

map<string, string> labels = 2;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
ExtendedSourceContext.Builder

removeLabels(String key)

public ExtendedSourceContext.Builder removeLabels(String key)

Labels with user defined metadata.

map<string, string> labels = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
ExtendedSourceContext.Builder

setContext(SourceContext value)

public ExtendedSourceContext.Builder setContext(SourceContext value)

Any source context.

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

Parameter
NameDescription
valueSourceContext
Returns
TypeDescription
ExtendedSourceContext.Builder

setContext(SourceContext.Builder builderForValue)

public ExtendedSourceContext.Builder setContext(SourceContext.Builder builderForValue)

Any source context.

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

Parameter
NameDescription
builderForValueSourceContext.Builder
Returns
TypeDescription
ExtendedSourceContext.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public ExtendedSourceContext.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ExtendedSourceContext.Builder
Overrides

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

public ExtendedSourceContext.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ExtendedSourceContext.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final ExtendedSourceContext.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ExtendedSourceContext.Builder
Overrides