}
@Override
public byte[] serializeLegacyModelInitializerEntry(Object object) throws IOException {
//Happens in the app classloader
LegacyModelInitializerEntry entry = (LegacyModelInitializerEntry)object;
ModelNode node = new ModelNode();
if (entry.getParentAddress() != null) {
node.get(PARENT_ADDRESS).set(entry.getParentAddress().toModelNode());
}
node.get(RELATIVE_RESOURCE_ADDRESS).set(PathAddress.pathAddress(entry.getRelativeResourceAddress()).toModelNode());
if (entry.getModel() != null) {
node.get(MODEL_NODE).set(entry.getModel());
}
return serializeModelNode(node);
}