List of usage examples for org.springframework.beans TypeConverter getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:com.surveypanel.form.Form.java
/** * Convert the given value from one type to another using the converter assigned to the given FormElement. * * @param question The FormElement/* w w w . j ava2 s .co m*/ * @param value The value * @param locale The locale * @return The new typed object * @throws Exception Any exception */ protected Object convert(QuestionImpl question, Object value, Locale locale) throws Exception { if (value == null) { return null; } TypeConverter typeConverter = new SimpleTypeConverter(); if (typeConverter != null) { if (log.isDebugEnabled()) log.debug("Converting " + value + " of type " + value.getClass() + " using " + typeConverter.getClass()); value = typeConverter.convertIfNecessary(value, null); if (log.isDebugEnabled()) { log.debug("New value: " + value); log.debug("New type: " + value.getClass()); } } return value; }