Package io.protostuff
Class Pipe.Schema<T>
java.lang.Object
io.protostuff.Pipe.Schema<T>
- Direct Known Subclasses:
RuntimePipeSchema
- Enclosing class:
Pipe
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFieldName
(int number) Gets the field name associated with the number.int
getFieldNumber
(String name) Gets the field number associated with the name.boolean
isInitialized
(Pipe message) Always returns true since we're just transferring data.final void
Deserializes a message/object from theinput
.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.protected abstract void
Gets the class of the message.final void
Serializes a message/object to theoutput
.
-
Field Details
-
wrappedSchema
-
-
Constructor Details
-
Schema
-
-
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<T>
-
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<T>
-
isInitialized
Always returns true since we're just transferring data.- Specified by:
isInitialized
in interfaceSchema<T>
-
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<T>
-
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<T>
-
newMessage
Description copied from interface:Schema
Creates the message/object tied to this schema.- Specified by:
newMessage
in interfaceSchema<T>
-
typeClass
Description copied from interface:Schema
Gets the class of the message. -
writeTo
Description copied from interface:Schema
Serializes a message/object to theoutput
.- Specified by:
writeTo
in interfaceSchema<T>
- Throws:
IOException
-
mergeFrom
Description copied from interface:Schema
Deserializes a message/object from theinput
.- Specified by:
mergeFrom
in interfaceSchema<T>
- Throws:
IOException
-
transfer
- Throws:
IOException
-