commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <>
Subject Re: [digester] plugins module ready for evaluation
Date Thu, 02 Oct 2003 02:46:23 GMT
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:

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

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.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message