Class AbstractTranslator<T>
- java.lang.Object
-
- org.apache.tapestry5.internal.translator.AbstractTranslator<T>
-
- All Implemented Interfaces:
Translator<T>
- Direct Known Subclasses:
NumericTranslator,StringTranslator
public abstract class AbstractTranslator<T> extends Object implements Translator<T>
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractTranslator(String name, Class<T> type, String messageKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetMessageKey()Returns the message key, within the application's global message catalog, normally used by this validator.StringgetName()Returns a unique name for the translator.Class<T>getType()Returns the type of the server-side value.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.tapestry5.Translator
parseClient, render, toClient
-
-
-
-
Constructor Detail
-
AbstractTranslator
protected AbstractTranslator(String name, Class<T> type, String messageKey)
-
-
Method Detail
-
getMessageKey
public String getMessageKey()
Description copied from interface:TranslatorReturns the message key, within the application's global message catalog, normally used by this validator. This is used to provide the formatted message toTranslator.parseClient(Field, String, String)orTranslator.render(Field, String, MarkupWriter, org.apache.tapestry5.services.FormSupport).- Specified by:
getMessageKeyin interfaceTranslator<T>- Returns:
- a message key
-
getType
public Class<T> getType()
Description copied from interface:TranslatorReturns the type of the server-side value.- Specified by:
getTypein interfaceTranslator<T>- Returns:
- a type
-
getName
public String getName()
Description copied from interface:TranslatorReturns a unique name for the translator. This is used to identify the translator by name, but is also used when locating override messages for the translator.- Specified by:
getNamein interfaceTranslator<T>- Returns:
- unique name for the translator
-
-