On Thu, 21 Feb 2002 21:11, Adam Murdoch wrote:
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, 21 February 2002 7:34 PM
> > To: [EMAIL PROTECTED]
> > Subject: cvs commit:
> > jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/co
> > nfigurer PropertyException.java PropertyUtil.java
> >
> >
> > donaldp 02/02/21 01:33:29
> >
> > Added:
> > proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer
> > PropertyException.java PropertyUtil.java
> > Log:
> > Add a PropertyUtil class that doesn't need avalons Context
>
> Can we make this non-static?
Go ahead. I was going to eventually do it but if you want to do it ... ;)
> That way we can change the behaviour (e.g.
> for an Ant 1.x compat layer, or as a config option).
I would prefer a Policy object. Lets call it AntPolicy or MyrmidonPolicy or
whatever. You would then check the policy before doing these sort of
"configurable" behaviours.
ie if you wanted recursive property resolution then you change the policy to
allow it. If you wanted failed property resolution to not cause errors then
you specify that in the policy (and this would be required for ant1.x
compatability).
> How about this:
>
> - Add TaskContext.resolveValue( String ).
> - Move the guts of PropertyUtil to a new AbstractTaskContext.
How about a service like
interface PropertyResolver
{
void resolveProperty(String p);
}
or maybe have it merged into the Configurer service (which I guess makes more
sense).
--
Cheers,
Pete
---------------------------------------------------
"It is easy to dodge our responsibilities, but we
cannot dodge the consequences of dodging our
responsibilities." -Josiah Stamp
---------------------------------------------------
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>