private void prepareFields(final Object subject, final ClonerPutField fields) throws InvalidObjectException {
final Map<String, SerializableField> defMap = fields.fieldDefMap;
final Map<String, ReadField> map = fields.fieldMap;
try {
for (String name : defMap.keySet()) {
final SerializableField serializableField = defMap.get(name);
final Field realField = serializableField.getField();
if (realField != null) switch (serializableField.getKind()) {
case BOOLEAN: map.put(name, new BooleanReadField(serializableField, realField.getBoolean(subject))); continue;
case BYTE: map.put(name, new ByteReadField(serializableField, realField.getByte(subject))); continue;
case CHAR: map.put(name, new CharReadField(serializableField, realField.getChar(subject))); continue;
case DOUBLE: map.put(name, new DoubleReadField(serializableField, realField.getDouble(subject))); continue;
case FLOAT: map.put(name, new FloatReadField(serializableField, realField.getFloat(subject))); continue;