Package io.protostuff.runtime
Class DerivativeSchema
java.lang.Object
io.protostuff.runtime.DerivativeSchema
This schema delegates to another schema derived from the input.
-
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 void
doMergeFrom
(Input input, Schema<Object> derivedSchema, Object owner) getFieldName
(int number) Gets the field name associated with the number.int
getFieldNumber
(String name) Gets the field number associated with the name.boolean
isInitialized
(Object owner) Returns true if there is no required field or if all the required fields are set.void
Delegates 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.void
Delegates 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: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);
- Specified by:
getFieldName
in interfaceSchema<Object>
-
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);
- Specified by:
getFieldNumber
in interfaceSchema<Object>
-
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>
-
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();- Specified by:
messageFullName
in interfaceSchema<Object>
-
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();- Specified by:
messageName
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. -
mergeFrom
Delegates to the schema derived from the input. Theowner
owns the message (polymorphic) that is tied to this schema.- Specified by:
mergeFrom
in interfaceSchema<Object>
- Throws:
IOException
-
writeTo
Delegates to the schema derived from thevalue
.- Specified by:
writeTo
in interfaceSchema<Object>
- Throws:
IOException
-
doMergeFrom
protected abstract void doMergeFrom(Input input, Schema<Object> derivedSchema, Object owner) throws IOException - Throws:
IOException
-