org.castor.xmlctf
Interface CastorTestable


public interface CastorTestable

Every root object in an object model used in a tests has to implement this interface as well as to override the equals() method. It can be useful that all the objects in an object model used for tests implement this interface.

Version:
$Revision: 6785 $ $Date: 2003-10-15 09:17:49 -0600 (Wed, 15 Oct 2003) $
Author:
Sebastien Gignoux

Method Summary
 java.lang.String dumpFields()
          Returns a recursive dump of the contents of the object's fields in a user readable format.
 void randomizeFields()
          Randomizes the contents of the fields of this instance.
 

Method Detail

dumpFields

java.lang.String dumpFields()
Returns a recursive dump of the contents of the object's fields in a user readable format. This is used to retrieve the state of the object if castor fails to marshal the object for any reason.

We don't rely on the Object.toString() function as might be implemented with another semantic.

Returns:
a recursive dump of the contents of the object's fields in a user readable format.

randomizeFields

void randomizeFields()
                     throws java.lang.InstantiationException,
                            java.lang.IllegalAccessException
Randomizes the contents of the fields of this instance. This is used to create an instance of the object model whithout having to unmarshal anything.

Throws:
java.lang.InstantiationException - if this method is called for an Interface or abstract class
java.lang.IllegalAccessException - if this method is not accessible


Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com