All Known Implementing Classes:
ObjectMarshalContext, SequencedMarshalContext

public interface MarshalContext
The MarshalContext allows mappings to be marshalled differently depending on the type of object. For example POJOs are marshalled based on the order in which mappings were added to the descriptor, while sequenced objects are based on the order of their Setting objects.
  • Method Details

    • getMarshalContext

      MarshalContext getMarshalContext(int index)
      Returns:
      Return the MarshalContext at the specified position.
    • getNonAttributeChildrenSize

      int getNonAttributeChildrenSize(XPathNode xPathNode)
      Returns:
      The number of non-attribute children. For POJOs this is based on the number of non-attribute mappings, and for sequenced objects this is based on the number of Setting objects.
    • getNonAttributeChild

      Object getNonAttributeChild(int index, XPathNode xPathNode)
      Returns:
      The non-attribute child at the specified index for the specified xPathNode.
    • getAttributeValue

      Object getAttributeValue(Object object, Mapping mapping)
      Returns:
      the attribute value corresponding to the object parameter.
    • marshal

      boolean marshal(NodeValue nodeValue, XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver)
      Perform a marshal using the NodeValue parameter.
      Returns:
      If anything as marshalled as a result of this call.
    • marshal

      boolean marshal(NodeValue nodeValue, XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver, XPathFragment rootFragment)