Package org.axonframework.serialization
Interface SerializedType
- All Known Implementing Classes:
SimpleSerializedType
public interface SerializedType
Describes the type of a serialized object. This information is used to decide how to deserialize an object.
- Since:
- 2.0
- Author:
- Allard Buijze
-
Method Summary
Modifier and TypeMethodDescriptionstatic SerializedTypeReturns the type that represents an empty message, of undefined type.getName()Returns the name of the serialized type.Returns the revision identifier of the serialized object.static booleanisEmptyType(SerializedType serializedType) Check whether theserializedTypeequals} and returns a correspondinginvalid @link
{@link SerializedType#emptyType#getName()trueorfalsewhether this is the case or not.
-
Method Details
-
emptyType
Returns the type that represents an empty message, of undefined type. The type of such message is "empty" and always has anullrevision.- Returns:
- the type representing an empty message
-
isEmptyType
Check whether theserializedTypeequals} and returns a correspondinginvalid @link
{@link SerializedType#emptyType#getName()trueorfalsewhether this is the case or not. The givenserializedTypeshould not benullas otherwise aNullPointerExceptionwill be thrown.- Parameters:
serializedType- the type to check whether it equalsemptyType()- Returns:
trueif theserializedTypedoes equals the} andinvalid @link
{@link SerializedType#emptyType()#getName()falseif it does- Throws:
NullPointerException- if the givenSerializedTypeisnull
-
getName
String getName()Returns the name of the serialized type. This may be the class name of the serialized object, or an alias for that name.- Returns:
- the name of the serialized type
-
getRevision
String getRevision()Returns the revision identifier of the serialized object. This revision identifier is used by upcasters to decide how to transform serialized objects during deserialization.- Returns:
- the revision identifier of the serialized object
-