jeudi 2 juin 2016

Initialize Complex calss in java

I am new to java and I know this is might not the best place to ask this question. I have a complex class generated from wsdl file, the class contains several other classes which in turn contains also other classes. I have a hierarchy of more than 5 levels.

In order to initialize it I need to create several objects, then initialization code for creating an object of this class is around 100 lines.

Is there a pattern for this cases. I have created a wrapper around each class and then I have created a wrapper a round these wrapper. Is this is how it is done?

Aucun commentaire:

Enregistrer un commentaire