org.apache.tapestry.coerce
Interface ValueConverter

All Known Implementing Classes:
ValueConverterImpl

public interface ValueConverter

Converts a value (possibly null) to an alternate data type; typically from String to boolean or a number type.

Typically, a ValueConverter will select a particular TypeConverterto perform the conversion. The ValueConverterImplimplementation also makes use of built-in PropertyEditors.

Since:
4.0
Author:
Howard M. Lewis Ship

Method Summary
 Object coerceValue(Object value, Class desiredType)
          Performs a conversion of a value to a particular type.
 

Method Detail

coerceValue

Object coerceValue(Object value,
                   Class desiredType)
Performs a conversion of a value to a particular type.

Parameters:
value - The value to be converted (may be null)
desiredType - the type that will be converted to
Throws:
org.apache.hivemind.ApplicationRuntimeException - if the value can not be converted


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.