Package com.google.protobuf
Class GeneratedMessageLite
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.GeneratedMessageLite
-
- All Implemented Interfaces:
MessageLite,MessageLiteOrBuilder,java.io.Serializable
- Direct Known Subclasses:
GeneratedMessageLite.ExtendableMessage
public abstract class GeneratedMessageLite extends AbstractMessageLite implements java.io.Serializable
Lite version ofGeneratedMessage.- Author:
- kenton@google.com Kenton Varda
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGeneratedMessageLite.Builder<MessageType extends GeneratedMessageLite,BuilderType extends GeneratedMessageLite.Builder>static classGeneratedMessageLite.ExtendableBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType>,BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>Lite equivalent ofGeneratedMessage.ExtendableBuilder.static classGeneratedMessageLite.ExtendableMessage<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType>>Lite equivalent ofGeneratedMessage.ExtendableMessage.static interfaceGeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage>Lite equivalent ofGeneratedMessage.ExtendableMessageOrBuilder.static classGeneratedMessageLite.GeneratedExtension<ContainingType extends MessageLite,Type>Lite equivalent toGeneratedMessage.GeneratedExtension.
-
Field Summary
-
Fields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGeneratedMessageLite()protectedGeneratedMessageLite(GeneratedMessageLite.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Parser<? extends MessageLite>getParserForType()Gets the parser for a message of the same type as this message.protected voidmakeExtensionsImmutable()Used by parsing constructors in generated classes.static <ContainingType extends MessageLite,Type>
GeneratedMessageLite.GeneratedExtension<ContainingType,Type>newRepeatedGeneratedExtension(ContainingType containingTypeDefaultInstance, MessageLite messageDefaultInstance, Internal.EnumLiteMap<?> enumTypeMap, int number, WireFormat.FieldType type, boolean isPacked, java.lang.Class singularType)For use by generated code only.static <ContainingType extends MessageLite,Type>
GeneratedMessageLite.GeneratedExtension<ContainingType,Type>newSingularGeneratedExtension(ContainingType containingTypeDefaultInstance, Type defaultValue, MessageLite messageDefaultInstance, Internal.EnumLiteMap<?> enumTypeMap, int number, WireFormat.FieldType type, java.lang.Class singularType)For use by generated code only.protected booleanparseUnknownField(CodedInputStream input, CodedOutputStream unknownFieldsCodedOutput, ExtensionRegistryLite extensionRegistry, int tag)Called by subclasses to parse an unknown field.protected java.lang.ObjectwriteReplace()Replaces this object in the output stream with a serialized form.-
Methods inherited from class com.google.protobuf.AbstractMessageLite
checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.google.protobuf.MessageLite
getSerializedSize, newBuilderForType, toBuilder, writeTo
-
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
-
-
-
Constructor Detail
-
GeneratedMessageLite
protected GeneratedMessageLite()
-
GeneratedMessageLite
protected GeneratedMessageLite(GeneratedMessageLite.Builder builder)
-
-
Method Detail
-
getParserForType
public Parser<? extends MessageLite> getParserForType()
Description copied from interface:MessageLiteGets the parser for a message of the same type as this message.- Specified by:
getParserForTypein interfaceMessageLite
-
parseUnknownField
protected boolean parseUnknownField(CodedInputStream input, CodedOutputStream unknownFieldsCodedOutput, ExtensionRegistryLite extensionRegistry, int tag) throws java.io.IOException
Called by subclasses to parse an unknown field.- Returns:
trueunless the tag is an end-group tag.- Throws:
java.io.IOException
-
makeExtensionsImmutable
protected void makeExtensionsImmutable()
Used by parsing constructors in generated classes.
-
newSingularGeneratedExtension
public static <ContainingType extends MessageLite,Type> GeneratedMessageLite.GeneratedExtension<ContainingType,Type> newSingularGeneratedExtension(ContainingType containingTypeDefaultInstance, Type defaultValue, MessageLite messageDefaultInstance, Internal.EnumLiteMap<?> enumTypeMap, int number, WireFormat.FieldType type, java.lang.Class singularType)
For use by generated code only.
-
newRepeatedGeneratedExtension
public static <ContainingType extends MessageLite,Type> GeneratedMessageLite.GeneratedExtension<ContainingType,Type> newRepeatedGeneratedExtension(ContainingType containingTypeDefaultInstance, MessageLite messageDefaultInstance, Internal.EnumLiteMap<?> enumTypeMap, int number, WireFormat.FieldType type, boolean isPacked, java.lang.Class singularType)
For use by generated code only.
-
writeReplace
protected java.lang.Object writeReplace() throws java.io.ObjectStreamExceptionReplaces this object in the output stream with a serialized form. Part of Java's serialization magic. Generated sub-classes must override this method by callingreturn super.writeReplace();- Returns:
- a SerializedForm of this message
- Throws:
java.io.ObjectStreamException
-
-