From: Marc P. <ma...@an...> - 2003-07-27 16:27:14
|
On Sat, 26 Jul 2003 19:29:35 -0700, Lane Sharman <la...@op...> wrote: >> On Sat, 26 Jul 2003 13:46:36 -0700, Lane Sharman <la...@op...> >> wrote: >> >> >> Context doesn't need to know about ContextTools however. > > This above statement is so confusing as to border on the curious. > Context.get(Object, Object) directly checks for a tool not in the context > and, if one is specified by the key, the tool value is placed in the > context. That is the way it works and this cannot be changed unless you > want to break backward compatibility. Could some other use for context > loading on a "fault" be dreamed up. Cannot think of one off hand. Yes - any kind of application-supplied object that needs to be created, without following the ContextTool model - for example. And moving it all out of Context means you can completely avoid it all too. i.e. Context.internalGet would, if no var is found, see if it has a LazyVariableFactory, and if so ask that for an new instance for that variable name (AKA tool). Nothing else is required in my mind. That's why I say that Context doesn't need to know about ContextTool at all, only about LazyVariableFactory. Marc -- Marc Palmer Contract Java Consultant/Developer w a n g j a m m e r s java and web software design experts with an ethical outlook http://www.wangjammers.org |