|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.hammurapi.convert.ConvertingService
public class ConvertingService
| Field Summary | |
|---|---|
static Converter |
CONVERTER
Converter which delegates to convert() method. |
| Constructor Summary | |
|---|---|
ConvertingService()
|
|
| Method Summary | ||
|---|---|---|
static
|
convert(S source,
Class<T> targetType)
Converts source to target type using Java 6 service loading for AtomicConverterBundle, AtomicConverter, and Converter services If no converter is found, this method performs converter discovery through constructors if target type is a class and through duck conversion if target type is an interface. |
|
static
|
convert(S source,
Class<T> targetType,
ClassLoader classLoader)
Converts source to target type using Java 6 service loading for AtomicConverterBundle, AtomicConverter, and Converter services If no converter is found, this method performs converter discovery through constructors if target type is a class and through duck conversion if target type is an interface. |
|
static
|
convert(S source,
Class<T> targetType,
Context context)
Converts source to target type using Java 6 service loading for AtomicConverterBundle, AtomicConverter, and Converter services If no converter is found, this method performs converter discovery through constructors if target type is a class and through duck conversion if target type is an interface. |
|
static
|
convert(S source,
Class<T> targetType,
Context context,
ClassLoader classLoader)
Converts source to target type using Java 6 service loading for AtomicConverterBundle, AtomicConverter, and Converter services If no converter is found, this method performs converter discovery through constructors if target type is a class and through duck conversion if target type is an interface. |
|
static
|
getConverter(Class<S> sourceType,
Class<T> targetType)
Converts source to target type using Java 6 service loading for AtomicConverterBundle, AtomicConverter, and Converter services If no converter is found, this method performs converter discovery through constructors if target type is a class and through duck conversion if target type is an interface. |
|
static
|
getConverter(Class<S> sourceType,
Class<T> targetType,
ClassLoader classLoader)
Converts source to target type using Java 6 service loading for AtomicConverterBundle, AtomicConverter, and Converter services If no converter is found, this method performs converter discovery through constructors if target type is a class and through duck conversion if target type is an interface. |
|
static
|
getConverter(Class<S> sourceType,
Class<T> targetType,
Context context)
Converts source to target type using Java 6 service loading for AtomicConverterBundle, AtomicConverter, and Converter services If no converter is found, this method performs converter discovery through constructors if target type is a class and through duck conversion if target type is an interface. |
|
static
|
getConverter(Class<S> sourceType,
Class<T> targetType,
Context context,
ClassLoader classLoader)
Converts source to target type using Java 6 service loading for AtomicConverterBundle, AtomicConverter, and Converter services If no converter is found, this method performs converter discovery through constructors if target type is a class and through duck conversion if target type is an interface. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Converter CONVERTER
| Constructor Detail |
|---|
public ConvertingService()
| Method Detail |
|---|
public static <S,T> T convert(S source,
Class<T> targetType)
throws ConversionException
convert(source, targetType, false)
source - Source object.targetType - Target type.
ConversionException
public static <S,T> T convert(S source,
Class<T> targetType,
Context context)
throws ConversionException
convert(source, targetType, false)
source - Source object.targetType - Target type.context - Conversion context.
ConversionException
public static <S,T> T convert(S source,
Class<T> targetType,
ClassLoader classLoader)
throws ConversionException
convert(source, targetType, false)
source - Source object.targetType - Target type.classLoader - Class loader, source of converters.
ConversionException
public static <S,T> T convert(S source,
Class<T> targetType,
Context context,
ClassLoader classLoader)
throws ConversionException
source - Source object.targetType - Target type.context - Conversion context.classLoader - Class loader.
ConversionException
public static <S,T> ConverterClosure<S,T> getConverter(Class<S> sourceType,
Class<T> targetType)
sourceType - Source type.targetType - Target type.
ConversionException
public static <S,T> ConverterClosure<S,T> getConverter(Class<S> sourceType,
Class<T> targetType,
ClassLoader classLoader)
sourceType - Source type.targetType - Target type.classLoader - Class loader to retrieve converters from.
ConversionException
public static <S,T> ConverterClosure<S,T> getConverter(Class<S> sourceType,
Class<T> targetType,
Context context)
sourceType - Source type.targetType - Target type.context - Conversion context.
ConversionException
public static <S,T> ConverterClosure<S,T> getConverter(Class<S> sourceType,
Class<T> targetType,
Context context,
ClassLoader classLoader)
sourceType - Source type.targetType - Target type.context - Conversion context.classLoader - Class loader to retrieve converters from.
ConversionException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||