Class TranslatorSourceImpl
-
- org.apache.tapestry5.internal.services.TranslatorSourceImpl
-
- All Implemented Interfaces:
,
TranslatorSource
public class TranslatorSourceImpl extends implements
-
-
Constructor Summary
Constructors Constructor Description <,Translator> configuration)
<,Translator> configuration, <,Translator> alternates)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Translator
valueType)
Finds aTranslator
that is appropriate to the given type, which is usually obtained viaBinding.getBindingType()
.Translator
name)
Returns the translator with the given name (either a standard translator, or an alternate).Translator
valueType)
Finds aTranslator
that is appropriate to the given type, which is usually obtained viaBinding.getBindingType()
.void
run()
Invoked by InvalidationEventHub
-
-
-
Constructor Detail
-
TranslatorSourceImpl
public <,Translator> configuration)
-
TranslatorSourceImpl
public <,Translator> configuration, <,Translator> alternates)
-
-
Method Detail
-
get
public name)
Description copied from interface:TranslatorSource
Returns the translator with the given name (either a standard translator, or an alternate).- Specified by:
get
in interfaceTranslatorSource
- Parameters:
name
- name of translator (as configured, but case is ignored)- Returns:
- the shared translator instance
-
getByType
public valueType)
Description copied from interface:TranslatorSource
Finds aTranslator
that is appropriate to the given type, which is usually obtained viaBinding.getBindingType()
. Performs an inheritance-based search for the best match, among the standard translators (not alternates).- Specified by:
getByType
in interfaceTranslatorSource
- Parameters:
valueType
- the type of value for which a default translator is needed- Returns:
- the matching translator
-
findByType
public valueType)
Description copied from interface:TranslatorSource
Finds aTranslator
that is appropriate to the given type, which is usually obtained viaBinding.getBindingType()
. Performs an inheritance-based search for the best match, among the standard translator (not alternates).- Specified by:
findByType
in interfaceTranslatorSource
- Parameters:
valueType
- the type of value for which a default translator is needed- Returns:
- the matching translator, or null if no match can be found
-
run
public void run()
Invoked by InvalidationEventHub- Specified by:
in interface
-
-