Package io.protostuff.runtime
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 io.protostuff.runtime.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 String
Fields inherited from class io.protostuff.runtime.PolymorphicSchema
strategy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Object
fillSingletonMapFrom
(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.int
getFieldNumber
(String name) Gets the field number associated with the name.The pipe schema associated with this schema.(package private) static int
(package private) static Object
instanceFrom
(int id) private static Class
<?> void
Deserializes 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 String
name
(int number) (package private) static int
number
(char c) (package private) static int
private static Object
readCheckedMapFrom
(Input input, Schema<?> schema, Object owner, IdStrategy strategy, boolean graph, Object map, boolean sm) (package private) static Object
readObjectFrom
(Input input, Schema<?> schema, Object owner, IdStrategy strategy) (package private) static Object
readObjectFrom
(Input input, Schema<?> schema, Object owner, IdStrategy strategy, int number) private static Object
readSynchronizedMapFrom
(Input input, Schema<?> schema, Object owner, IdStrategy strategy, boolean graph, Object map, boolean sm) private static Object
readUnmodifiableMapFrom
(Input input, Schema<?> schema, Object owner, IdStrategy strategy, boolean graph, Object map, boolean sm) (package private) static void
transferObject
(Pipe.Schema<Object> pipeSchema, Pipe pipe, Input input, Output output, IdStrategy strategy) (package private) static void
transferObject
(Pipe.Schema<Object> pipeSchema, Pipe pipe, Input input, Output output, IdStrategy strategy, int number) (package private) static void
transferSingletonMap
(Pipe.Schema<Object> pipeSchema, Pipe pipe, Input input, Output output, IdStrategy strategy) private static void
writeCheckedMapTo
(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy, int id) (package private) static void
writeNonPublicMapTo
(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy) (package private) static void
writeObjectTo
(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy) private static void
writeSynchronizedMapTo
(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy, int id) void
Serializes a message/object to theoutput
.private static void
writeUnmodifiableMapTo
(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy, int id) Methods inherited from class io.protostuff.runtime.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:PolymorphicSchema
The pipe schema associated with this schema.- Specified by:
getPipeSchema
in classPolymorphicSchema
-
getFieldName
Description copied from interface:Schema
Gets the field name associated with the number. This is particularly useful when serializing to different formats (Eg. JSON). When using numeric field names:return String.valueOf(number);
-
getFieldNumber
Description copied from interface:Schema
Gets the field number associated with the name. This is particularly useful when serializing to different formats (Eg. JSON). When using numeric field names:return Integer.parseInt(name);
-
messageFullName
Description copied from interface:Schema
Returns the full name of the message tied to this schema. Allows custom schemas to provide a custom name other than typeClass().getName(); -
messageName
Description copied from interface:Schema
Returns the simple name of the message tied to this schema. Allows custom schemas to provide a custom name other than typeClass().getSimpleName(); -
mergeFrom
Description copied from interface:Schema
Deserializes a message/object from theinput
.- Throws:
IOException
-
writeTo
Description copied from interface:Schema
Serializes 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
-