Class TypeConversionHelper
java.lang.Object
org.datanucleus.store.types.converters.TypeConversionHelper
Class with methods for type conversion.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TypeConversionHelper
public TypeConversionHelper()
-
-
Method Details
-
convertTo
Convert the value to a instance of the given type. The value is converted only if the type can't be assigned from the current type of the value instance.- Parameters:
value
- the value to be convertedtype
- the type of the expected object returned from the conversion- Returns:
- the converted object, or the input value if the object can't be converted
-