public void marshal(Object original, final HierarchicalStreamWriter writer, final MarshallingContext context) { final Object source = serializationMethodInvoker.callWriteReplace(original); if (source.getClass() != original.getClass()) { writer.addAttribute(mapper.aliasForAttribute("resolves-to"), mapper.serializedClass(source.getClass())); } OwnerContext oc = OwnerContext.find(context); oc.startVisiting(writer, classOwnership.ownerOf(original.getClass())); try { doMarshal(source, writer, context); } finally { oc.stopVisiting(); } }
public void marshal(Object original, final HierarchicalStreamWriter writer, final MarshallingContext context) { final Object source = serializationMethodInvoker.callWriteReplace(original); if (source.getClass() != original.getClass()) { writer.addAttribute(mapper.aliasForAttribute("resolves-to"), mapper.serializedClass(source.getClass())); } doMarshal(source, writer, context); }
public void marshal(Object original, final HierarchicalStreamWriter writer, final MarshallingContext context) { final Object source = serializationMethodInvoker.callWriteReplace(original); if (source.getClass() != original.getClass()) { writer.addAttribute(mapper.aliasForAttribute("resolves-to"), mapper.serializedClass(source.getClass())); } doMarshal(source, writer, context); }
public void marshal(Object original, final HierarchicalStreamWriter writer, final MarshallingContext context) { final Object source = serializationMethodInvoker.callWriteReplace(original); if (source.getClass() != original.getClass()) { writer.addAttribute(mapper.aliasForAttribute("resolves-to"), mapper.serializedClass(source.getClass())); } doMarshal(source, writer, context); }
public void marshal(Object original, final HierarchicalStreamWriter writer, final MarshallingContext context) { final Object source = serializationMethodInvoker.callWriteReplace(original); if (source.getClass() != original.getClass()) { writer.addAttribute(mapper.aliasForAttribute("resolves-to"), mapper.serializedClass(source.getClass())); } doMarshal(source, writer, context); }
public void marshal(Object original, final HierarchicalStreamWriter writer, final MarshallingContext context) { final Object source = serializationMethodInvoker.callWriteReplace(original); if (source.getClass() != original.getClass()) { String attributeName = mapper.aliasForSystemAttribute("resolves-to"); if (attributeName != null) { writer.addAttribute(attributeName, mapper.serializedClass(source.getClass())); } context.convertAnother(source); } else { doMarshal(source, writer, context); } }
public void marshal(Object original, final HierarchicalStreamWriter writer, final MarshallingContext context) { final Object source = serializationMethodInvoker.callWriteReplace(original); if (source.getClass() != original.getClass()) { String attributeName = mapper.aliasForSystemAttribute("resolves-to"); if (attributeName != null) { writer.addAttribute(attributeName, mapper.serializedClass(source.getClass())); } context.convertAnother(source); } else { doMarshal(source, writer, context); } }
public void marshal(Object original, final HierarchicalStreamWriter writer, final MarshallingContext context) { final Object source = serializationMethodInvoker.callWriteReplace(original); if (source.getClass() != original.getClass()) { writer.addAttribute(mapper.aliasForAttribute("resolves-to"), mapper.serializedClass(source.getClass())); } OwnerContext oc = OwnerContext.find(context); oc.startVisiting(writer, classOwnership.ownerOf(original.getClass())); try { doMarshal(source, writer, context); } finally { oc.stopVisiting(); } }
public void marshal(Object original, final HierarchicalStreamWriter writer, final MarshallingContext context) { final Object source = serializationMethodInvoker.callWriteReplace(original); if (source != original && context instanceof ReferencingMarshallingContext) { ((ReferencingMarshallingContext)context).replace(original, source); } if (source.getClass() != original.getClass()) { String attributeName = mapper.aliasForSystemAttribute("resolves-to"); if (attributeName != null) { writer.addAttribute(attributeName, mapper.serializedClass(source.getClass())); } context.convertAnother(source); } else { doMarshal(source, writer, context); } }
public void marshal(Object original, final HierarchicalStreamWriter writer, final MarshallingContext context) { final Object source = serializationMethodInvoker.callWriteReplace(original); if (source != original && context instanceof ReferencingMarshallingContext) { ((ReferencingMarshallingContext)context).replace(original, source); } if (source.getClass() != original.getClass()) { String attributeName = mapper.aliasForSystemAttribute("resolves-to"); if (attributeName != null) { writer.addAttribute(attributeName, mapper.serializedClass(source.getClass())); } context.convertAnother(source); } else { doMarshal(source, writer, context); } }