Package com.google.protobuf
Class ExtensionSchemaFull
java.lang.Object
com.google.protobuf.ExtensionSchema<Descriptors.FieldDescriptor>
com.google.protobuf.ExtensionSchemaFull
-
Field Summary
Fields -
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.getExtensions(Object message) Returns the extensionFieldSetfor the message instance.private static <T> long(package private) FieldSet<Descriptors.FieldDescriptor>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<Descriptors.FieldDescriptor> extensions, UB unknownFields, UnknownFieldSchema<UT, UB> unknownFieldSchema) Parses an extension.(package private) voidparseLengthPrefixedMessageSetItem(Reader reader, Object extension, ExtensionRegistryLite extensionRegistry, FieldSet<Descriptors.FieldDescriptor> extensions) Parses a length-prefixed MessageSet item from the reader.(package private) voidparseMessageSetItem(ByteString data, Object extension, ExtensionRegistryLite extensionRegistry, FieldSet<Descriptors.FieldDescriptor> 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<Descriptors.FieldDescriptor> extensions) Replaces the extensionFieldSetfor the message instance.
-
Field Details
-
EXTENSION_FIELD_OFFSET
private static final long EXTENSION_FIELD_OFFSET
-
-
Constructor Details
-
ExtensionSchemaFull
ExtensionSchemaFull()
-
-
Method Details
-
getExtensionsFieldOffset
private static <T> long getExtensionsFieldOffset() -
hasExtensions
Description copied from class:ExtensionSchemaReturns true for messages that support extensions.- Specified by:
hasExtensionsin classExtensionSchema<Descriptors.FieldDescriptor>
-
getExtensions
Description copied from class:ExtensionSchemaReturns the extensionFieldSetfor the message instance.- Specified by:
getExtensionsin classExtensionSchema<Descriptors.FieldDescriptor>
-
setExtensions
Description copied from class:ExtensionSchemaReplaces the extensionFieldSetfor the message instance.- Specified by:
setExtensionsin classExtensionSchema<Descriptors.FieldDescriptor>
-
getMutableExtensions
Description copied from class:ExtensionSchemaReturns the extensionFieldSetand ensures it's mutable.- Specified by:
getMutableExtensionsin classExtensionSchema<Descriptors.FieldDescriptor>
-
makeImmutable
Description copied from class:ExtensionSchemaMarks the extensionFieldSetas immutable.- Specified by:
makeImmutablein classExtensionSchema<Descriptors.FieldDescriptor>
-
parseExtension
<UT,UB> UB parseExtension(Object containerMessage, Reader reader, Object extensionObject, ExtensionRegistryLite extensionRegistry, FieldSet<Descriptors.FieldDescriptor> 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<Descriptors.FieldDescriptor>- 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<Descriptors.FieldDescriptor>
-
serializeExtension
Description copied from class:ExtensionSchemaSerializes one extension entry.- Specified by:
serializeExtensionin classExtensionSchema<Descriptors.FieldDescriptor>- 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<Descriptors.FieldDescriptor>
-
parseLengthPrefixedMessageSetItem
void parseLengthPrefixedMessageSetItem(Reader reader, Object extension, ExtensionRegistryLite extensionRegistry, FieldSet<Descriptors.FieldDescriptor> extensions) throws IOException Description copied from class:ExtensionSchemaParses a length-prefixed MessageSet item from the reader.- Specified by:
parseLengthPrefixedMessageSetItemin classExtensionSchema<Descriptors.FieldDescriptor>- Throws:
IOException
-
parseMessageSetItem
void parseMessageSetItem(ByteString data, Object extension, ExtensionRegistryLite extensionRegistry, FieldSet<Descriptors.FieldDescriptor> 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<Descriptors.FieldDescriptor>- Throws:
IOException
-