org.apache.commons.id.test
Interface AssertSerialization.Context

All Known Implementing Classes:
SerializationTestContext
Enclosing class:
AssertSerialization

public static interface AssertSerialization.Context

Interface for the serialization test context.

Since:
1.0
Author:
Jörg Schaible

Method Summary
 java.io.Serializable createReference()
          Create a reference object of the class to serialize.
 java.io.File getReferenceBaseDir()
          Retrieve the base directory for the serialized object files.
 java.lang.Class getType()
          Retrieve the type of the serialized class.
 void verify(java.lang.Object serialized, long uid)
          Verify the (de-)serialized object.
 

Method Detail

verify

void verify(java.lang.Object serialized,
            long uid)
Verify the (de-)serialized object. Test the object with appropriate assert methods and try to check all members, especially newly added.

Parameters:
serialized - the object itself
uid - the serialVersionUID of the deserialized object
Since:
1.0

createReference

java.io.Serializable createReference()
Create a reference object of the class to serialize.

Returns:
the reference object
Since:
1.0

getReferenceBaseDir

java.io.File getReferenceBaseDir()
Retrieve the base directory for the serialized object files. Each type has an own directory that contains files with serialized compatible object of that type, but different serialVersionUID. This id is used for the filename.

Returns:
the base directory
Since:
1.0

getType

java.lang.Class getType()
Retrieve the type of the serialized class.

Returns:
the type
Since:
1.0


Copyright © 2003-2008 The Apache Software Foundation. All Rights Reserved.