if (entry.getKey() instanceof Collection) {
while (iter.hasNext()) {
((Collection<Object>) entry.getKey()).add(ctx.getObject(iter.next().getId()));
}
} else if (entry.getKey() instanceof Map && !((Map) entry.getKey()).containsKey(SerializationParts.ENCODED_TYPE)) {
UnsatisfiedForwardLookup u1 = iter.next();
if (!iter.hasNext()) {
if (u1.getKey() != null) {
if (u1.getKey() instanceof UnsatisfiedForwardLookup) {
((Map<Object, Object>) entry.getKey()).put(ctx.getObject(((UnsatisfiedForwardLookup) u1.getKey()).getId()), ctx.getObject(u1.getId()));
} else {
((Map<Object, Object>) entry.getKey()).put(u1.getKey(), ctx.getObject(u1.getId()));
}
} else if (u1.getVal() != null) {
((Map<Object, Object>) entry.getKey()).put(ctx.getObject(u1.getId()), u1.getVal());
} else {
throw new RuntimeException("error resolving dependencies in payload (Map Element): " + u1.getId());
}
} else {
UnsatisfiedForwardLookup u2 = iter.next();
((Map<Object, Object>) entry.getKey()).put(ctx.getObject(u1.getId()), ctx.getObject(u2.getId()));
}
} else {
UnsatisfiedForwardLookup ufl;
while (iter.hasNext()) {
if ((ufl = iter.next()).getPath() == null) {
throw new RuntimeException("cannot satisfy dependency in object graph (path unresolvable):" + ufl.getId());
} else {
MVEL.setProperty(entry.getKey(), ufl.getPath(), ctx.getObject(ufl.getId()));
}
}
}