In the process of software development there is often the need for dummy object. One of the main reasons for their usage is the fact, that a database or another data-provider might not be ready or available in the current stage of development.

Normally a developer would implement some methods to create those dummy objects with random data. If you have many classes, this might become a quick time-consuming task. A good solution would be a library, which creates those objects automatically.

For this sake, I started the DummyCreator project. It is planned to provide a static method which returns a random Object of whatever class is needed. In the process of object-creation, the DummyCreator will rely on the usual JavaBean specifications of  setter methods. Those methods are defined by their name (starts with “set”), their parameter (just one) and that they are always void methods.

Object-creation will start by finding a suitable constructor and then set all available attributes of the object automatically. This will done by using the reflection API with all of it’s magic.

A first version of the DummyCreator and the source can be found on the Google-Code homepage: http://code.google.com/p/dummycreator/

There is also a short introduction available which describes the first steps to use DummyCreator in your project. You can integrate the jar-File in the development and later deploy without it.

It currently works quite well, there are only some issues with classes which have lists as attribute. Those will be created but empty.


Related Posts



Eine Antwort schreiben