I was thinking about creating a factory interface, and being able to configure PodamFactory before using it. You could do something like:
PodamFactory factory = new PodamFactoryImpl().withDataTypeFactory(MyDataType.class, new MyDataTypeFactory());
class MyDataTypeFactory {
public MyDataType manufacture() {
return new MyDataType();//this should return object with random data, as usually podam does
}
}
and PodamFactoryImpl would hold a map of registered factories and whenever a type registered there is created it would use the factory.
I thought of that because Marco mentioned that project should support creating objects from external libraries (like guava) without dependencies on that libraries and that's an easy way to do it.
What are your opinions? I can make a PR with this concept implemented if you want to see it working.
Thanks,
Piotr