Package com.google.protobuf
Class ExtensionSchemaLite
java.lang.Object
com.google.protobuf.ExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
com.google.protobuf.ExtensionSchemaLite
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) int
extensionNumber
(Map.Entry<?, ?> extension) Gets the field number of an extension entry.(package private) Object
findExtensionByNumber
(ExtensionRegistryLite extensionRegistry, MessageLite defaultInstance, int number) Finds an extension by field number.(package private) FieldSet
<GeneratedMessageLite.ExtensionDescriptor> getExtensions
(Object message) Returns the extensionFieldSet
for the message instance.(package private) FieldSet
<GeneratedMessageLite.ExtensionDescriptor> getMutableExtensions
(Object message) Returns the extensionFieldSet
and ensures it's mutable.(package private) boolean
hasExtensions
(MessageLite prototype) Returns true for messages that support extensions.(package private) void
makeImmutable
(Object message) Marks the extensionFieldSet
as 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) void
parseLengthPrefixedMessageSetItem
(Reader reader, Object extensionObject, ExtensionRegistryLite extensionRegistry, FieldSet<GeneratedMessageLite.ExtensionDescriptor> extensions) Parses a length-prefixed MessageSet item from the reader.(package private) void
parseMessageSetItem
(ByteString data, Object extensionObject, ExtensionRegistryLite extensionRegistry, FieldSet<GeneratedMessageLite.ExtensionDescriptor> extensions) Parses the entire content of aByteString
as one MessageSet item.(package private) void
serializeExtension
(Writer writer, Map.Entry<?, ?> extension) Serializes one extension entry.(package private) void
setExtensions
(Object message, FieldSet<GeneratedMessageLite.ExtensionDescriptor> extensions) Replaces the extensionFieldSet
for the message instance.
-
Constructor Details
-
ExtensionSchemaLite
ExtensionSchemaLite()
-
-
Method Details
-
hasExtensions
Description copied from class:ExtensionSchema
Returns true for messages that support extensions.- Specified by:
hasExtensions
in classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
-
getExtensions
Description copied from class:ExtensionSchema
Returns the extensionFieldSet
for the message instance.- Specified by:
getExtensions
in classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
-
setExtensions
Description copied from class:ExtensionSchema
Replaces the extensionFieldSet
for the message instance.- Specified by:
setExtensions
in classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
-
getMutableExtensions
Description copied from class:ExtensionSchema
Returns the extensionFieldSet
and ensures it's mutable.- Specified by:
getMutableExtensions
in classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
-
makeImmutable
Description copied from class:ExtensionSchema
Marks the extensionFieldSet
as immutable.- Specified by:
makeImmutable
in 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:ExtensionSchema
Parses 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:
parseExtension
in 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:ExtensionSchema
Gets the field number of an extension entry.- Specified by:
extensionNumber
in classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
-
serializeExtension
Description copied from class:ExtensionSchema
Serializes one extension entry.- Specified by:
serializeExtension
in classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
- Throws:
IOException
-
findExtensionByNumber
Object findExtensionByNumber(ExtensionRegistryLite extensionRegistry, MessageLite defaultInstance, int number) Description copied from class:ExtensionSchema
Finds an extension by field number.- Specified by:
findExtensionByNumber
in classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
-
parseLengthPrefixedMessageSetItem
void parseLengthPrefixedMessageSetItem(Reader reader, Object extensionObject, ExtensionRegistryLite extensionRegistry, FieldSet<GeneratedMessageLite.ExtensionDescriptor> extensions) throws IOException Description copied from class:ExtensionSchema
Parses a length-prefixed MessageSet item from the reader.- Specified by:
parseLengthPrefixedMessageSetItem
in classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
- Throws:
IOException
-
parseMessageSetItem
void parseMessageSetItem(ByteString data, Object extensionObject, ExtensionRegistryLite extensionRegistry, FieldSet<GeneratedMessageLite.ExtensionDescriptor> extensions) throws IOException Description copied from class:ExtensionSchema
Parses the entire content of aByteString
as 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:
parseMessageSetItem
in classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
- Throws:
IOException
-