What is your program supposed to do? Convert from one file format to
another?
Usually to convert, compute or check something from time to time
How about having one stage where you parse all the inputs, and build
model objects out of that. And then a second stage where you walk your
model
data structure and emit all the data into files of the appropriate file
format?
The major problem is with the number of methods: now I have 7 object
types and 10 file formats. That makes 3 (read, update, write) x 10 x 7
methods. Each class for instance has a custom parser of X format that
reads only this data that the class wants to have
Yes, I can build 10 new classes, one for each file format, with a
single parser. But how to reduce the number of methods? With these 10
classes I still need the methods:
A.createFromX(), A.updateFromY()...