create immutable objects with factories?
hi..
i have an object tree, which is all immutable objects meaning, the constructors do all the work. the object are being populated from xml (not using xml schema, the xml i'm getting is rather hmmm.. odd) each object is getting one Xml element object extracts data using xpath to it's variables.
now the element itself always contains a attribute called TypeId which contains a number , this number alone can help me decide which class to create, i was wondering if there is someway to externlize this map of numbers to class types aside form using my own reflection of constructros.