[Biojava-dev] WalkerFactory code proposal

Matthew Pocock matthew_pocock at yahoo.co.uk
Sun Aug 10 19:33:09 EDT 2003


I'm all for it.

The only issue that comes to mind is handeling
data-structures that are cyclic - I think that's
beyond the scope of the Walker/Visitor design pattern,
but needs to either be made part of the scope or
documented as a limitation.

Matthew

ps isn't run-time code generation neat

 --- David Huen <smh1008 at cus.cam.ac.uk> wrote: 
> Currently, the Visitor/Walker code is specific to
> FeatureFilters.
> I propose to extend it to walking objects with the
> same structure as our
> FeatureFilter objects (I need to support
> ChadoFeatureFilters which because
> of the very different datamodel used by the Chado
> schema, is not readily
> represented by the Biojava datamodel).
> 
> I propose adding a:-
> public getInstance(Class filterClazz)
> 
> method to the WalkerFactory class where filterClazz
> defines the kind of
> class for which a Walker is required.  The current
> getInstance() method is
> retained and made equivalent to a call of kind:-
> 
> getInstance(FeatureFilter.class);
> 
> The instance of WalkerFactory is used thereafter in
> an identical manner to
> the existing WalkerFactory save that is applies to a
> class other than
> FeatureFilter.
> 
> Any objections?
> 
> Regards,
> david h
> 
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at biojava.org
> http://biojava.org/mailman/listinfo/biojava-dev 

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/


More information about the biojava-dev mailing list