I need to create a complete configuration purely from Java code. To make things a little more interesting, annotation is not an option either.
I have written some code which (appears to) iterate through an existing configuration (based on bhm files) and extract significant information. Where I am completely stuck is in adding this information to a brand new configuration instance [once I can do a simple clone, the "real process" will involve a number of transformations].
The following is what I have so far (but may be completely off-track)
Code:
Iterator mappingIterator2 = sourceConfiguration.getClassMappings();
Mappings targetMappings = targetConfig.createMappings();
while (mappingIterator2.hasNext() )
{
RootClass classMapping = (rootClass) mappingIterator2.next();
System.out.println("\t\t" + classMapping);
[b] // **** OK - NOW WHAT!!!!
[/b]
}
BACKGROUND.