I have these classes and I want to instantiate each one of them easily.
All the data to create them are in a json file and there will be a lot of different objects in the end. Each objects have a lot of attributes, I would prefer using a helper. A, B and C can be instantiated and used separately even if A might depend on a C object (or B).
First I thought that a factory method would suffice.But each one of them has a lot of attributes and since A depends on all the other objects it would be a mess.
Then I thought that a pseudo-Builder would work best since it would let me set every attribute one by one while I parse the json file. This works but it means that every class has its own builder and I would need to handle the builders dependency when I parse everything.
There are solutions but I would like to find something more elegant and not create objects that I don't need. The other thing is that the parser is Abstract and implemented by the one using the library (needed for several reasons).
My current solution is a pseudo-builder (simple inner-class that lets me setAtt1(...).setAtt2(...)...Build()) for each class and one Factory that has createA(id), CreateB(id), CreateC(id) and an actual builder pattern for H1,H2,H3. The Factory is a realization of the Abstract JsonParser class that the user needs to implement thanks to the Builders.
I'm not looking for the definitive solution but I would like some advice on my solution and if I am making a big mistake on how I handle things.