Re: odd reflective stuff
Sanjiva Weerawarana <[email protected]> Sat, 06 Aug 2005 12:40:45 +0600
| Newsgroups | gmane.text.xml.soap.devel,gmane.spam.detected |
|---|---|
| Organization | Lanka Software Foundation |
| Message-ID | <[email protected]> |
On Fri, 2005-08-05 at 18:26 -0700, WJCarpenter wrote: > I happened across this stuff in org.apache.soap.encoding.SOAPMappingRegistry. > Those Class.forName() calls struck me as a little odd. It's mainly > curiosity, but I wonder why those things were instantiated > reflectively instead of just via new like so many other serializers in > that same source file. Hi Bill - it was done to avoid having to require users to have the XMI jars in the classpath. This way if it failed a ClassNotFoundException would be thrown and none of the code will execute. Users who don't care about XMI won't know the difference. Sanjiva.