Owen Densmore wrote:
> . this all showed me just how important the Java integration and  
> *modification* capability is.  I believe the other agile systems have  
> similar flexibility, so its definitely a brave new world out there.
>   
Btw, the ABM toolkit Swarm, being based on Objective C (which uses 
dynamic binding of messages to methods) has no trouble providing Java 
with completely dynamic messaging (in the example below, `forEach').  
Note that ObjectInterface is not conformed-to by Object[12].  

import swarm.Globals;
import swarm.Selector;
import swarm.collections.ListImpl;
import swarm.collections.List;

class Object1 {
    public void ping () {
      System.out.println ("object 1");
    }
}

class Object2 {
    public void ping () {
      System.out.println ("object 2");
    }
}

interface ObjectInterface {
    public void ping ();
}

public class TestSelector
{
    public static void main (String[] args) {
      Globals.env.initSwarm ("selector", "0.0", "[EMAIL PROTECTED]", 
args);

      List l = new ListImpl (Globals.env.globalZone);

      l.addLast (new Object1 ());
      l.addLast (new Object2 ());
     
      Selector sel = null;

      try {
        sel = new Selector (ObjectInterface.class, "ping", false);
      } catch (Exception e) {
        System.out.println ("Can't find selector");
      }

      l.forEach (sel);
    }
}



============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
lectures, archives, unsubscribe, maps at http://www.friam.org

Reply via email to