Class DynamicValueLoader


  • public class DynamicValueLoader
    extends AbstractValueLoader
    Loader to load value onto target object.
    Author:
    Daniel Sagenschneider
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Translator translator
      Translator to translate the XML string value to type to load onto the object.
    • Constructor Summary

      Constructors 
      Constructor Description
      DynamicValueLoader​(java.lang.reflect.Method loadMethod, Translator translator)
      Initiate.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void loadValue​(java.lang.Object targetObject, java.lang.String value)
      Loads the XML string value onto the target object.
      • Methods inherited from class java.lang.Object

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

      • translator

        protected final Translator translator
        Translator to translate the XML string value to type to load onto the object.
    • Constructor Detail

      • DynamicValueLoader

        public DynamicValueLoader​(java.lang.reflect.Method loadMethod,
                                  Translator translator)
        Initiate.
        Parameters:
        loadMethod - Method to use to load value onto the target object.
        translator - Translator to translate the XML string value to type to load onto the object.
    • Method Detail

      • loadValue

        public void loadValue​(java.lang.Object targetObject,
                              java.lang.String value)
                       throws XmlMarshallException
        Loads the XML string value onto the target object.
        Parameters:
        targetObject - Target object to have value loaded on.
        value - Value to load onto the target object.
        Throws:
        XmlMarshallException - Failed to load value onto target object.