From: Nick B. <ni...@co...> - 2001-11-26 16:08:32
|
>> > So it is not possible for your classes to implement the >> > org.formproc.validation.Rule interface? Their is no need to be in >> > any specific package as the classes are dynamically loaded. Do all >> > of your rules already implement a common interface? >> >> Yes, they do. It's called Rule.java. I could make that extend your >> Rule interface... It can't be that easy, can it? Why did I think I >> should dismiss this idea earlier? > > It should be that easy. If you want to completely decouple your code > from the FormProc code then you could have an intermediate class which > implements the FormProc Rule interface call your code. That adds > another level of indirection that may not be necessary but it would > completely separate your code from the FormProc framework except for > that single class. That's what I'll do: thanks Anthony! (BTW: the approach you suggest is the Visitor pattern) My hope is to improve both of our systems. http://www.clickblocks.org/patterns1/pattern_synopses.htm#Visitor > Sincerely, > Anthony Eden > -- Nick Bauman Cortexity Development http://www.cortexity.com/ |