public Flow newInstance(Object described) { List l = (List) described; Flow o = new Flow(); if (l.size() <= 3) { throw new DecodeException("The outgoing-window field cannot be omitted"); } switch (11 - l.size()) { case 0: o.setProperties((Map) l.get(10)); case 1: Boolean echo = (Boolean) l.get(9); o.setEcho(echo == null ? false : echo); case 2: Boolean drain = (Boolean) l.get(8); o.setDrain(drain == null ? false : drain); case 3: o.setAvailable((UnsignedInteger) l.get(7)); case 4: o.setLinkCredit((UnsignedInteger) l.get(6)); case 5: o.setDeliveryCount((UnsignedInteger) l.get(5)); case 6: o.setHandle((UnsignedInteger) l.get(4)); case 7: o.setOutgoingWindow((UnsignedInteger) l.get(3)); case 8: o.setNextOutgoingId((UnsignedInteger) l.get(2)); case 9: o.setIncomingWindow((UnsignedInteger) l.get(1)); case 10: o.setNextIncomingId((UnsignedInteger) l.get(0)); } return o; }