-----Mensagem original-----
De: Jonathan Hawkes [mailto:[EMAIL PROTECTED]
> +1 if I had a vote :)
Non-committers are encouraged to vote too!
> public interface Concern {
> Expression passOnConcern(Container c, Expression exp);
> }
Concern is a good name!
Expression reminds me AST... Hey, how about build a AST of components and
make mathematical operations with it and bring the Composable interface
back?! No? Ok.. :-)
> public interface Container {
> void addConcern(Concern c);
> void registerComponent(Class componentClass);
> void registerComponent(Class componentClass, Object key);
> Object getComponent(Object key);
> Object getComponentOfType(Class type);
> }
Looks good.
> public class SimpleInstantiationExpression {
> private Class klass;
> public SimpleInstantiationExpression(Class klass) {
> this.klass = klass;
> }
> public Class getType() { return klass; }
> public Object getValue() {
> try {
> return klass.newInstance();
> } catch (AllRelevantExceptions are) {
> throw new ReleventException(are);
> }
> }
> }
with a few exceptions (like the getName as get and set express something
simple like an accessor to some internal value and not to instantiate
something IMO) I like what I see.
> The container impl could create a SimpleInstantiationExpression and all
the
> Concerns could decorate it as desired to add configuration, logging,
> dependency management, etc. I realize that this is most likely
> oversimplified. :)
but is it a decorator or chain of responsabilities? I'd rather the second
drawing.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]