Class PluginProtos.Version.Builder (3.19.4)

public static final class PluginProtos.Version.Builder extends GeneratedMessageV3.Builder<PluginProtos.Version.Builder> implements PluginProtos.VersionOrBuilder

The version number of protocol compiler.

Protobuf type google.protobuf.compiler.Version

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptors.Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public PluginProtos.Version.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field Descriptors.FieldDescriptor
value Object
Returns
Type Description
PluginProtos.Version.Builder
Overrides

build()

public PluginProtos.Version build()
Returns
Type Description
PluginProtos.Version

buildPartial()

public PluginProtos.Version buildPartial()
Returns
Type Description
PluginProtos.Version

clear()

public PluginProtos.Version.Builder clear()

Called by the initialization and clear code paths to allow subclasses to reset any of their builtin fields back to the initial values.

Returns
Type Description
PluginProtos.Version.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public PluginProtos.Version.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field Descriptors.FieldDescriptor
Returns
Type Description
PluginProtos.Version.Builder
Overrides

clearMajor()

public PluginProtos.Version.Builder clearMajor()

optional int32 major = 1;

Returns
Type Description
PluginProtos.Version.Builder

This builder for chaining.

clearMinor()

public PluginProtos.Version.Builder clearMinor()

optional int32 minor = 2;

Returns
Type Description
PluginProtos.Version.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public PluginProtos.Version.Builder clearOneof(Descriptors.OneofDescriptor oneof)

TODO(jieluo): Clear it when all subclasses have implemented this method.

Parameter
Name Description
oneof Descriptors.OneofDescriptor
Returns
Type Description
PluginProtos.Version.Builder
Overrides

clearPatch()

public PluginProtos.Version.Builder clearPatch()

optional int32 patch = 3;

Returns
Type Description
PluginProtos.Version.Builder

This builder for chaining.

clearSuffix()

public PluginProtos.Version.Builder clearSuffix()

A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should be empty for mainline stable releases.

optional string suffix = 4;

Returns
Type Description
PluginProtos.Version.Builder

This builder for chaining.

clone()

public PluginProtos.Version.Builder clone()

Clones the Builder.

Returns
Type Description
PluginProtos.Version.Builder
Overrides

getDefaultInstanceForType()

public PluginProtos.Version getDefaultInstanceForType()

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.

Returns
Type Description
PluginProtos.Version

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()

Get the message's type's descriptor. This differs from the getDescriptor() method of generated message classes in that this method is an abstract method of the Message interface whereas getDescriptor() is a static method of a specific class. They return the same thing.

Returns
Type Description
Descriptors.Descriptor
Overrides

getMajor()

public int getMajor()

optional int32 major = 1;

Returns
Type Description
int

The major.

getMinor()

public int getMinor()

optional int32 minor = 2;

Returns
Type Description
int

The minor.

getPatch()

public int getPatch()

optional int32 patch = 3;

Returns
Type Description
int

The patch.

getSuffix()

public String getSuffix()

A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should be empty for mainline stable releases.

optional string suffix = 4;

Returns
Type Description
String

The suffix.

getSuffixBytes()

public ByteString getSuffixBytes()

A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should be empty for mainline stable releases.

optional string suffix = 4;

Returns
Type Description
ByteString

The bytes for suffix.

hasMajor()

public boolean hasMajor()

optional int32 major = 1;

Returns
Type Description
boolean

Whether the major field is set.

hasMinor()

public boolean hasMinor()

optional int32 minor = 2;

Returns
Type Description
boolean

Whether the minor field is set.

hasPatch()

public boolean hasPatch()

optional int32 patch = 3;

Returns
Type Description
boolean

Whether the patch field is set.

hasSuffix()

public boolean hasSuffix()

A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should be empty for mainline stable releases.

optional string suffix = 4;

Returns
Type Description
boolean

Whether the suffix field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()

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.

Returns
Type Description
GeneratedMessageV3.FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()

Returns true if all required fields in the message and all embedded messages are set, false otherwise.

See also: MessageOrBuilder#getInitializationErrorString()

Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public PluginProtos.Version.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

Like Builder#mergeFrom(CodedInputStream), but also parses extensions. The extensions that you want to be able to parse must be registered in extensionRegistry. Extensions not in the registry will be treated as unknown fields.

Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PluginProtos.Version.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public PluginProtos.Version.Builder mergeFrom(Message other)

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.
  • 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::MergeFrom method in C++.

Parameter
Name Description
other Message
Returns
Type Description
PluginProtos.Version.Builder
Overrides

mergeFrom(PluginProtos.Version other)

public PluginProtos.Version.Builder mergeFrom(PluginProtos.Version other)
Parameter
Name Description
other PluginProtos.Version
Returns
Type Description
PluginProtos.Version.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final PluginProtos.Version.Builder mergeUnknownFields(UnknownFieldSet unknownFields)

Merge some unknown fields into the UnknownFieldSet for this message.

Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
PluginProtos.Version.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public PluginProtos.Version.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field Descriptors.FieldDescriptor
value Object
Returns
Type Description
PluginProtos.Version.Builder
Overrides

setMajor(int value)

public PluginProtos.Version.Builder setMajor(int value)

optional int32 major = 1;

Parameter
Name Description
value int

The major to set.

Returns
Type Description
PluginProtos.Version.Builder

This builder for chaining.

setMinor(int value)

public PluginProtos.Version.Builder setMinor(int value)

optional int32 minor = 2;

Parameter
Name Description
value int

The minor to set.

Returns
Type Description
PluginProtos.Version.Builder

This builder for chaining.

setPatch(int value)

public PluginProtos.Version.Builder setPatch(int value)

optional int32 patch = 3;

Parameter
Name Description
value int

The patch to set.

Returns
Type Description
PluginProtos.Version.Builder

This builder for chaining.

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

public PluginProtos.Version.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field Descriptors.FieldDescriptor
index int
value Object
Returns
Type Description
PluginProtos.Version.Builder
Overrides

setSuffix(String value)

public PluginProtos.Version.Builder setSuffix(String value)

A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should be empty for mainline stable releases.

optional string suffix = 4;

Parameter
Name Description
value String

The suffix to set.

Returns
Type Description
PluginProtos.Version.Builder

This builder for chaining.

setSuffixBytes(ByteString value)

public PluginProtos.Version.Builder setSuffixBytes(ByteString value)

A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should be empty for mainline stable releases.

optional string suffix = 4;

Parameter
Name Description
value ByteString

The bytes for suffix to set.

Returns
Type Description
PluginProtos.Version.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final PluginProtos.Version.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
PluginProtos.Version.Builder
Overrides