Package com.google.protobuf
Class ExtensionSchemaLite
java.lang.Object
com.google.protobuf.ExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
com.google.protobuf.ExtensionSchemaLite
@CheckReturnValue
final class ExtensionSchemaLite
extends ExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) intextensionNumber(Map.Entry<?, ?> extension) Gets the field number of an extension entry.(package private) ObjectfindExtensionByNumber(ExtensionRegistryLite extensionRegistry, MessageLite defaultInstance, int number) Finds an extension by field number.(package private) FieldSet<GeneratedMessageLite.ExtensionDescriptor>getExtensions(Object message) Returns the extensionFieldSetfor the message instance.(package private) FieldSet<GeneratedMessageLite.ExtensionDescriptor>getMutableExtensions(Object message) Returns the extensionFieldSetand ensures it's mutable.(package private) booleanhasExtensions(MessageLite prototype) Returns true for messages that support extensions.(package private) voidmakeImmutable(Object message) Marks the extensionFieldSetas immutable.(package private) <UT,UB> UB parseExtension(Object containerMessage, Reader reader, Object extensionObject, ExtensionRegistryLite extensionRegistry, FieldSet<GeneratedMessageLite.ExtensionDescriptor> extensions, UB unknownFields, UnknownFieldSchema<UT, UB> unknownFieldSchema) Parses an extension.(package private) voidparseLengthPrefixedMessageSetItem(Reader reader, Object extensionObject, ExtensionRegistryLite extensionRegistry, FieldSet<GeneratedMessageLite.ExtensionDescriptor> extensions) Parses a length-prefixed MessageSet item from the reader.(package private) voidparseMessageSetItem(ByteString data, Object extensionObject, ExtensionRegistryLite extensionRegistry, FieldSet<GeneratedMessageLite.ExtensionDescriptor> extensions) Parses the entire content of aByteStringas one MessageSet item.(package private) voidserializeExtension(Writer writer, Map.Entry<?, ?> extension) Serializes one extension entry.(package private) voidsetExtensions(Object message, FieldSet<GeneratedMessageLite.ExtensionDescriptor> extensions) Replaces the extensionFieldSetfor the message instance.
-
Constructor Details
-
ExtensionSchemaLite
ExtensionSchemaLite()
-
-
Method Details
-
hasExtensions
Description copied from class:ExtensionSchemaReturns true for messages that support extensions.- Specified by:
hasExtensionsin classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
-
getExtensions
Description copied from class:ExtensionSchemaReturns the extensionFieldSetfor the message instance.- Specified by:
getExtensionsin classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
-
setExtensions
Description copied from class:ExtensionSchemaReplaces the extensionFieldSetfor the message instance.- Specified by:
setExtensionsin classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
-
getMutableExtensions
Description copied from class:ExtensionSchemaReturns the extensionFieldSetand ensures it's mutable.- Specified by:
getMutableExtensionsin classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
-
makeImmutable
Description copied from class:ExtensionSchemaMarks the extensionFieldSetas immutable.- Specified by:
makeImmutablein classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
-
parseExtension
<UT,UB> UB parseExtension(Object containerMessage, Reader reader, Object extensionObject, ExtensionRegistryLite extensionRegistry, FieldSet<GeneratedMessageLite.ExtensionDescriptor> extensions, UB unknownFields, UnknownFieldSchema<UT, UB> unknownFieldSchema) throws IOExceptionDescription copied from class:ExtensionSchemaParses an extension. Returns the passed-in unknownFields parameter if no unknown enum value is found or a modified unknownFields (a new instance if the passed-in unknownFields is null) containing unknown enum values found while parsing.- Specified by:
parseExtensionin classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>- Type Parameters:
UT- The type used to store unknown fields. It's either UnknownFieldSet in full runtime or UnknownFieldSetLite in lite runtime.- Throws:
IOException
-
extensionNumber
Description copied from class:ExtensionSchemaGets the field number of an extension entry.- Specified by:
extensionNumberin classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
-
serializeExtension
Description copied from class:ExtensionSchemaSerializes one extension entry.- Specified by:
serializeExtensionin classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>- Throws:
IOException
-
findExtensionByNumber
Object findExtensionByNumber(ExtensionRegistryLite extensionRegistry, MessageLite defaultInstance, int number) Description copied from class:ExtensionSchemaFinds an extension by field number.- Specified by:
findExtensionByNumberin classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
-
parseLengthPrefixedMessageSetItem
void parseLengthPrefixedMessageSetItem(Reader reader, Object extensionObject, ExtensionRegistryLite extensionRegistry, FieldSet<GeneratedMessageLite.ExtensionDescriptor> extensions) throws IOException Description copied from class:ExtensionSchemaParses a length-prefixed MessageSet item from the reader.- Specified by:
parseLengthPrefixedMessageSetItemin classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>- Throws:
IOException
-
parseMessageSetItem
void parseMessageSetItem(ByteString data, Object extensionObject, ExtensionRegistryLite extensionRegistry, FieldSet<GeneratedMessageLite.ExtensionDescriptor> extensions) throws IOException Description copied from class:ExtensionSchemaParses the entire content of aByteStringas one MessageSet item. UnlikeExtensionSchema.parseLengthPrefixedMessageSetItem(com.google.protobuf.Reader, java.lang.Object, com.google.protobuf.ExtensionRegistryLite, com.google.protobuf.FieldSet<T>), there isn't a length-prefix.- Specified by:
parseMessageSetItemin classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>- Throws:
IOException
-