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>
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.
| 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.
| 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>
|
<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.
| 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)
| Parameter |
| Name |
Description |
extension |
ExtensionLite<MessageType,?>
|
| Returns |
| Type |
Description |
BuilderType |
|
copyOnWriteInternal()
protected void copyOnWriteInternal()
Overrides
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-30 UTC."],[],[]]