w.append(loadRec(elt, anchors, visited, ctx));
}
result = values.constructor(Node_sequence, w.done());
}
else if (obj instanceof Map) {
IMapWriter w = values.mapWriter(Node, Node);
Map<Object, Object> m = (Map<Object,Object>)obj;
for (Map.Entry<Object,Object> e: m.entrySet()) {
w.put(loadRec(e.getKey(), anchors, visited, ctx), loadRec(e.getValue(), anchors, visited, ctx));
}
result = values.constructor(Node_mapping, w.done());
}
else {
throw RuntimeExceptionFactory.illegalArgument(
values.string(obj.toString() + " (class=" + obj.getClass() + ")"),
ctx.getCurrentAST(), ctx.getStackTrace());