On Wed, 2003-10-01 at 17:59, Simon Kitching wrote: 
> Hi,
> 
> Many many moons ago, I proposed a "plugins" extension for digester.
> 
> It is now ready for the world [yes, yes, brave words I know :-]

Follow-up comments:

*
The package overview is accessable via this direct link:
http://issues.apache.org/bugzilla/showattachment.cgi?attach_id=8410

* 
I always wanted class PluginRules to be a decorator for other Rules
classes rather than reimplement RulesBase functionality. It hasn't been
possible in the past, because I needed to use a CursorableLinkedList (or
equivalent) to hold the rules. However I realised this morning in the
shower (true!) that given recent changes to the way PluginCreateRule is
implemented, it is now possible to do so.

I have attached an updated (and smaller) code tarfile to the bugzilla
entry http://issues.apache.org/bugzilla/show_bug.cgi?id=23537.

*
Currently, PluginCreateRules creates a new Rules instance each time it
fires, to hold the custom rules associated with whatever concrete class
the user has specified. As it is expected that the same concrete class
will be reused often (just see the examples), a cache could be created
to hold these rules objects. I would rather hold off doing this
optimisation, though, until I know whether plugins will be accepted into
the digester tree or not.

*
Sorry about my coding style creeping into the posted code a little.
In particular, I add underscores to the end of instance variables, like:
  private String foo_;
  public void setFoo(String foo) { foo_ = foo; }
Habits are hard to break...

*
Calls to log.debug still need to be wrapped in if(debug) for
performance, like in the rest of Digester code.

Cheers,

Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to