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 Type
    Method
    Description
    Returns the type that represents an empty message, of undefined type.
    Returns the name of the serialized type.
    Returns the revision identifier of the serialized object.
    static boolean
    isEmptyType(SerializedType serializedType)
    Check whether the serializedType equals
    invalid @link
    {@link SerializedType#emptyType#getName()
    } and returns a corresponding true or false whether this is the case or not.
  • Method Details

    • emptyType

      static SerializedType emptyType()
      Returns the type that represents an empty message, of undefined type. The type of such message is "empty" and always has a null revision.
      Returns:
      the type representing an empty message
    • isEmptyType

      static boolean isEmptyType(SerializedType serializedType)
      Check whether the serializedType equals
      invalid @link
      {@link SerializedType#emptyType#getName()
      } and returns a corresponding true or false whether this is the case or not. The given serializedType should not be null as otherwise a NullPointerException will be thrown.
      Parameters:
      serializedType - the type to check whether it equals emptyType()
      Returns:
      true if the serializedType does equals the
      invalid @link
      {@link SerializedType#emptyType()#getName()
      } and false if it does
      Throws:
      NullPointerException - if the given SerializedType is null
    • 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