Stephen Colebourne wrote:
> Split the thread as this bit got lost...
> 
> There are definite similarities between this Delegate description and the
> code that is currently located in [pattern]. [pattern] contains four simple
> callback interfaces Predicate, Transformer, Command and Factory. It also has
> methods that support calling back to an arbitrary method using reflection.
> 
> Delegates take the approach of allowing any interface and calling back using
> reflection.
> The [pattern] case limits the interfaces to specific ones.
> Otherwise they are similar.
> 
> There is a lot that can be done with delegates/BCEL/advanced beans. I would
> really like to start getting this together, but I think that its a new
> project [clazz] that builds on [lang].
> 
> Stephen

If we can throw together delegates and generic meta-info I would pass out
with joy...  Those two features are becoming necessities in Avalon land.
We are attempting to work with meta-info using component descriptors--but
a more generic approach would be better IMO.

Anyway, what else do you want to include with Delegates?

BTW, the code is in place and works quite well.  The only issue is that
I would like to have a MultiDelegate that returns a Delegate capable
interface return a MultiDelegate.  Example is this:

Agent agent = (Agent) Delegate.newMultiDelegate( Agent.class );

//  Add new listeners:
((MultiDelegate) agent).add( otherAgent1 );
((MultiDelegate) agent).add( otherAgent2 );

// Get the result:
Action action = agent.findAction();

// Use result:
action.perform();


(If you are wondering what that is all about, I am working on putting
together a framework for Intelligent Agents.)


-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to