com.dyuproject.protostuff.runtime
Class PolymorphicSchema
java.lang.Object
com.dyuproject.protostuff.runtime.PolymorphicSchema
- All Implemented Interfaces:
- Schema<java.lang.Object>
- Direct Known Subclasses:
- ArraySchema, ClassSchema, NumberSchema, ObjectSchema, PolymorphicCollectionSchema, PolymorphicEnumSchema, PolymorphicMapSchema, PolymorphicThrowableSchema
public abstract class PolymorphicSchema
- extends java.lang.Object
- implements Schema<java.lang.Object>
Used when the type is either polymorphic or too complex.
Unlike DerivativeSchema, this is designed to have no concept of merging.
- Author:
- David Yu
- Date created:
- Apr 30, 2012
|
Method Summary |
abstract Pipe.Schema<java.lang.Object> |
getPipeSchema()
The pipe schema associated with this schema. |
boolean |
isInitialized(java.lang.Object message)
|
java.lang.Object |
newMessage()
|
protected abstract void |
setValue(java.lang.Object value,
java.lang.Object owner)
Set the value to the owner. |
java.lang.Class<? super java.lang.Object> |
typeClass()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
strategy
public final IdStrategy strategy
PolymorphicSchema
public PolymorphicSchema(IdStrategy strategy)
isInitialized
public boolean isInitialized(java.lang.Object message)
- Specified by:
isInitialized in interface Schema<java.lang.Object>
newMessage
public java.lang.Object newMessage()
- Specified by:
newMessage in interface Schema<java.lang.Object>
typeClass
public java.lang.Class<? super java.lang.Object> typeClass()
- Specified by:
typeClass in interface Schema<java.lang.Object>
getPipeSchema
public abstract Pipe.Schema<java.lang.Object> getPipeSchema()
- The pipe schema associated with this schema.
setValue
protected abstract void setValue(java.lang.Object value,
java.lang.Object owner)
- Set the value to the owner.
Copyright © 2009-2014. All Rights Reserved.