lumis.util.converter
Class ConvertUtil

Package class diagram package ConvertUtil
java.lang.Object
  extended by lumis.util.converter.ConvertUtil

public class ConvertUtil
extends java.lang.Object

This class offers utility conversion methods.

Since:
4.0.4

Field Summary
static IConverter DELEGATE_TO_REGISTERED_CONVERTER
          A converter that delegates calls to it to a registered converter.
 
Constructor Summary
ConvertUtil()
           
 
Method Summary
static
<T,R extends java.util.Collection<T>>
java.util.Collection<T>
convert(java.lang.Class<T> valueType, java.lang.Iterable input, R output, java.util.Locale locale, java.lang.String pattern)
           
static
<T> T
convert(java.lang.Class<T> type, java.lang.Object value, java.util.Locale locale, java.lang.String pattern)
           
static IConverter createConverter(java.lang.Class type)
          Create the appropriated converter for the given type.
static void deregister(java.lang.Class type)
           
static void register(java.lang.Class type, java.lang.Class<? extends IConverter> converterClass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELEGATE_TO_REGISTERED_CONVERTER

public static final IConverter DELEGATE_TO_REGISTERED_CONVERTER
A converter that delegates calls to it to a registered converter.

Since:
4.0.4
See Also:
DelegateToRegisteredConverter
Constructor Detail

ConvertUtil

public ConvertUtil()
Method Detail

register

public static void register(java.lang.Class type,
                            java.lang.Class<? extends IConverter> converterClass)

deregister

public static void deregister(java.lang.Class type)

createConverter

public static IConverter createConverter(java.lang.Class type)
                                  throws UnsupportedConversionTypeException
Create the appropriated converter for the given type.

Parameters:
type - the type that needs to be converted.
Returns:
an instance of the appropriated converter for the given type.
Throws:
UnsupportedConversionTypeException - if the conversion is not supported.
Since:
6.0.0

convert

public static <T> T convert(java.lang.Class<T> type,
                            java.lang.Object value,
                            java.util.Locale locale,
                            java.lang.String pattern)

convert

public static <T,R extends java.util.Collection<T>> java.util.Collection<T> convert(java.lang.Class<T> valueType,
                                                                                    java.lang.Iterable input,
                                                                                    R output,
                                                                                    java.util.Locale locale,
                                                                                    java.lang.String pattern)


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