Class GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType> (3.19.4)

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

Name Description
MessageType
BuilderType

Constructors

ExtendableBuilder(MessageType defaultInstance)

protected ExtendableBuilder(MessageType defaultInstance)
Parameter
Name Description
defaultInstance MessageType

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
Name Description
extension ExtensionLite<MessageType,List<Type>>
value Type
Returns
Type Description
BuilderType

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

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

Get the value of an extension.

Parameter
Name Description
extension ExtensionLite<MessageType,Type>
Returns
Type Description
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
Name Description
extension ExtensionLite<MessageType,List<Type>>
index int
Returns
Type Description
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
Name Description
extension ExtensionLite<MessageType,List<Type>>
Returns
Type Description
int

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

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

Check if a singular extension is present.

Parameter
Name Description
extension ExtensionLite<MessageType,Type>
Returns
Type Description
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
Name Description
extension ExtensionLite<MessageType,Type>
value Type
Returns
Type Description
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
Name Description
extension ExtensionLite<MessageType,List<Type>>
index int
value Type
Returns
Type Description
BuilderType

buildPartial()

public final MessageType buildPartial()
Returns
Type Description
MessageType
Overrides

clearExtension(ExtensionLite<MessageType,?> extension)

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

Clear an extension.

Parameter
Name Description
extension ExtensionLite<MessageType,?>
Returns
Type Description
BuilderType

copyOnWriteInternal()

protected void copyOnWriteInternal()
Overrides