Class ValueLoaderFactory
java.lang.Object
net.officefloor.plugin.xml.unmarshall.load.ValueLoaderFactory
Loads string values onto a target object.
- Author:
- Daniel Sagenschneider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Class<?>Class of the target object.protected final TranslatorRegistryRegistry ofTranslatorobjects. -
Constructor Summary
ConstructorsConstructorDescriptionValueLoaderFactory(TranslatorRegistry translatorRegistry, Class<?> targetObjectType) Initiate the value loader. -
Method Summary
Modifier and TypeMethodDescriptioncreateDynamicValueLoader(String loadMethodName) Creates theDynamicValueLoaderfor the load method of the target object.createStaticValueLoader(String loadMethodName, String value) Creates theStaticValueLoaderfor the load method of the target object.
-
Field Details
-
translatorRegistry
Registry ofTranslatorobjects. -
targetObjectType
Class of the target object.
-
-
Constructor Details
-
ValueLoaderFactory
Initiate the value loader.- Parameters:
translatorRegistry- Registry of translators.targetObjectType- Class of the target object.
-
-
Method Details
-
createDynamicValueLoader
public DynamicValueLoader createDynamicValueLoader(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(String loadMethodName, 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.
-