Send feedback
Class GeneratedMessageLite<MessageType,BuilderType> (3.19.4)
Stay organized with collections
Save and categorize content based on your preferences.
public abstract class GeneratedMessageLite<MessageType , BuilderType > extends AbstractMessageLite<MessageType , BuilderType >
Type Parameters
Name
Description
MessageType
BuilderType
Static Methods
public static GeneratedMessageLite . GeneratedExtension<ContainingType , Type > <ContainingType , Type>newRepeatedGeneratedExtension ( ContainingType containingTypeDefaultInstance , MessageLite messageDefaultInstance , Internal . EnumLiteMap <? > enumTypeMap , int number , WireFormat . FieldType type , boolean isPacked , Class singularType )
For use by generated code only.
public static GeneratedMessageLite . GeneratedExtension<ContainingType , Type > <ContainingType , Type>newSingularGeneratedExtension ( ContainingType containingTypeDefaultInstance , Type defaultValue , MessageLite messageDefaultInstance , Internal . EnumLiteMap <? > enumTypeMap , int number , WireFormat . FieldType type , Class singularType )
For use by generated code only.
<E>emptyProtobufList()
protected static Internal . ProtobufList<E> <E>emptyProtobufList ()
<E>mutableCopy(Internal.ProtobufList<E> list)
protected static Internal . ProtobufList<E> <E>mutableCopy ( Internal . ProtobufList<E> list )
<T>isInitialized(T message, boolean shouldMemoize)
protected static final boolean <T>isInitialized ( T message , boolean shouldMemoize )
A static helper method for checking if a message is initialized, optionally memoizing.
For use by generated code only.
Parameters
Name
Description
message
T
shouldMemoize
boolean
protected static T <T>parseDelimitedFrom ( T defaultInstance , InputStream input )
Parameters
Name
Description
defaultInstance
T
input
InputStream
Returns
Type
Description
T
protected static T <T>parseDelimitedFrom ( T defaultInstance , InputStream input , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
T
<T>parseFrom(T defaultInstance, byte[] data)
protected static T <T>parseFrom ( T defaultInstance , byte [] data )
Parameters
Name
Description
defaultInstance
T
data
byte []
Returns
Type
Description
T
<T>parseFrom(T defaultInstance, byte[] data, ExtensionRegistryLite extensionRegistry)
protected static T <T>parseFrom ( T defaultInstance , byte [] data , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
T
<T>parseFrom(T defaultInstance, ByteString data)
protected static T <T>parseFrom ( T defaultInstance , ByteString data )
Parameters
Name
Description
defaultInstance
T
data
ByteString
Returns
Type
Description
T
<T>parseFrom(T defaultInstance, ByteString data, ExtensionRegistryLite extensionRegistry)
protected static T <T>parseFrom ( T defaultInstance , ByteString data , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
T
protected static T <T>parseFrom ( T defaultInstance , CodedInputStream input )
Returns
Type
Description
T
protected static T <T>parseFrom ( T defaultInstance , CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
T
protected static T <T>parseFrom ( T defaultInstance , InputStream input )
Parameters
Name
Description
defaultInstance
T
input
InputStream
Returns
Type
Description
T
protected static T <T>parseFrom ( T defaultInstance , InputStream input , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
T
<T>parseFrom(T defaultInstance, ByteBuffer data)
protected static T <T>parseFrom ( T defaultInstance , ByteBuffer data )
Parameters
Name
Description
defaultInstance
T
data
ByteBuffer
Returns
Type
Description
T
<T>parseFrom(T defaultInstance, ByteBuffer data, ExtensionRegistryLite extensionRegistry)
protected static T <T>parseFrom ( T defaultInstance , ByteBuffer data , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
T
protected static T <T>parsePartialFrom ( T defaultInstance , CodedInputStream input )
Returns
Type
Description
T
<T>registerDefaultInstance(Class<T> clazz, T defaultInstance)
protected static void <T>registerDefaultInstance ( Class<T> clazz , T defaultInstance )
Parameters
Name
Description
clazz
Class <T >
defaultInstance
T
emptyBooleanList()
protected static Internal . BooleanList emptyBooleanList ()
emptyDoubleList()
protected static Internal . DoubleList emptyDoubleList ()
emptyFloatList()
protected static Internal . FloatList emptyFloatList ()
emptyIntList()
protected static Internal . IntList emptyIntList ()
emptyLongList()
protected static Internal . LongList emptyLongList ()
mutableCopy(Internal.BooleanList list)
protected static Internal . BooleanList mutableCopy ( Internal . BooleanList list )
mutableCopy(Internal.DoubleList list)
protected static Internal . DoubleList mutableCopy ( Internal . DoubleList list )
mutableCopy(Internal.FloatList list)
protected static Internal . FloatList mutableCopy ( Internal . FloatList list )
mutableCopy(Internal.IntList list)
protected static Internal . IntList mutableCopy ( Internal . IntList list )
mutableCopy(Internal.LongList list)
protected static Internal . LongList mutableCopy ( Internal . LongList list )
newMessageInfo(MessageLite defaultInstance, String info, Object[] objects)
protected static Object newMessageInfo ( MessageLite defaultInstance , String info , Object [] objects )
Returns
Type
Description
Object
Constructors
GeneratedMessageLite()
public GeneratedMessageLite ()
Fields
memoizedSerializedSize
protected int memoizedSerializedSize
For use by generated code only.
Field Value
Type
Description
int
unknownFields
protected UnknownFieldSetLite unknownFields
For use by generated code only. Lazily initialized to reduce allocations.
Methods
<MessageType,BuilderType>createBuilder()
protected final BuilderType <MessageType , BuilderType>createBuilder ()
Returns
Type
Description
BuilderType
<MessageType,BuilderType>createBuilder(MessageType prototype)
protected final BuilderType <MessageType , BuilderType>createBuilder ( MessageType prototype )
Parameter
Name
Description
prototype
MessageType
Returns
Type
Description
BuilderType
dynamicMethod(GeneratedMessageLite.MethodToInvoke method)
protected Object dynamicMethod ( GeneratedMessageLite . MethodToInvoke method )
Returns
Type
Description
Object
dynamicMethod(GeneratedMessageLite.MethodToInvoke method, Object arg0)
protected Object dynamicMethod ( GeneratedMessageLite . MethodToInvoke method , Object arg0 )
Returns
Type
Description
Object
dynamicMethod(GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
protected abstract Object dynamicMethod ( GeneratedMessageLite . MethodToInvoke method , Object arg0 , Object arg1 )
A method that implements different types of operations described in MethodToInvoke .
These different kinds of operations are required to implement message-level operations for
builders in the runtime. This method bundles those operations to reduce the generated methods
count.
NEW_INSTANCE
returns a new instance of the protocol buffer that has not yet been
made immutable. See MAKE_IMMUTABLE
.
IS_INITIALIZED
returns null
for false and the default instance for true.
It doesn't use or modify any memoized value.
GET_MEMOIZED_IS_INITIALIZED
returns the memoized isInitialized
byte
value.
SET_MEMOIZED_IS_INITIALIZED
sets the memoized isInitialized
byte value to
1 if the first parameter is not null, or to 0 if the first parameter is null.
NEW_BUILDER
returns a BuilderType
instance.
This method, plus the implementation of the Builder, enables the Builder class to be proguarded
away entirely on Android.
For use by generated code only.
Returns
Type
Description
Object
equals(Object other)
public boolean equals ( Object other )
Parameter
Name
Description
other
Object
Overrides
getDefaultInstanceForType()
public final MessageType getDefaultInstanceForType ()
Returns
Type
Description
MessageType
getParserForType()
public final Parser<MessageType> getParserForType ()
Returns
Type
Description
Parser <MessageType >
getSerializedSize()
public int getSerializedSize ()
Returns
Type
Description
int
hashCode()
Returns
Type
Description
int
Overrides
isInitialized()
public final boolean isInitialized ()
makeImmutable()
protected void makeImmutable ()
Called by subclasses to complete parsing. For use by generated code only.
mergeLengthDelimitedField(int fieldNumber, ByteString value)
protected void mergeLengthDelimitedField ( int fieldNumber , ByteString value )
Called by subclasses to parse an unknown field. For use by generated code only.
mergeUnknownFields(UnknownFieldSetLite unknownFields)
protected final void mergeUnknownFields ( UnknownFieldSetLite unknownFields )
Merge some unknown fields into the UnknownFieldSetLite for this message.
For use by generated code only.
mergeVarintField(int tag, int value)
protected void mergeVarintField ( int tag , int value )
Called by subclasses to parse an unknown field. For use by generated code only.
Parameters
Name
Description
tag
int
value
int
newBuilderForType()
public final BuilderType newBuilderForType ()
Returns
Type
Description
BuilderType
protected boolean parseUnknownField ( int tag , CodedInputStream input )
Called by subclasses to parse an unknown field. For use by generated code only.
Returns
Type
Description
boolean
true
unless the tag is an end-group tag.
toBuilder()
public final BuilderType toBuilder ()
Returns
Type
Description
BuilderType
toString()
A reflective toString function. This is primarily intended as a developer aid, while keeping
binary size down. The first line of the toString()
representation includes a commented
version of super.toString()
to act as an indicator that this should not be relied on
for comparisons.
NOTE: This method relies on the field getter methods not being stripped or renamed by
proguard. If they are, the fields will not be included in the returned string representation.
NOTE: This implementation is liable to change in the future, and should not be relied on in
code.
Returns
Type
Description
String
Overrides
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Send feedback
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-02-06 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-06 UTC."],[],[]]