Class ValueLoaderFactory
- java.lang.Object
-
- net.officefloor.plugin.xml.unmarshall.load.ValueLoaderFactory
-
public class ValueLoaderFactory extends java.lang.Object
Loads string values 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.protected TranslatorRegistry
translatorRegistry
Registry ofTranslator
objects.
-
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 DynamicValueLoader
createDynamicValueLoader(java.lang.String loadMethodName)
Creates theDynamicValueLoader
for the load method of the target object.StaticValueLoader
createStaticValueLoader(java.lang.String loadMethodName, java.lang.String value)
Creates theStaticValueLoader
for the load method of the target object.
-
-
-
Field Detail
-
translatorRegistry
protected final TranslatorRegistry translatorRegistry
Registry ofTranslator
objects.
-
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 theDynamicValueLoader
for the load method of the target object.- Parameters:
loadMethodName
- Name of method to use to load the value.- Returns:
DynamicValueLoader
to 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 theStaticValueLoader
for 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:
StaticValueLoader
to load the static value onto the target object.- Throws:
XmlMarshallException
- Should there be a failure to create theStaticValueLoader
.
-
-