try { XMLParameter p = getParameter("name"); setName(p.getString(this)); } catch (Exception ex) { setName("Unknown"); }
    protected void setMessages(SysexMessage[] messages) {        if (messages.length != sysex.length) {            throw new IllegalArgumentException("Wrong number of sysex messages.");        }        LinkedList l = new LinkedList();        for (int i = 0; i < descs.length; i++) {            l.add(descs[i]);            sysex[i] = null;        }        for (int i = 0; i < messages.length; i++) {            String header = getHeader(messages[i].getData());            Iterator it = l.iterator();            boolean found = false;            while (it.hasNext()) {                SysexDesc d = (SysexDesc)it.next();                if (d.matches(header)) {                    found = true;                    sysex[d.getId()] = messages[i].getData();                    it.remove();                    break;                }            }            if (!found)                throw new IllegalArgumentException("Unrecognized message with header "+header);        }    }