avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hawkes" <jhaw...@adsnm.com>
Subject Re: [VOTE] New sandbox project
Date Wed, 10 Mar 2004 20:10:15 GMT
> but is it a decorator or chain of responsabilities? I'd rather the second
> drawing.

I had imagined something like the following...

public abstract SimpleContainer
implements Container {

    public void registerComponent(Class klass, Object key) {
        registerComponent( new SimpleInstantiationExpression(klass), key );
    }

    public void registerComponent(Expression exp, Object key) {
        for (Iterator i=concerns.iterator(); i.hasNext(); ) {
            Concern concern = (Concern) i.next();
            exp = concern.passOnConcern(this, key, exp);
        }
        map.put(key, exp);
    }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message