Class PolymorphicMapSchema
java.lang.Object
io.protostuff.runtime.PolymorphicSchema
io.protostuff.runtime.PolymorphicMapSchema
Used when the type is an interface (Map/SortedMap).
-
Nested Class Summary
Nested classes/interfaces inherited from class PolymorphicSchema
PolymorphicSchema.Factory, PolymorphicSchema.Handler -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final IdentityHashMap<Class<?>, Integer> (package private) static final Field(package private) static final Field(package private) static final Field(package private) static final Field(package private) static final Field(package private) static final Field(package private) static final Field(package private) static final Field(package private) static final Field(package private) static final Field(package private) static final Field(package private) static final RuntimeEnv.Instantiator<?> (package private) static final RuntimeEnv.Instantiator<?> (package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) static final RuntimeEnv.Instantiator<?> (package private) static final RuntimeEnv.Instantiator<?> (package private) static final RuntimeEnv.Instantiator<?> (package private) static final RuntimeEnv.Instantiator<?> (package private) static final RuntimeEnv.Instantiator<?> protected final Pipe.Schema<Object> (package private) static final String(package private) static final String(package private) static final String(package private) static final String(package private) static final String(package private) static final String(package private) static final String(package private) static final StringFields inherited from class PolymorphicSchema
strategy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static ObjectfillSingletonMapFrom(Input input, Schema<?> schema, Object owner, IdStrategy strategy, boolean graph, Object map) Return true togetFieldName(int number) Gets the field name associated with the number.intgetFieldNumber(String name) Gets the field number associated with the name.The pipe schema associated with this schema.(package private) static int(package private) static ObjectinstanceFrom(int id) private static Class<?> voidDeserializes a message/object from theinput.Returns the full name of the message tied to this schema.Returns the simple name of the message tied to this schema.(package private) static Stringname(int number) (package private) static intnumber(char c) (package private) static intprivate static ObjectreadCheckedMapFrom(Input input, Schema<?> schema, Object owner, IdStrategy strategy, boolean graph, Object map, boolean sm) (package private) static ObjectreadObjectFrom(Input input, Schema<?> schema, Object owner, IdStrategy strategy) (package private) static ObjectreadObjectFrom(Input input, Schema<?> schema, Object owner, IdStrategy strategy, int number) private static ObjectreadSynchronizedMapFrom(Input input, Schema<?> schema, Object owner, IdStrategy strategy, boolean graph, Object map, boolean sm) private static ObjectreadUnmodifiableMapFrom(Input input, Schema<?> schema, Object owner, IdStrategy strategy, boolean graph, Object map, boolean sm) (package private) static voidtransferObject(Pipe.Schema<Object> pipeSchema, Pipe pipe, Input input, Output output, IdStrategy strategy) (package private) static voidtransferObject(Pipe.Schema<Object> pipeSchema, Pipe pipe, Input input, Output output, IdStrategy strategy, int number) (package private) static voidtransferSingletonMap(Pipe.Schema<Object> pipeSchema, Pipe pipe, Input input, Output output, IdStrategy strategy) private static voidwriteCheckedMapTo(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy, int id) (package private) static voidwriteNonPublicMapTo(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy) (package private) static voidwriteObjectTo(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy) private static voidwriteSynchronizedMapTo(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy, int id) voidSerializes a message/object to theoutput.private static voidwriteUnmodifiableMapTo(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy, int id) Methods inherited from class PolymorphicSchema
isInitialized, newMessage, setValue, typeClass
-
Field Details
-
ID_EMPTY_MAP
static final int ID_EMPTY_MAP- See Also:
-
ID_SINGLETON_MAP
static final int ID_SINGLETON_MAP- See Also:
-
ID_UNMODIFIABLE_MAP
static final int ID_UNMODIFIABLE_MAP- See Also:
-
ID_UNMODIFIABLE_SORTED_MAP
static final int ID_UNMODIFIABLE_SORTED_MAP- See Also:
-
ID_SYNCHRONIZED_MAP
static final int ID_SYNCHRONIZED_MAP- See Also:
-
ID_SYNCHRONIZED_SORTED_MAP
static final int ID_SYNCHRONIZED_SORTED_MAP- See Also:
-
ID_CHECKED_MAP
static final int ID_CHECKED_MAP- See Also:
-
ID_CHECKED_SORTED_MAP
static final int ID_CHECKED_SORTED_MAP- See Also:
-
STR_EMPTY_MAP
- See Also:
-
STR_SINGLETON_MAP
- See Also:
-
STR_UNMODIFIABLE_MAP
- See Also:
-
STR_UNMODIFIABLE_SORTED_MAP
- See Also:
-
STR_SYNCHRONIZED_MAP
- See Also:
-
STR_SYNCHRONIZED_SORTED_MAP
- See Also:
-
STR_CHECKED_MAP
- See Also:
-
STR_CHECKED_SORTED_MAP
- See Also:
-
__nonPublicMaps
-
fSingletonMap_k
-
fSingletonMap_v
-
fUnmodifiableMap_m
-
fUnmodifiableSortedMap_sm
-
fSynchronizedMap_m
-
fSynchronizedSortedMap_sm
-
fSynchronizedMap_mutex
-
fCheckedMap_m
-
fCheckedSortedMap_sm
-
fCheckedMap_keyType
-
fCheckedMap_valueType
-
iSingletonMap
-
iUnmodifiableMap
-
iUnmodifiableSortedMap
-
iSynchronizedMap
-
iSynchronizedSortedMap
-
iCheckedMap
-
iCheckedSortedMap
-
pipeSchema
-
-
Constructor Details
-
PolymorphicMapSchema
-
-
Method Details
-
map
-
name
-
number
-
number
static int number(char c) -
getPipeSchema
Description copied from class:PolymorphicSchemaThe pipe schema associated with this schema.- Specified by:
getPipeSchemain classPolymorphicSchema
-
getFieldName
-
getFieldNumber
-
messageFullName
-
messageName
-
mergeFrom
Description copied from interface:SchemaDeserializes a message/object from theinput.- Throws:
IOException
-
writeTo
Description copied from interface:SchemaSerializes a message/object to theoutput.- Throws:
IOException
-
idFrom
-
instanceFrom
-
writeObjectTo
static void writeObjectTo(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy) throws IOException - Throws:
IOException
-
writeNonPublicMapTo
static void writeNonPublicMapTo(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy) throws IOException - Throws:
IOException
-
writeUnmodifiableMapTo
private static void writeUnmodifiableMapTo(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy, int id) throws IOException - Throws:
IOException
-
writeSynchronizedMapTo
private static void writeSynchronizedMapTo(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy, int id) throws IOException - Throws:
IOException
-
writeCheckedMapTo
private static void writeCheckedMapTo(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy, int id) throws IOException - Throws:
IOException
-
readObjectFrom
static Object readObjectFrom(Input input, Schema<?> schema, Object owner, IdStrategy strategy) throws IOException - Throws:
IOException
-
readObjectFrom
static Object readObjectFrom(Input input, Schema<?> schema, Object owner, IdStrategy strategy, int number) throws IOException - Throws:
IOException
-
fillSingletonMapFrom
private static Object fillSingletonMapFrom(Input input, Schema<?> schema, Object owner, IdStrategy strategy, boolean graph, Object map) throws IOException Return true to- Throws:
IOException
-
readUnmodifiableMapFrom
private static Object readUnmodifiableMapFrom(Input input, Schema<?> schema, Object owner, IdStrategy strategy, boolean graph, Object map, boolean sm) throws IOException - Throws:
IOException
-
readSynchronizedMapFrom
private static Object readSynchronizedMapFrom(Input input, Schema<?> schema, Object owner, IdStrategy strategy, boolean graph, Object map, boolean sm) throws IOException - Throws:
IOException
-
readCheckedMapFrom
private static Object readCheckedMapFrom(Input input, Schema<?> schema, Object owner, IdStrategy strategy, boolean graph, Object map, boolean sm) throws IOException - Throws:
IOException
-
transferObject
static void transferObject(Pipe.Schema<Object> pipeSchema, Pipe pipe, Input input, Output output, IdStrategy strategy) throws IOException - Throws:
IOException
-
transferObject
static void transferObject(Pipe.Schema<Object> pipeSchema, Pipe pipe, Input input, Output output, IdStrategy strategy, int number) throws IOException - Throws:
IOException
-
transferSingletonMap
static void transferSingletonMap(Pipe.Schema<Object> pipeSchema, Pipe pipe, Input input, Output output, IdStrategy strategy) throws IOException - Throws:
IOException
-