Class GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>

public abstract static class GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType> extends GeneratedMessageLite.Builder<MessageType,BuilderType> implements GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType,BuilderType>

Inheritance

java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > GeneratedMessageLite.Builder > GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>

Implements

com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType,BuilderType>

Type Parameters

NameDescription
MessageType
BuilderType

Constructors

ExtendableBuilder(MessageType defaultInstance)

protected ExtendableBuilder(MessageType defaultInstance)
Parameter
NameDescription
defaultInstanceMessageType

Methods

<Type>addExtension(ExtensionLite<MessageType,List<Type>> extension, Type value)

public final BuilderType <Type>addExtension(ExtensionLite<MessageType,List<Type>> extension, Type value)

Append a value to a repeated extension.

Parameters
NameDescription
extensionExtensionLite<MessageType,List<Type>>
valueType
Returns
TypeDescription
BuilderType

<Type>getExtension(ExtensionLite<MessageType,Type> extension)

public final Type <Type>getExtension(ExtensionLite<MessageType,Type> extension)

Get the value of an extension.

Parameter
NameDescription
extensionExtensionLite<MessageType,Type>
Returns
TypeDescription
Type

<Type>getExtension(ExtensionLite<MessageType,List<Type>> extension, int index)

public final Type <Type>getExtension(ExtensionLite<MessageType,List<Type>> extension, int index)

Get one element of a repeated extension.

Parameters
NameDescription
extensionExtensionLite<MessageType,List<Type>>
indexint
Returns
TypeDescription
Type

<Type>getExtensionCount(ExtensionLite<MessageType,List<Type>> extension)

public final int <Type>getExtensionCount(ExtensionLite<MessageType,List<Type>> extension)

Get the number of elements in a repeated extension.

Parameter
NameDescription
extensionExtensionLite<MessageType,List<Type>>
Returns
TypeDescription
int

<Type>hasExtension(ExtensionLite<MessageType,Type> extension)

public final boolean <Type>hasExtension(ExtensionLite<MessageType,Type> extension)

Check if a singular extension is present.

Parameter
NameDescription
extensionExtensionLite<MessageType,Type>
Returns
TypeDescription
boolean

<Type>setExtension(ExtensionLite<MessageType,Type> extension, Type value)

public final BuilderType <Type>setExtension(ExtensionLite<MessageType,Type> extension, Type value)

Set the value of an extension.

Parameters
NameDescription
extensionExtensionLite<MessageType,Type>
valueType
Returns
TypeDescription
BuilderType

<Type>setExtension(ExtensionLite<MessageType,List<Type>> extension, int index, Type value)

public final BuilderType <Type>setExtension(ExtensionLite<MessageType,List<Type>> extension, int index, Type value)

Set the value of one element of a repeated extension.

Parameters
NameDescription
extensionExtensionLite<MessageType,List<Type>>
indexint
valueType
Returns
TypeDescription
BuilderType

buildPartial()

public final MessageType buildPartial()
Returns
TypeDescription
MessageType
Overrides

clearExtension(ExtensionLite<MessageType,?> extension)

public final BuilderType clearExtension(ExtensionLite<MessageType,?> extension)

Clear an extension.

Parameter
NameDescription
extensionExtensionLite<MessageType,?>
Returns
TypeDescription
BuilderType

copyOnWriteInternal()

protected void copyOnWriteInternal()
Overrides