Class PluginProtos.Version.Builder

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
TypeDescription
Descriptors.Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public PluginProtos.Version.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldDescriptors.FieldDescriptor
valueObject
Returns
TypeDescription
PluginProtos.Version.Builder
Overrides

build()

public PluginProtos.Version build()
Returns
TypeDescription
PluginProtos.Version

buildPartial()

public PluginProtos.Version buildPartial()
Returns
TypeDescription
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
TypeDescription
PluginProtos.Version.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public PluginProtos.Version.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldDescriptors.FieldDescriptor
Returns
TypeDescription
PluginProtos.Version.Builder
Overrides

clearMajor()

public PluginProtos.Version.Builder clearMajor()

optional int32 major = 1;

Returns
TypeDescription
PluginProtos.Version.Builder

This builder for chaining.

clearMinor()

public PluginProtos.Version.Builder clearMinor()

optional int32 minor = 2;

Returns
TypeDescription
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
NameDescription
oneofDescriptors.OneofDescriptor
Returns
TypeDescription
PluginProtos.Version.Builder
Overrides

clearPatch()

public PluginProtos.Version.Builder clearPatch()

optional int32 patch = 3;

Returns
TypeDescription
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
TypeDescription
PluginProtos.Version.Builder

This builder for chaining.

clone()

public PluginProtos.Version.Builder clone()

Clones the Builder.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Descriptors.Descriptor
Overrides

getMajor()

public int getMajor()

optional int32 major = 1;

Returns
TypeDescription
int

The major.

getMinor()

public int getMinor()

optional int32 minor = 2;

Returns
TypeDescription
int

The minor.

getPatch()

public int getPatch()

optional int32 patch = 3;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for suffix.

hasMajor()

public boolean hasMajor()

optional int32 major = 1;

Returns
TypeDescription
boolean

Whether the major field is set.

hasMinor()

public boolean hasMinor()

optional int32 minor = 2;

Returns
TypeDescription
boolean

Whether the minor field is set.

hasPatch()

public boolean hasPatch()

optional int32 patch = 3;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PluginProtos.Version.Builder
Overrides Exceptions
TypeDescription
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
NameDescription
otherMessage
Returns
TypeDescription
PluginProtos.Version.Builder
Overrides

mergeFrom(PluginProtos.Version other)

public PluginProtos.Version.Builder mergeFrom(PluginProtos.Version other)
Parameter
NameDescription
otherPluginProtos.Version
Returns
TypeDescription
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
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
PluginProtos.Version.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public PluginProtos.Version.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldDescriptors.FieldDescriptor
valueObject
Returns
TypeDescription
PluginProtos.Version.Builder
Overrides

setMajor(int value)

public PluginProtos.Version.Builder setMajor(int value)

optional int32 major = 1;

Parameter
NameDescription
valueint

The major to set.

Returns
TypeDescription
PluginProtos.Version.Builder

This builder for chaining.

setMinor(int value)

public PluginProtos.Version.Builder setMinor(int value)

optional int32 minor = 2;

Parameter
NameDescription
valueint

The minor to set.

Returns
TypeDescription
PluginProtos.Version.Builder

This builder for chaining.

setPatch(int value)

public PluginProtos.Version.Builder setPatch(int value)

optional int32 patch = 3;

Parameter
NameDescription
valueint

The patch to set.

Returns
TypeDescription
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
NameDescription
fieldDescriptors.FieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The suffix to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for suffix to set.

Returns
TypeDescription
PluginProtos.Version.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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