Class ObjectLoaderFactory


  • public class ObjectLoaderFactory
    extends java.lang.Object
    Loads objects onto a target object.
    Author:
    Daniel Sagenschneider
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.Class<?> targetObjectType
      Class of the target object.
    • Constructor Summary

      Constructors 
      Constructor Description
      ObjectLoaderFactory​(java.lang.Class<?> targetObjectType)
      Initiate the Object Loader.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ObjectLoader createObjectLoader​(java.lang.String loadMethodName, java.lang.Class<?> loadObjectType)
      Creates the ObjectLoader for the load method of the target object.
      protected java.lang.reflect.Method findMethod​(java.lang.Class objectClass, java.lang.String methodName, java.lang.Class parameterClass)
      Obtains the method of the input class by the input method name.
      • Methods inherited from class java.lang.Object

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

      • targetObjectType

        protected final java.lang.Class<?> targetObjectType
        Class of the target object.
    • Constructor Detail

      • ObjectLoaderFactory

        public ObjectLoaderFactory​(java.lang.Class<?> targetObjectType)
        Initiate the Object Loader.
        Parameters:
        targetObjectType - Class of the target object.
    • Method Detail

      • createObjectLoader

        public ObjectLoader createObjectLoader​(java.lang.String loadMethodName,
                                               java.lang.Class<?> loadObjectType)
                                        throws XmlMarshallException
        Creates the ObjectLoader for the load method of the target object.
        Parameters:
        loadMethodName - Method name that loads the Object.
        loadObjectType - Type of Object being loaded.
        Returns:
        ObjectLoader to load the object to the target object.
        Throws:
        XmlMarshallException - Should there be a failure to create the ObjectLoader.
      • findMethod

        protected java.lang.reflect.Method findMethod​(java.lang.Class objectClass,
                                                      java.lang.String methodName,
                                                      java.lang.Class parameterClass)
                                               throws XmlMarshallException
        Obtains the method of the input class by the input method name.
        Parameters:
        objectClass - Class to identify the method from.
        methodName - Name of method to find.
        parameterClass - Class of parameter to method.
        Returns:
        Method of class.
        Throws:
        XmlMarshallException - If failed to find method to load.