I've collected a couple of utilites that have helped me during debugging
some problems (
http://svn.apache.org/repos/asf/incubator/tuscany/sandbox/slaws/sample-sca-toys/).
For example this is the code I drop at the end of a test to print out the
model hierarchy that was built:
// inspect the model
Field domainCompositeField = scaDomain.getClass
().getDeclaredField("domainComposite");
domainCompositeField.setAccessible(true);
Composite domainComposite = (Composite)
domainCompositeField.get(scaDomain);
OutputStream os = new ByteArrayOutputStream();
PrintUtil printUtil = new PrintUtil(os);
printUtil.print(domainComposite);
System.out.println("Assembly \n " + os.toString());
I'm sure people have much smarter utils than I that they use to make their
lives easier. If you have tools are you prepared to share them?
How about we create a module:
java/sca/devtools
or even
java/devtools
Simon