Class DerivativeSchema
java.lang.Object
io.protostuff.runtime.DerivativeSchema
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Pipe.Schema<Object> This pipe schema delegates to another schema derived from the input.final IdStrategy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voiddoMergeFrom(Input input, Schema<Object> derivedSchema, Object owner) getFieldName(int number) Gets the field name associated with the number.intgetFieldNumber(String name) Gets the field number associated with the name.booleanisInitialized(Object owner) Returns true if there is no required field or if all the required fields are set.voidDelegates to the schema derived from the input.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.Gets the class of the message.voidDelegates to the schema derived from thevalue.
-
Field Details
-
strategy
-
pipeSchema
This pipe schema delegates to another schema derived from the input.
-
-
Constructor Details
-
DerivativeSchema
-
-
Method Details
-
getFieldName
Description copied from interface:SchemaGets 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);
- Specified by:
getFieldNamein interfaceSchema<Object>
-
getFieldNumber
Description copied from interface:SchemaGets 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);
- Specified by:
getFieldNumberin interfaceSchema<Object>
-
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>
-
messageFullName
Description copied from interface:SchemaReturns the full name of the message tied to this schema. Allows custom schemas to provide a custom name other than typeClass().getName();- Specified by:
messageFullNamein interfaceSchema<Object>
-
messageName
Description copied from interface:SchemaReturns the simple name of the message tied to this schema. Allows custom schemas to provide a custom name other than typeClass().getSimpleName();- Specified by:
messageNamein interfaceSchema<Object>
-
newMessage
Description copied from interface:SchemaCreates the message/object tied to this schema.- Specified by:
newMessagein interfaceSchema<Object>
-
typeClass
-
mergeFrom
Delegates to the schema derived from the input. Theownerowns the message (polymorphic) that is tied to this schema.- Specified by:
mergeFromin interfaceSchema<Object>- Throws:
IOException
-
writeTo
Delegates to the schema derived from thevalue.- Specified by:
writeToin interfaceSchema<Object>- Throws:
IOException
-
doMergeFrom
protected abstract void doMergeFrom(Input input, Schema<Object> derivedSchema, Object owner) throws IOException - Throws:
IOException
-