// If possible, write as id already
if (objectId.writeAsId(jgen, provider, w)) {
return;
}
// If not, need to inject the id:
Object id = objectId.generateId(bean);
if (w.alwaysAsId) {
w.serializer.serialize(id, jgen, provider);
return;
}
if (startEndObject) {