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 Constructor Description ExtensionSchemaLite()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) intextensionNumber(java.util.Map.Entry<?,?> extension)Gets the field number of an extension entry.(package private) java.lang.ObjectfindExtensionByNumber(ExtensionRegistryLite extensionRegistry, MessageLite defaultInstance, int number)Finds an extension by field number.(package private) FieldSet<GeneratedMessageLite.ExtensionDescriptor>getExtensions(java.lang.Object message)Returns the extensionFieldSetfor the message instance.(package private) FieldSet<GeneratedMessageLite.ExtensionDescriptor>getMutableExtensions(java.lang.Object message)Returns the extensionFieldSetand ensures it's mutable.(package private) booleanhasExtensions(MessageLite prototype)Returns true for messages that support extensions.(package private) voidmakeImmutable(java.lang.Object message)Marks the extensionFieldSetas immutable.(package private) <UT,UB>
UBparseExtension(java.lang.Object containerMessage, Reader reader, java.lang.Object extensionObject, ExtensionRegistryLite extensionRegistry, FieldSet<GeneratedMessageLite.ExtensionDescriptor> extensions, UB unknownFields, UnknownFieldSchema<UT,UB> unknownFieldSchema)Parses an extension.(package private) voidparseLengthPrefixedMessageSetItem(Reader reader, java.lang.Object extensionObject, ExtensionRegistryLite extensionRegistry, FieldSet<GeneratedMessageLite.ExtensionDescriptor> extensions)Parses a length-prefixed MessageSet item from the reader.(package private) voidparseMessageSetItem(ByteString data, java.lang.Object extensionObject, ExtensionRegistryLite extensionRegistry, FieldSet<GeneratedMessageLite.ExtensionDescriptor> extensions)Parses the entire content of aByteStringas one MessageSet item.(package private) voidserializeExtension(Writer writer, java.util.Map.Entry<?,?> extension)Serializes one extension entry.(package private) voidsetExtensions(java.lang.Object message, FieldSet<GeneratedMessageLite.ExtensionDescriptor> extensions)Replaces the extensionFieldSetfor the message instance.
-
-
-
Method Detail
-
hasExtensions
boolean hasExtensions(MessageLite prototype)
Description copied from class:ExtensionSchemaReturns true for messages that support extensions.- Specified by:
hasExtensionsin classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
-
getExtensions
FieldSet<GeneratedMessageLite.ExtensionDescriptor> getExtensions(java.lang.Object message)
Description copied from class:ExtensionSchemaReturns the extensionFieldSetfor the message instance.- Specified by:
getExtensionsin classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
-
setExtensions
void setExtensions(java.lang.Object message, FieldSet<GeneratedMessageLite.ExtensionDescriptor> extensions)Description copied from class:ExtensionSchemaReplaces the extensionFieldSetfor the message instance.- Specified by:
setExtensionsin classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
-
getMutableExtensions
FieldSet<GeneratedMessageLite.ExtensionDescriptor> getMutableExtensions(java.lang.Object message)
Description copied from class:ExtensionSchemaReturns the extensionFieldSetand ensures it's mutable.- Specified by:
getMutableExtensionsin classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
-
makeImmutable
void makeImmutable(java.lang.Object message)
Description copied from class:ExtensionSchemaMarks the extensionFieldSetas immutable.- Specified by:
makeImmutablein classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
-
parseExtension
<UT,UB> UB parseExtension(java.lang.Object containerMessage, Reader reader, java.lang.Object extensionObject, ExtensionRegistryLite extensionRegistry, FieldSet<GeneratedMessageLite.ExtensionDescriptor> extensions, UB unknownFields, UnknownFieldSchema<UT,UB> unknownFieldSchema) throws java.io.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:
java.io.IOException
-
extensionNumber
int extensionNumber(java.util.Map.Entry<?,?> extension)
Description copied from class:ExtensionSchemaGets the field number of an extension entry.- Specified by:
extensionNumberin classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>
-
serializeExtension
void serializeExtension(Writer writer, java.util.Map.Entry<?,?> extension) throws java.io.IOException
Description copied from class:ExtensionSchemaSerializes one extension entry.- Specified by:
serializeExtensionin classExtensionSchema<GeneratedMessageLite.ExtensionDescriptor>- Throws:
java.io.IOException
-
findExtensionByNumber
java.lang.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, java.lang.Object extensionObject, ExtensionRegistryLite extensionRegistry, FieldSet<GeneratedMessageLite.ExtensionDescriptor> extensions) throws java.io.IOException
Description copied from class:ExtensionSchemaParses a length-prefixed MessageSet item from the reader.- Specified by:
parseLengthPrefixedMessageSetItemin 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: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:
java.io.IOException
-
-