org.apache.tapestry.coerce
Class TypeConverterWrapper

java.lang.Object
  extended by org.apache.tapestry.coerce.TypeConverterWrapper
All Implemented Interfaces:
TypeConverter

public final class TypeConverterWrapper
extends java.lang.Object
implements TypeConverter

A service implementation that works around an StrategyRegistry. The registry is contructed from a configuration that follows the tapestry.coerce.Converters schema (a List of TypeConverterContributionplus an additional converter for nulls.

Since:
4.0
Author:
Howard M. Lewis Ship

Constructor Summary
TypeConverterWrapper()
           
 
Method Summary
 java.lang.Object convertValue(java.lang.Object value)
          Converts the value.
 void initializeService()
           
 void setContributions(java.util.List contributions)
          Sets the List of TypeConverterContributions.
 void setNullConverter(TypeConverter nullConverter)
          Sets the converter used to convert null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeConverterWrapper

public TypeConverterWrapper()
Method Detail

initializeService

public void initializeService()

convertValue

public java.lang.Object convertValue(java.lang.Object value)
Description copied from interface: TypeConverter
Converts the value.

Specified by:
convertValue in interface TypeConverter
Parameters:
value - the value to be converted (which may be null)
Returns:
the value converted to a specific type; different implementations of TypeConverter will return different types.

setContributions

public void setContributions(java.util.List contributions)
Sets the List of TypeConverterContributions.


setNullConverter

public void setNullConverter(TypeConverter nullConverter)
Sets the converter used to convert null.