Package io.protostuff.runtime
Class PolymorphicPojoCollectionSchema
java.lang.Object
io.protostuff.runtime.PolymorphicSchema
io.protostuff.runtime.PolymorphicPojoCollectionSchema
Will be used if
RuntimeEnv.POJO_SCHEMA_ON_COLLECTION_FIELDS
is enabled and the
field is assignable from Collection.-
Nested Class Summary
Nested classes/interfaces inherited from class io.protostuff.runtime.PolymorphicSchema
PolymorphicSchema.Factory, PolymorphicSchema.Handler
-
Field Summary
FieldsFields 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.boolean
isInitialized
(Object owner) Returns true if there is no required field or if all the required fields are set.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.Creates the message/object tied to this schema.(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) (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) Gets the class of the message.(package private) static void
writeObjectTo
(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy) void
Serializes a message/object to theoutput
.Methods inherited from class io.protostuff.runtime.PolymorphicSchema
setValue
-
Field Details
-
pipeSchema
-
-
Constructor Details
-
PolymorphicPojoCollectionSchema
-
-
Method Details
-
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);
-
isInitialized
Description copied from interface:Schema
Returns true if there is no required field or if all the required fields are set.- Specified by:
isInitialized
in interfaceSchema<Object>
- Overrides:
isInitialized
in classPolymorphicSchema
-
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(); -
newMessage
Description copied from interface:Schema
Creates the message/object tied to this schema.- Specified by:
newMessage
in interfaceSchema<Object>
- Overrides:
newMessage
in classPolymorphicSchema
-
typeClass
Description copied from interface:Schema
Gets the class of the message.- Specified by:
typeClass
in interfaceSchema<Object>
- Overrides:
typeClass
in classPolymorphicSchema
-
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
-
writeObjectTo
static void writeObjectTo(Output output, Object value, Schema<?> currentSchema, IdStrategy strategy) 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
-
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
-