ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Murdoch" <adammurdoch...@yahoo.com>
Subject RE: cvs commit: jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor DefaultEmbeddor.java
Date Sat, 23 Mar 2002 10:56:39 GMT


> -----Original Message-----
> From: Peter Donald [mailto:peter@apache.org]
> Sent: Saturday, 23 March 2002 8:23 PM
> To: Ant Developers List
> Subject: Re: cvs commit:
> jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/em
> beddor DefaultEmbeddor.java
> 
> 
> On Sat, 23 Mar 2002 17:40, Adam Murdoch wrote:
> > > -----Original Message-----
> > > From: donaldp@apache.org [mailto:donaldp@apache.org]
> > >
> > >   Log:
> > >   Merge DefaultConverterRegistry into DefaultMasterConverter
> >
> > Good idea.  Now we can cache the {src, dest} -> converter mappings that
> > findConverter() comes up with, in the registry.
> 
> heh - didn't think about that. My main reason to do it was to 
> make Unit tests 
> easier to write and make it much easier to use outside of ant ;)
> 
> > I wonder if we should do a similar thing to the TypeManager and 
> RoleManager
> > interfaces, and split them into work interface and management interface?
> 
> Keep them separate for the moment. I would prefer to experiment 
> with allowing 
> roles to define metainfo about their type (ie converter metainfo saids a 
> instance of converter role must supply metainfor about source and 
> destinaiton 
> classes to convert). 
> 
> Hmm thats confusing. Basically I want to be able to have roles 
> say that types 
> that implement role must supply certain attributes. It will be easy to 
> implement this if Roles/Types are separated for the time being.
> 

Absolutely.  I actually meant we should split TypeManager into 2 interfaces, and split RoleManager
into 2 interfaces, but keep DefaultTypeManager and DefaultRoleManager as they are.

So, something like this:

TypeManager gets split into:

interface TypeRegistry
{
    TypeFactory getFactory( roleName );
}

interface TypeManager
{
    void registerType( roleName, typeName, typeFactory );
}

And RoleManager gets split into:

interface RoleRegistry
{
    RoleInfo getRole...( ... );
}

interface RoleManager
{
    void registerRole( roleInfo ) 
}


Adam


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message