Package com.gengoai.conversion
Class Converter
- java.lang.Object
-
- com.gengoai.conversion.Converter
-
public final class Converter extends Object
The type Converter.- Author:
- David B. Bracewell
-
-
Constructor Summary
Constructors Constructor Description Converter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
convert(Object sourceObject, Class<?> destType, Type... parameters)
Convert t.static <T> T
convert(Object sourceObject, Class<T> destType)
Convert t.static <T> T
convert(Object sourceObject, Type destType)
Convert t.static <T> T
convertSilently(Object sourceObject, Class<?> destType, Type... parameters)
Convert silently t.static <T> T
convertSilently(Object sourceObject, Class<T> destType)
Convert silently t.static <T> T
convertSilently(Object sourceObject, Type destType)
Convert silently t.
-
-
-
Method Detail
-
convertSilently
public static <T> T convertSilently(Object sourceObject, Class<T> destType)
Convert silently t.- Type Parameters:
T
- the type parameter- Parameters:
sourceObject
- the source objectdestType
- the dest type- Returns:
- the t
-
convertSilently
public static <T> T convertSilently(Object sourceObject, Class<?> destType, Type... parameters)
Convert silently t.- Type Parameters:
T
- the type parameter- Parameters:
sourceObject
- the source objectdestType
- the dest typeparameters
- the parameters- Returns:
- the t
-
convertSilently
public static <T> T convertSilently(Object sourceObject, Type destType)
Convert silently t.- Type Parameters:
T
- the type parameter- Parameters:
sourceObject
- the source objectdestType
- the dest type- Returns:
- the t
-
convert
public static <T> T convert(Object sourceObject, Class<?> destType, Type... parameters) throws TypeConversionException
Convert t.- Type Parameters:
T
- the type parameter- Parameters:
sourceObject
- the source objectdestType
- the dest typeparameters
- the parameters- Returns:
- the t
- Throws:
TypeConversionException
- the type conversion exception
-
convert
public static <T> T convert(Object sourceObject, Class<T> destType) throws TypeConversionException
Convert t.- Type Parameters:
T
- the type parameter- Parameters:
sourceObject
- the source objectdestType
- the dest type- Returns:
- the t
- Throws:
TypeConversionException
- the type conversion exception
-
convert
public static <T> T convert(Object sourceObject, Type destType) throws TypeConversionException
Convert t.- Type Parameters:
T
- the type parameter- Parameters:
sourceObject
- the source objectdestType
- the dest type- Returns:
- the t
- Throws:
TypeConversionException
- the type conversion exception
-
-