Class ValueLoaderFactory
- java.lang.Object
-
- net.officefloor.plugin.xml.unmarshall.load.ValueLoaderFactory
-
public class ValueLoaderFactory extends java.lang.ObjectLoads string values onto a target object.- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Class<?>targetObjectTypeClass of the target object.protected TranslatorRegistrytranslatorRegistryRegistry ofTranslatorobjects.
-
Constructor Summary
Constructors Constructor Description ValueLoaderFactory(TranslatorRegistry translatorRegistry, java.lang.Class<?> targetObjectType)Initiate the value loader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DynamicValueLoadercreateDynamicValueLoader(java.lang.String loadMethodName)Creates theDynamicValueLoaderfor the load method of the target object.StaticValueLoadercreateStaticValueLoader(java.lang.String loadMethodName, java.lang.String value)Creates theStaticValueLoaderfor the load method of the target object.
-
-
-
Field Detail
-
translatorRegistry
protected final TranslatorRegistry translatorRegistry
Registry ofTranslatorobjects.
-
targetObjectType
protected final java.lang.Class<?> targetObjectType
Class of the target object.
-
-
Constructor Detail
-
ValueLoaderFactory
public ValueLoaderFactory(TranslatorRegistry translatorRegistry, java.lang.Class<?> targetObjectType)
Initiate the value loader.- Parameters:
translatorRegistry- Registry of translators.targetObjectType- Class of the target object.
-
-
Method Detail
-
createDynamicValueLoader
public DynamicValueLoader createDynamicValueLoader(java.lang.String loadMethodName) throws XmlMarshallException
Creates theDynamicValueLoaderfor the load method of the target object.- Parameters:
loadMethodName- Name of method to use to load the value.- Returns:
DynamicValueLoaderto load the value to the target object.- Throws:
XmlMarshallException- Should there be a failure to create theDynamicValueLoader.
-
createStaticValueLoader
public StaticValueLoader createStaticValueLoader(java.lang.String loadMethodName, java.lang.String value) throws XmlMarshallException
Creates theStaticValueLoaderfor the load method of the target object.- Parameters:
loadMethodName- Name of method to use to load the static value.value- Static value to load to the target object.- Returns:
StaticValueLoaderto load the static value onto the target object.- Throws:
XmlMarshallException- Should there be a failure to create theStaticValueLoader.
-
-