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