Class XmlMapping


  • public class XmlMapping
    extends java.lang.Object
    Provides an mapping of the XML element/attribute to a load method of a target object.
    Author:
    Daniel Sagenschneider
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String elementName
      Name of XML element containing the value.
      protected java.lang.String loadMethodName
      Name of method on the target object to load the value.
    • Constructor Summary

      Constructors 
      Constructor Description
      XmlMapping​(java.lang.String elementName, java.lang.String loadMethodName)
      Initiate with the element name to obtain the value from to load via the load method to the target object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getElementName()
      Obtains the element name.
      java.lang.String getLoadMethodName()
      Obtains the load method name.
      • Methods inherited from class java.lang.Object

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

      • elementName

        protected final java.lang.String elementName
        Name of XML element containing the value.
      • loadMethodName

        protected final java.lang.String loadMethodName
        Name of method on the target object to load the value.
    • Constructor Detail

      • XmlMapping

        public XmlMapping​(java.lang.String elementName,
                          java.lang.String loadMethodName)
        Initiate with the element name to obtain the value from to load via the load method to the target object.
        Parameters:
        elementName - Name of XML element containing the value.
        loadMethodName - Method of target object to utilise to load the value.
    • Method Detail

      • getElementName

        public java.lang.String getElementName()
        Obtains the element name.
        Returns:
        Element name.
      • getLoadMethodName

        public java.lang.String getLoadMethodName()
        Obtains the load method name.
        Returns:
        Load method name.