Class TranslatorRegistry
- java.lang.Object
-
- net.officefloor.plugin.xml.unmarshall.translate.TranslatorRegistry
-
public class TranslatorRegistry extends java.lang.Object
Registry of the- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.Class<?>,Translator>
translators
Map of the translators.
-
Constructor Summary
Constructors Constructor Description TranslatorRegistry()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Translator
getTranslator(java.lang.Class<?> translateType)
Obtains theTranslator
to the specific type.void
registerTranslator(java.lang.Class<?> type, Translator translator)
Registers aTranslator
.
-
-
-
Field Detail
-
translators
protected final java.util.Map<java.lang.Class<?>,Translator> translators
Map of the translators.
-
-
Method Detail
-
registerTranslator
public void registerTranslator(java.lang.Class<?> type, Translator translator)
Registers aTranslator
.- Parameters:
type
- Type theTranslator
translates.translator
-Translator
.
-
getTranslator
public Translator getTranslator(java.lang.Class<?> translateType) throws XmlMarshallException
Obtains theTranslator
to the specific type.- Parameters:
translateType
- Type ofTranslator
.- Returns:
Translator
to the specific type input.- Throws:
XmlMarshallException
- Should aTranslator
not be registered for the translateType.
-
-