1 23 24 package org.objectweb.fractal.adl.conform; 25 26 import java.util.HashMap ; 27 import java.util.Map ; 28 29 import org.objectweb.fractal.adl.Factory; 30 import org.objectweb.fractal.adl.FactoryFactory; 31 32 public class TestAutoCreate extends Test { 33 34 public TestAutoCreate (final String name) { 35 super(name); 36 } 37 38 public void test () throws Exception { 39 Factory f = FactoryFactory.getFactory(); 40 Map ctxt = new HashMap (); 41 ctxt.put( 42 "backend", 43 "org.objectweb.fractal.adl.JavaBackend"); 44 Map m = (Map )f.newComponent("org.objectweb.fractal.adl.BasicFactory", ctxt); 46 f = (Factory)m.get("factory"); 47 m = (Map )f.newComponent("org.objectweb.fractal.adl.BasicFactory", ctxt); 49 f = (Factory)m.get("factory"); 50 } 51 } 52 | Popular Tags |