lumis.util.converter
Class DelegateToRegisteredConverter

Package class diagram package DelegateToRegisteredConverter
java.lang.Object
  extended by lumis.util.converter.DelegateToRegisteredConverter
All Implemented Interfaces:
IConverter

public class DelegateToRegisteredConverter
extends Object
implements IConverter

This converter just delegates the conversions to ConvertUtil.convert(Class, Object, Locale, String). If value is null or is instance of destination class, it is returned directly.

Since:
4.0.4
See Also:
ConvertUtil.convert(Class, Object, Locale, String)

Constructor Summary
DelegateToRegisteredConverter()
           
 
Method Summary
<T> T
convert(Class<T> type, Object value)
          Converts the specified input object into an output object of the specified type.
<T> T
convert(Class<T> type, Object value, Locale locale)
          Converts the specified input object into an output object of the specified type.
<T> T
convert(Class<T> type, Object value, Locale locale, String pattern)
          Converts the specified input object into an output object of the specified type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegateToRegisteredConverter

public DelegateToRegisteredConverter()
Method Detail

convert

public <T> T convert(Class<T> type,
                     Object value,
                     Locale locale,
                     String pattern)
Description copied from interface: IConverter
Converts the specified input object into an output object of the specified type.

Specified by:
convert in interface IConverter
Type Parameters:
T - generics support for the data type specified.
Parameters:
type - data type to which the value should be converted.
value - the input value to be converted.
locale - locale to be used during conversion, if necessary.
pattern - converter specific conversion pattern, to be used during conversion, if necessary.

convert

public <T> T convert(Class<T> type,
                     Object value,
                     Locale locale)
Description copied from interface: IConverter
Converts the specified input object into an output object of the specified type.

Specified by:
convert in interface IConverter
Type Parameters:
T - generics support for the data type specified.
Parameters:
type - data type to which the value should be converted.
value - the input value to be converted.
locale - locale to be used during conversion

convert

public <T> T convert(Class<T> type,
                     Object value)
Description copied from interface: IConverter
Converts the specified input object into an output object of the specified type.

Specified by:
convert in interface IConverter
Type Parameters:
T - generics support for the data type specified.
Parameters:
type - data type to which the value should be converted.
value - the input value to be converted.


Lumisportal  5.5.0.091130 - Copyright © 2001-2007, Lumis. All Rights Reserved.