Package com.evolveum.midpoint.prism.util
Class JavaTypeConverter
- java.lang.Object
-
- com.evolveum.midpoint.prism.util.JavaTypeConverter
-
public class JavaTypeConverter extends Object
Generic universal type converter. It is supposed to covert anything to anything as long as there is any way to convert it. This means converting string containing a decimal representation of a number to int, PolyString to string, etc. This is supposed to work in a fashion similar to many scripting languages (e.g. perl) where the programmer does not really care about the type and the type conversion is done automatically.TODO clean this up as it is now part of prism-api!
- Author:
- Radovan Semancik
-
-
Constructor Summary
Constructors Constructor Description JavaTypeConverter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object
convert(Class<?> expectedType, Object rawValue, boolean failIfImpossible)
static <T> T
convert(Class<T> expectedType, Object rawValue)
static <T> boolean
isTypeCompliant(T value, @Nullable Class<?> expectedClass)
-