Package io.protostuff.runtime
Class PolymorphicSchema
java.lang.Object
io.protostuff.runtime.PolymorphicSchema
- Direct Known Subclasses:
ArraySchema
,ArraySchemas.Base
,ClassSchema
,NumberSchema
,ObjectSchema
,PolymorphicCollectionSchema
,PolymorphicEnumSchema
,PolymorphicMapSchema
,PolymorphicPojoCollectionSchema
,PolymorphicPojoMapSchema
,PolymorphicPojoSchema
,PolymorphicThrowableSchema
Used when the type is either polymorphic or too complex. Unlike DerivativeSchema, this is designed to have no concept
of merging.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
A factory which creates a schema with the handler connected to it.static interface
The handler who's job is to set the value to the owner. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Pipe.Schema
<Object> The pipe schema associated with this schema.boolean
isInitialized
(Object message) Returns true if there is no required field or if all the required fields are set.Creates the message/object tied to this schema.protected abstract void
Set the value to the owner.Gets the class of the message.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.protostuff.Schema
getFieldName, getFieldNumber, mergeFrom, messageFullName, messageName, writeTo
-
Field Details
-
strategy
-
-
Constructor Details
-
PolymorphicSchema
-
-
Method Details
-
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>
-
newMessage
Description copied from interface:Schema
Creates the message/object tied to this schema.- Specified by:
newMessage
in interfaceSchema<Object>
-
typeClass
Description copied from interface:Schema
Gets the class of the message. -
getPipeSchema
The pipe schema associated with this schema. -
setValue
Set the value to the owner.
-