I have an XML which has tags corresponding to three types of Java objects which would be created from the XML. The objects are of the form:
A
- static Map<
From what you describe this could be done with a common framework such as Spring, either by you changing your XML or generate a XSTL which creates a Spring XML config file from your XML.
Spring Core documentation is probably enough to get you started. An example of the XML would be
But what you describe should not be too hard with reflection. Assuming that none of the other objects need a reference in the constructor (but rather as setX) I would start by scanning the xml, create and store all objects with their names and remember a list of "connections" so be made. After all objects are created do all connections in the connection list.