static void writeSlotWithDefaultMethod(ClassMetaDataSlot slot, ObjectOutput out, Object obj, ObjectSubstitutionInterface substitution) throws IOException
{
ObjectOutputStream oos = new ObjectOutputStreamProxy(out,obj,slot,substitution);
ObjectOutputStream.PutField putField = oos.putFields();
ClassMetadataField[] fields = slot.getFields();
FieldsManager fieldsManager = FieldsManager.getFieldsManager();
if (isDebug)
{
log.debug("writeSlotWithDefaultMethod slot=" + slot.getSlotClass().getName() + " and " + fields.length + " fields");
}
for (int fieldNR=0;fieldNR<fields.length;fieldNR++)
{
ClassMetadataField classMetadataField = fields[fieldNR];
Class type = classMetadataField.getField().getType();
String fieldName = classMetadataField.getFieldName();
if (isDebug)
{
log.debug("writeSlotWithDefaultMethod FieldNr=" + fieldNR);
}
if (type==Boolean.TYPE)
{
putField.put(fieldName, fieldsManager.getBoolean(obj,classMetadataField));
}
else
if (type==Byte.TYPE)
{
putField.put(fieldName, fieldsManager.getByte(obj,classMetadataField));
}
else
if (type==Character.TYPE)
{
putField.put(fieldName, fieldsManager.getCharacter(obj,classMetadataField));
}
else
if (type==Short.TYPE)
{
putField.put(fieldName, fieldsManager.getShort(obj,classMetadataField));
}
else
if (type==Integer.TYPE)
{
putField.put(fieldName, fieldsManager.getInt(obj,classMetadataField));
}
else
if (type==Long.TYPE)
{
putField.put(fieldName, fieldsManager.getLong(obj,classMetadataField));
}
else
if (type==Float.TYPE)
{
putField.put(fieldName, fieldsManager.getFloat(obj,classMetadataField));
}
else
if (type==Double.TYPE)
{
putField.put(fieldName, fieldsManager.getDouble(obj,classMetadataField));
}
else
{
Object value = fieldsManager.getObject(obj,classMetadataField);
putField.put(fieldName, value);
if (isDebug)
{
if (value==null)
{