> From: peter reilly [mailto:[EMAIL PROTECTED]
> 
> My comments in-line:
> 
> On Monday 28 April 2003 16:35, Costin Manolache wrote:
> > To keep things simple and make it easier to get an agreement -
> > let's let adapters out, and focus on the core issue.
> >
> > IMO it seems what everything leads to is the need to extend
> > the introspection patterns with another case. Let's agree
> > on this pattern first.
> >
> > Assuming:
> >
> >   <parent>
> >     <myChild>
> >   </parent>
> >
> > If ParentClass has no addMyChild()/createMyChild() method, 
> we'll need
> > to look up in some table and find a class associated with <myChild>.
> > ( it can be the "roles" table, or just the typedef table, 
> or some other
> > table that uses the context info or adapters ).
> >
> > Then we'll find some interfaces associated with 
> MyChildClass - either all
> > interfaces, all interfaces and base classes, or only an explicit set
> > declared in some other data strucutures. Each of the 
> interface will be
> > a potential role.
> >
> > We'll then look in ParentClass for an add method with that 
> particular
> > interface as parameter.
> >
> >
> > The points of disagreement:
> >
> > - should we add a separate table for <child>->class 
> association - or just
> > use the typedef ?
> 
> We should use the contents of typedef
> 

This will not do for vendor cases and such.
See my comments to Contin.

> >
> > - Should we use (<parent>, <child>) tuple to find the 
> class? Should we use
> > (ParentClass, <parent>, <child>) tuple ? Or just <child> name - i.e.
> > context-free ?
> 
> The name should be context-free.
> 
-1 you need the context of usage.

> >
> > - try all interfaces - or have some data structures to 
> restrict to only a
> > subset ?
> 
> Use java rules, (try all interfaces)
> 

The parent will tell you what interfaces to use. No need for wild searches.

> >
> > - addComponent( MyRole ) or addMyRole( MyRole ) or both ?
> > I.e. a fixed-name method, with overloading to support 
> multiple roles,
> > or one add method per role ?
> 
> add(ElementClass) to be consistent with other ant method 
> matching patterns.
> 

I prefer just supporting addConfigured, the reason being that makes little
sense passing a non configured object of an unknown implementation to the
parent. What does it possible can do to it, before it gets configured?

> > In the second case, we'll need some additional metadata to associate
> > the role interface with the suffix of the add method.
> > ( MyRole -> org.apache.tools.ant.MyRoleInterface )
> >
> > - should setComponent be used to indicate single-child ? ( 
> of course, all
> > primitives that can be used as attributes will remain attributes )
> 
> No, setComponent() should just of an attribute 
> 'component="value"' as per
> current ant method pattern matching/
> 
Agreed.

Jose Alberto
> Peter
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

Reply via email to