java.lang.Object
omix.mathxp.io.MathTypeHandler
- All Implemented Interfaces:
TypeSerializationHandlerInterface
public class MathTypeHandler extends Object implements TypeSerializationHandlerInterface
- Author:
- Dr. Peter Droste
-
Nested Class Summary
Nested classes/interfaces inherited from interface omix.plugin.type.TypeSerializationHandlerInterface
TypeSerializationHandlerInterface.AbstractSerialization, TypeSerializationHandlerInterface.ComponentArraySerialization, TypeSerializationHandlerInterface.ComponentMapSerialization, TypeSerializationHandlerInterface.DoubleSerialization, TypeSerializationHandlerInterface.IntSerialization, TypeSerializationHandlerInterface.LongSerialization, TypeSerializationHandlerInterface.RawDataSerialization, TypeSerializationHandlerInterface.StringSerialization
-
Constructor Summary
Constructors Constructor Description MathTypeHandler()
-
Method Summary
Modifier and Type Method Description Object
deserialize(Class<?> type, TypeSerializationHandlerInterface.AbstractSerialization serialization, VersionNumber versionString)
Deserializes an object of a specific class type according the given instance ofTypeSerializationHandlerInterface.AbstractSerialization
.
Omix iterates the list of installed TypeSerializationHandlers ordered by time of installation.TypeSerializationHandlerInterface.AbstractSerialization
serialize(Object object)
Serializes an object of a specific class type.
Omix iterates the list of installed TypeSerializationHandlers ordered by time of installation.boolean
supports(Class<?> type)
Determines if TypeSerializationHandler supports specified class type.
-
Constructor Details
-
MathTypeHandler
public MathTypeHandler()
-
-
Method Details
-
supports
Description copied from interface:TypeSerializationHandlerInterface
Determines if TypeSerializationHandler supports specified class type.- Specified by:
supports
in interfaceTypeSerializationHandlerInterface
- Parameters:
type
- class type supported by this handler- Returns:
- class type supported
-
deserialize
public Object deserialize(Class<?> type, TypeSerializationHandlerInterface.AbstractSerialization serialization, VersionNumber versionString) throws ExceptionDescription copied from interface:TypeSerializationHandlerInterface
Deserializes an object of a specific class type according the given instance ofTypeSerializationHandlerInterface.AbstractSerialization
.
Omix iterates the list of installed TypeSerializationHandlers ordered by time of installation. The first handler supporting the specific class is used for value deserialization. All other supporting handlers are skipped.- Specified by:
deserialize
in interfaceTypeSerializationHandlerInterface
serialization
- corresponds to the serialization result fromTypeSerializationHandlerInterface.serialize(Object)
.versionString
- the version number of the plugin installed in Omix when the object was serialized.
In this way, the implementation can change and keep compartibility.- Returns:
- the deserialized object
- Throws:
Exception
- can be thrown to declare an internal error.
-
serialize
public TypeSerializationHandlerInterface.AbstractSerialization serialize(Object object) throws ExceptionDescription copied from interface:TypeSerializationHandlerInterface
Serializes an object of a specific class type.
Omix iterates the list of installed TypeSerializationHandlers ordered by time of installation. The first handler supporting the specific class is used for value serialization. All other supporting handlers are skipped.- Specified by:
serialize
in interfaceTypeSerializationHandlerInterface
- Parameters:
object
- to be serialized- Returns:
- instance of AbstractSerialization
- Throws:
Exception
- can be thrown to declare an internal error.
-