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 interfaceA factory which creates a schema with the handler connected to it.static interfaceThe 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.booleanisInitialized(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 voidSet 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, waitMethods 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:SchemaReturns true if there is no required field or if all the required fields are set.- Specified by:
isInitializedin interfaceSchema<Object>
-
newMessage
Description copied from interface:SchemaCreates the message/object tied to this schema.- Specified by:
newMessagein interfaceSchema<Object>
-
typeClass
Description copied from interface:SchemaGets the class of the message. -
getPipeSchema
The pipe schema associated with this schema. -
setValue
Set the value to the owner.
-