Package io.protostuff.runtime
Class PolymorphicCollectionSchema
java.lang.Object
io.protostuff.runtime.PolymorphicSchema
io.protostuff.runtime.PolymorphicCollectionSchema
Used when the type is an interface (Collection/List/Set/SortedSet).
-
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 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 RuntimeEnv.Instantiator
<?> (package private) static final RuntimeEnv.Instantiator
<?> (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 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 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
<?> (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
<?> (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
(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
(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 TypeMethodDescriptiongetFieldName
(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
readCheckedCollectionFrom
(Input input, Schema<?> schema, Object owner, IdStrategy strategy, boolean graph, Object collection, boolean ss, boolean list) (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
readSynchronizedCollectionFrom
(Input input, Schema<?> schema, Object owner, IdStrategy strategy, boolean graph, Object collection, boolean ss, boolean list) private static Object
readUnmodifiableCollectionFrom
(Input input, Schema<?> schema, Object owner, IdStrategy strategy, boolean graph, Object collection, boolean ss, boolean list) (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) private static void
writeCheckedCollectionTo
(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy, int id) (package private) static void
writeNonPublicCollectionTo
(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy) (package private) static void
writeObjectTo
(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy) private static void
writeSynchronizedCollectionTo
(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy, int id) void
Serializes a message/object to theoutput
.private static void
writeUnmodifiableCollectionTo
(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_SET
static final int ID_EMPTY_SET- See Also:
-
ID_EMPTY_LIST
static final int ID_EMPTY_LIST- See Also:
-
ID_SINGLETON_SET
static final int ID_SINGLETON_SET- See Also:
-
ID_SINGLETON_LIST
static final int ID_SINGLETON_LIST- See Also:
-
ID_SET_FROM_MAP
static final int ID_SET_FROM_MAP- See Also:
-
ID_COPIES_LIST
static final int ID_COPIES_LIST- See Also:
-
ID_UNMODIFIABLE_COLLECTION
static final int ID_UNMODIFIABLE_COLLECTION- See Also:
-
ID_UNMODIFIABLE_SET
static final int ID_UNMODIFIABLE_SET- See Also:
-
ID_UNMODIFIABLE_SORTED_SET
static final int ID_UNMODIFIABLE_SORTED_SET- See Also:
-
ID_UNMODIFIABLE_LIST
static final int ID_UNMODIFIABLE_LIST- See Also:
-
ID_UNMODIFIABLE_RANDOM_ACCESS_LIST
static final int ID_UNMODIFIABLE_RANDOM_ACCESS_LIST- See Also:
-
ID_SYNCHRONIZED_COLLECTION
static final int ID_SYNCHRONIZED_COLLECTION- See Also:
-
ID_SYNCHRONIZED_SET
static final int ID_SYNCHRONIZED_SET- See Also:
-
ID_SYNCHRONIZED_SORTED_SET
static final int ID_SYNCHRONIZED_SORTED_SET- See Also:
-
ID_SYNCHRONIZED_LIST
static final int ID_SYNCHRONIZED_LIST- See Also:
-
ID_SYNCHRONIZED_RANDOM_ACCESS_LIST
static final int ID_SYNCHRONIZED_RANDOM_ACCESS_LIST- See Also:
-
ID_CHECKED_COLLECTION
static final int ID_CHECKED_COLLECTION- See Also:
-
ID_CHECKED_SET
static final int ID_CHECKED_SET- See Also:
-
ID_CHECKED_SORTED_SET
static final int ID_CHECKED_SORTED_SET- See Also:
-
ID_CHECKED_LIST
static final int ID_CHECKED_LIST- See Also:
-
ID_CHECKED_RANDOM_ACCESS_LIST
static final int ID_CHECKED_RANDOM_ACCESS_LIST- See Also:
-
STR_EMPTY_SET
- See Also:
-
STR_EMPTY_LIST
- See Also:
-
STR_SINGLETON_SET
- See Also:
-
STR_SINGLETON_LIST
- See Also:
-
STR_SET_FROM_MAP
- See Also:
-
STR_COPIES_LIST
- See Also:
-
STR_UNMODIFIABLE_COLLECTION
- See Also:
-
STR_UNMODIFIABLE_SET
- See Also:
-
STR_UNMODIFIABLE_SORTED_SET
- See Also:
-
STR_UNMODIFIABLE_LIST
- See Also:
-
STR_UNMODIFIABLE_RANDOM_ACCESS_LIST
- See Also:
-
STR_SYNCHRONIZED_COLLECTION
- See Also:
-
STR_SYNCHRONIZED_SET
- See Also:
-
STR_SYNCHRONIZED_SORTED_SET
- See Also:
-
STR_SYNCHRONIZED_LIST
- See Also:
-
STR_SYNCHRONIZED_RANDOM_ACCESS_LIST
- See Also:
-
STR_CHECKED_COLLECTION
- See Also:
-
STR_CHECKED_SET
- See Also:
-
STR_CHECKED_SORTED_SET
- See Also:
-
STR_CHECKED_LIST
- See Also:
-
STR_CHECKED_RANDOM_ACCESS_LIST
- See Also:
-
__nonPublicCollections
-
fSingletonSet_element
-
fSingletonList_element
-
fUnmodifiableCollection_c
-
fUnmodifiableSortedSet_ss
-
fUnmodifiableList_list
-
fSynchronizedCollection_c
-
fSynchronizedSortedSet_ss
-
fSynchronizedList_list
-
fSynchronizedCollection_mutex
-
fCheckedCollection_c
-
fCheckedSortedSet_ss
-
fCheckedList_list
-
fCheckedCollection_type
-
fSetFromMap_m
-
fSetFromMap_s
-
fCopiesList_n
-
fCopiesList_element
-
iSingletonSet
-
iSingletonList
-
iUnmodifiableCollection
-
iUnmodifiableSet
-
iUnmodifiableSortedSet
-
iUnmodifiableList
-
iUnmodifiableRandomAccessList
-
iSynchronizedCollection
-
iSynchronizedSet
-
iSynchronizedSortedSet
-
iSynchronizedList
-
iSynchronizedRandomAccessList
-
iCheckedCollection
-
iCheckedSet
-
iCheckedSortedSet
-
iCheckedList
-
iCheckedRandomAccessList
-
iSetFromMap
-
iCopiesList
-
pipeSchema
-
-
Constructor Details
-
PolymorphicCollectionSchema
-
-
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
-
writeNonPublicCollectionTo
static void writeNonPublicCollectionTo(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy) throws IOException - Throws:
IOException
-
writeUnmodifiableCollectionTo
private static void writeUnmodifiableCollectionTo(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy, int id) throws IOException - Throws:
IOException
-
writeSynchronizedCollectionTo
private static void writeSynchronizedCollectionTo(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy, int id) throws IOException - Throws:
IOException
-
writeCheckedCollectionTo
private static void writeCheckedCollectionTo(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
-
readUnmodifiableCollectionFrom
private static Object readUnmodifiableCollectionFrom(Input input, Schema<?> schema, Object owner, IdStrategy strategy, boolean graph, Object collection, boolean ss, boolean list) throws IOException - Throws:
IOException
-
readSynchronizedCollectionFrom
private static Object readSynchronizedCollectionFrom(Input input, Schema<?> schema, Object owner, IdStrategy strategy, boolean graph, Object collection, boolean ss, boolean list) throws IOException - Throws:
IOException
-
readCheckedCollectionFrom
private static Object readCheckedCollectionFrom(Input input, Schema<?> schema, Object owner, IdStrategy strategy, boolean graph, Object collection, boolean ss, boolean list) 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
-