Object value = entry.getValue();
if ( value instanceof AnyValue ) {
try {
castedMap.put(entry.getKey(), entryDescriptor.valueOf(((AnyValue)value).load(context), context));
} catch (Exception e) {
throw new ValueCastException(new ErrorMessage("uncastableArrayValue", new Object[] { value }));
}
} else {
castedMap.put(entry.getKey(), entryDescriptor.valueOf(value, context));
}
}
} else {
if ( !castedMap.containsKey(key) ) {
if ( !parameterDescriptor.isRequired() ) {
castedMap.put(key, parameterDescriptor.getDefaultValue());
}
} else {
Object object = castedMap.get(key);
if ( object instanceof AnyValue ) {
try {
object = ((AnyValue)object).load(context);
} catch (Exception e) {
throw new ValueCastException(new ErrorMessage("uncastableArrayValue", new Object[] { object }), e);
}
}
if ( object.equals(parameterDescriptor.getDefaultValue())) {
castedMap.put(key, object);
} else {