Constructor c = junctionClass.getConstructor (new Class[]{host.getClass(), agent.getClass()}); newJunction = (WorkletJunction) c.newInstance(new Object[]{host, agent});
Constructor c = junctionClass.getConstructor (new Class[]{host.getClass(), agent.getClass(), int.class, int.class, boolean.class, Class.forName("java.lang.String"), Class.forName("psl.worklets.JunctionPlanner")}); newJunction = (WorkletJunction) c.newInstance(new Object[]{host, agent, new Integer(myWVM.getRMIPort()), new Integer(0), new Boolean(false), new String("default"), (psl.worklets.JunctionPlanner)null});
    public WorkletJunction produceJunction(Class junctionClass, String host, String agent)    {	WorkletJunction newJunction;	try	    {			Constructor c = junctionClass.getConstructor (new Class[]{host.getClass(), agent.getClass()});		newJunction = (WorkletJunction) c.newInstance(new Object[]{host, agent});	    }	catch (Exception e) 	    {		System.err.println ("junction creation failed for junction type: " + junctionClass.toString());		throw new RuntimeException(e.getMessage());	    }	return (newJunction);     }