return;
}
ValueObject.TYPE objectType = val.getObjectType();
switch (objectType) {
case CUSTOM:
ValueCustom custom = val.asCustom();
Class<? extends ValueObject> type = custom.getContainerClass();
Integer classID = classIndex.getObjectIndex(type);
if (classID == null) {
classID = classIndex.createObjectIndex(type);
out.write(TYPE.CUSTOM_CLASS.val);
Bytes.writeLength(classID, out);
Bytes.writeString(type.getName(), out);
} else {
out.write(TYPE.CUSTOM_INDEX.val);
Bytes.writeLength(classID, out);
}
encodeValue(custom.asMap(), out, classIndex);
break;
case MAP:
ValueMap map = val.asMap();
out.write(TYPE.MAP.val);
Bytes.writeLength(map.size(), out);