ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Murdoch" <>
Subject RE: cvs commit: jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer
Date Sat, 09 Feb 2002 01:49:55 GMT

> -----Original Message-----
> From: Peter Donald []
> Sent: Saturday, 9 February 2002 9:57 AM
> To: Ant Developers List
> Subject: Re: cvs commit:
> jakarta-ant/proposal/myrmidon/src/testcases/org/apache/myrmidon/componen
> ts/configurer
> H,,
> On Sat, 9 Feb 2002 09:33, Adam Murdoch wrote:
> > >   * Uses the DataType role when creating instances for interface
> > > properties,
> > >     rather than using the interface itself as the role.
> >
> > The motivation for this change was to allow a data type to be used in
> > <property>, TypeInstanceTask, and as a parameter to add() methods.
> Im not sure I follow you here. If I have a
> add( MyRole value );
> will that look up in the registry under MyRole or DataType? 

DataType.  Same as <property> and TypeInstanceTask.

> If it is looking 
> up the registry under DataType - what happens in the following case
> <role shortname="foo" class=""/>
> <role shortname="bar" class=""/>
> <foo name="mytype" class="..."/>
> <bar name="mytype" class="..."/>
> Both types have the same name but different roles. So what would 
> happen here ?

Not sure whether you're asking about 2 classes or one single class here?

I.e. did you mean

<foo name="mytype" class="Class1"/>
<bar name="mytype" class="Class2"/>


<foo name="mytype" class="Class1"/>
<bar name="mytype" class="Class1"/>

Either way, it ain't going to pick them up.  You'd need to register them as a data-type as

<data-type name="mytype" class="..."/>

Obviously "mytype" is going to be ambiguous in case 1 above.  Like I said, this was the simplest
solution I came up with, not necessarily the best.

As far as solving the ambiguity goes, we should add qualified names for types.  Qualified
names will be unique for each type.  The user will be able to refer to a type using either
its qualified name or, if not ambiguous, its short name.

How about combining the type shortname, with the name of the typelib it was defined in, to
form the qualified name?

> BTW I noticed you removed the 
> myException.fillInStackTrace() when exceptions were rethrown - 
> what was the 
> motivation for that?

Laziness (my primary motivation :) - so that the original stack trace was there for me to
click on in IDEA.  I can put it back if you like.


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

View raw message