--- [EMAIL PROTECTED] wrote: > > Al, > It sounds like the pattern you're proposing is the Strategy design > pattern (see "Design Patterns" by the four authors). Basically, an object > has multiple possible delegate objects, each of which implement a common > interface. Then, as the state changes, the strategy can switch from one to > another. This makes it transparent to the caller that multiple strategies > are being used, and that they are even changing, but allows for good > encapsulation, flexibility, and extensibility. > > As for invoking using either static methods or instance methods, the > Commons Bean-Utils does this. There's a BeanUtils simpleton (all static > methods) that delegates to a BeanUtilsBean, which can be instantiated, > extended, etc. So, the most common/shared version is accessible from > either way, but any specialized version must be instantiated yourself and > called directly. > > Design Patterns are a great way to make Java do what we want it to.
Eric, Thanks for the great reply. I haven't made it a priority to read my copy of _Design Patterns_ (I figured _Refactoring_ was a better place for me to start; also, have you seen the book-in-progress _Refactoring to Patterns_ [http://www.industriallogic.com/xp/refactoring/]?), so apologies for my ignorance of their pattern catalog. Al ===== Albert Davidson Chou Get answers to Mac questions at http://www.Mac-Mgrs.org/ . __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
