if (eq < 0) { throw new IllegalArgumentException("Missing \"=\" in " + ss); }
  protected Object parseExpr(String type, String arg) {    int i;    type = type.trim();    arg = arg.trim();    if ((i = type.indexOf("<")) >= 0) {      int j = type.lastIndexOf(">");      String ctype = type.substring(0, i).trim();      String etype = type.substring(i + 1, j).trim();      Collection c = null;      if (ctype.equals("Collection") || ctype.equals("List")) {        c = new ArrayList();      } else {        throw new RuntimeException("Unparsable collection type: "+type);      }      Vector l = org.cougaar.util.StringUtility.parseCSV(arg);      for (Iterator it = l.iterator(); it.hasNext();) {        c.add(parseExpr(etype,(String) it.next()));      }      return c;    } else if ((i = type.indexOf("/")) >= 0) {      String m = type.substring(0, i).trim();      String mt = type.substring(i + 1).trim();      double qty = Double.valueOf(arg).doubleValue();      return createMeasureObject(m, qty, mt);    } else {      Class cl = findClass(type);      try {        if (cl.isInterface()) {          if (TimeSpan.class.isAssignableFrom(cl)) {            Vector svs =  org.cougaar.util.StringUtility.parseCSV(arg);            long startTime = getDefaultStartTime();            long endTime = getDefaultEndTime();            for (Enumeration sp = svs.elements(); sp.hasMoreElements();) {              String ss = (String) sp.nextElement();              int eq = ss.indexOf('=');              String slotname = ss.substring(0, eq).trim();              String vspec = ss.substring(eq + 1).trim();              try {                long time  = parseDate(vspec);                if (slotname.equals("startTime")) {                  startTime = time;                } else if (slotname.equals("endTime")) {                  endTime = time;                }              } catch (ParseException pe) {              }            }            return new TrivialTimeSpan(startTime, endTime);          } else {            // interface means try the COF            return parseWithCOF(cl, arg);          }        } else {          Class ac = getArgClass(cl);          Object[] args = {arg};          Constructor cons = Reflect.getConstructor(ac,stringArgSpec);          if (cons != null) {            // found a constructor - use it            return cons.newInstance(args);          } else {            Method fm = Reflect.getMethod(ac, "create", stringArgSpec);            if (fm == null) {              String n = ac.getName();              // remove the package prefix              n = n.substring(n.lastIndexOf('.') + 1).trim();              fm = Reflect.getMethod(ac, "create"+n, stringArgSpec);              if (fm == null)                 fm = Reflect.getMethod(ac, "get"+n, stringArgSpec);            }            if (fm == null) {              throw new RuntimeException("Couldn't figure out how to construct "+type);            }            return fm.invoke(null,args);          }        }      } catch (Exception e) {	myLogger.error(getAgentIdentifier() + ": Exception constructing "+type+" from \""+arg+"\":");        e.printStackTrace();        throw new RuntimeException("Construction problem "+e);      }    }  }