Class ReferenceXmlMapping

  • All Implemented Interfaces:
    XmlMapping

    public class ReferenceXmlMapping
    extends java.lang.Object
    implements XmlMapping
    Enables referencing another XmlWriter to write the XML of the object obtained from the source object.
    Author:
    Daniel Sagenschneider
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected XmlMapping delegate
      XmlMapping being wrapped to delegate XML writing.
      protected java.lang.String getMethodName
      Name of method to obtain object to write as XML.
      protected java.util.Map<java.lang.Class<?>,​java.lang.reflect.Method> methods
      Methods specific to a class.
    • Constructor Summary

      Constructors 
      Constructor Description
      ReferenceXmlMapping​(java.lang.reflect.Method getMethod, XmlMapping delegate)
      Initiate to apply reference mapping.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      XmlWriter getWriter()
      Obtains the XmlWriter for this mapping.
      void map​(java.lang.Object source, XmlOutput output)
      Maps the object into XML.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • getMethodName

        protected final java.lang.String getMethodName
        Name of method to obtain object to write as XML.
      • methods

        protected final java.util.Map<java.lang.Class<?>,​java.lang.reflect.Method> methods
        Methods specific to a class.
    • Constructor Detail

      • ReferenceXmlMapping

        public ReferenceXmlMapping​(java.lang.reflect.Method getMethod,
                                   XmlMapping delegate)
        Initiate to apply reference mapping.
        Parameters:
        getMethod - Method to obtain object to apply reference from upper bound type of source object.
        delegate - Delgate to object the XmlWriter to write the XML.