public Object execute(Object source) throws ConversionExecutionException { if (source != null && !sourceClass.isInstance(source)) { throw new ConversionExecutionException(source, getSourceClass(), getTargetClass(), "Source object " + source + " to convert is expected to be an instance of [" + getSourceClass().getName() + "]"); } try { return converter.convertSourceToTargetClass(source, targetClass); } catch (Exception e) { throw new ConversionExecutionException(source, getSourceClass(), getTargetClass(), e); } }
public Object execute(Object source) throws ConversionExecutionException { if (source != null && !sourceClass.isInstance(source)) { throw new ConversionExecutionException(source, getSourceClass(), getTargetClass(), "Source object " + source + " to convert is expected to be an instance of [" + getSourceClass().getName() + "]"); } try { return converter.convertSourceToTargetClass(source, targetClass); } catch (Exception e) { throw new ConversionExecutionException(source, getSourceClass(), getTargetClass(), e); } }
public Object execute(Object source) throws ConversionExecutionException { if (source != null && !sourceClass.isInstance(source)) { throw new ConversionExecutionException(source, getSourceClass(), getTargetClass(), "Source object " + source + " to convert is expected to be an instance of " + getSourceClass()); } try { return converter.convertSourceToTargetClass(source, targetClass); } catch (Exception e) { throw new ConversionExecutionException(source, getSourceClass(), getTargetClass(), e); } }