[PATCH] Swixml - Extending DefaultFactory
Don Brown <[email protected]>
| Newsgroups | gmane.comp.embedded.carlsbad-cubes |
|---|---|
| Message-ID | <[email protected]> |
I made several small changes to DefaultFactory to make it possible to extend; basically, I removed the final modifier from the class and template variable. Here's my use case: I want my custom tags, and some swing tags, to be created by my inversion of control (IoC) framework (Spring - http://www.springframework.org). This lets my plugins declare what resources they will need through JavaBean setters, and spring, at call time, will create the plugin and provide it with its resources. The best way I could see to accomplish this was to extend DefaultFactory and override its newInstance() method, leaving all the other method implementation to DefaultFactory. Unfortunately, I discovered DefaultFactory and the key template variable are declared final. I think there is value in making it possible to extend DefaultFactory for use cases such as mine. My modified DefaultFactory: http://www.twdata.org/dakine/DefaultFactory.java Comments? Don