@Override public Object createFromInt(int value) throws IOException, JsonProcessingException { try { // First: "native" int methods work best: if (_fromIntCreator != null) { return _fromIntCreator.call1(Integer.valueOf(value)); } // but if not, can do widening conversion if (_fromLongCreator != null) { return _fromLongCreator.call1(Long.valueOf(value)); } } catch (Exception e) { throw wrapException(e); } throw new JsonMappingException("Can not instantiate value of type "+getValueTypeDesc() +" from JSON integral number; no single-int-arg constructor/factory method"); }
@Override public Object createFromString(String value) throws IOException, JsonProcessingException { if (_fromStringCreator != null) { try { return _fromStringCreator.call1(value); } catch (Exception e) { throw wrapException(e); } } return _createFromStringFallbacks(value); }
@Override public Object createFromDouble(double value) throws IOException, JsonProcessingException { try { if (_fromDoubleCreator != null) { return _fromDoubleCreator.call1(Double.valueOf(value)); } } catch (Exception e) { throw wrapException(e); } throw new JsonMappingException("Can not instantiate value of type "+getValueTypeDesc() +" from JSON floating-point number; no one-double/Double-arg constructor/factory method"); }
@Override public Object createFromBoolean(boolean value) throws IOException, JsonProcessingException { try { if (_fromBooleanCreator != null) { return _fromBooleanCreator.call1(Boolean.valueOf(value)); } } catch (Exception e) { throw wrapException(e); } throw new JsonMappingException("Can not instantiate value of type "+getValueTypeDesc() +" from JSON boolean value; no single-boolean/Boolean-arg constructor/factory method"); }
@Override public Object createFromLong(long value) throws IOException, JsonProcessingException { try { if (_fromLongCreator != null) { return _fromLongCreator.call1(Long.valueOf(value)); } } catch (Exception e) { throw wrapException(e); } throw new JsonMappingException("Can not instantiate value of type "+getValueTypeDesc() +" from JSON long integral number; no single-long-arg constructor/factory method"); }
@Override public Object createUsingDelegate(Object delegate) throws IOException, JsonProcessingException { if (_delegateCreator == null) { // sanity-check; caller should check throw new IllegalStateException("No delegate constructor for "+getValueTypeDesc()); } try { return _delegateCreator.call1(delegate); } catch (ExceptionInInitializerError e) { throw wrapException(e); } catch (Exception e) { throw wrapException(e); } }
@Override public Object createFromString(String value) throws IOException, JsonProcessingException { if (_fromStringCreator != null) { try { return _fromStringCreator.call1(value); } catch (Exception e) { throw wrapException(e); } } return _createFromStringFallbacks(value); }
@Override public Object createFromInt(int value) throws IOException, JsonProcessingException { try { // First: "native" int methods work best: if (_fromIntCreator != null) { return _fromIntCreator.call1(Integer.valueOf(value)); } // but if not, can do widening conversion if (_fromLongCreator != null) { return _fromLongCreator.call1(Long.valueOf(value)); } } catch (Exception e) { throw wrapException(e); } throw new JsonMappingException("Can not instantiate value of type "+getValueTypeDesc() +" from JSON integral number; no single-int-arg constructor/factory method"); }
@Override public Object createFromDouble(double value) throws IOException, JsonProcessingException { try { if (_fromDoubleCreator != null) { return _fromDoubleCreator.call1(Double.valueOf(value)); } } catch (Exception e) { throw wrapException(e); } throw new JsonMappingException("Can not instantiate value of type "+getValueTypeDesc() +" from JSON floating-point number; no one-double/Double-arg constructor/factory method"); }
@Override public Object createFromBoolean(boolean value) throws IOException, JsonProcessingException { try { if (_fromBooleanCreator != null) { return _fromBooleanCreator.call1(Boolean.valueOf(value)); } } catch (Exception e) { throw wrapException(e); } throw new JsonMappingException("Can not instantiate value of type "+getValueTypeDesc() +" from JSON boolean value; no single-boolean/Boolean-arg constructor/factory method"); }
@Override public Object createFromLong(long value) throws IOException, JsonProcessingException { try { if (_fromLongCreator != null) { return _fromLongCreator.call1(Long.valueOf(value)); } } catch (Exception e) { throw wrapException(e); } throw new JsonMappingException("Can not instantiate value of type "+getValueTypeDesc() +" from JSON long integral number; no single-long-arg constructor/factory method"); }
@Override public Object createUsingDelegate(Object delegate) throws IOException, JsonProcessingException { if (_delegateCreator == null) { // sanity-check; caller should check throw new IllegalStateException("No delegate constructor for "+getValueTypeDesc()); } try { return _delegateCreator.call1(delegate); } catch (ExceptionInInitializerError e) { throw wrapException(e); } catch (Exception e) { throw wrapException(e); } }
@Override public Object createFromString(String value) throws IOException, JsonProcessingException { if (_fromStringCreator != null) { try { return _fromStringCreator.call1(value); } catch (Exception e) { throw wrapException(e); } } return _createFromStringFallbacks(value); }
@Override public Object createFromString(String value) throws IOException, JsonProcessingException { if (_fromStringCreator != null) { try { return _fromStringCreator.call1(value); } catch (Exception e) { throw wrapException(e); } } return _createFromStringFallbacks(value); }
@Override public Object createFromLong(long value) throws IOException, JsonProcessingException { try { if (_fromLongCreator != null) { return _fromLongCreator.call1(Long.valueOf(value)); } } catch (Exception e) { throw wrapException(e); } throw new JsonMappingException("Can not instantiate value of type "+getValueTypeDesc() +" from JSON long integral number; no single-long-arg constructor/factory method"); }
@Override public Object createFromBoolean(boolean value) throws IOException, JsonProcessingException { try { if (_fromBooleanCreator != null) { return _fromBooleanCreator.call1(Boolean.valueOf(value)); } } catch (Exception e) { throw wrapException(e); } throw new JsonMappingException("Can not instantiate value of type "+getValueTypeDesc() +" from JSON boolean value; no single-boolean/Boolean-arg constructor/factory method"); }
@Override public Object createFromDouble(double value) throws IOException, JsonProcessingException { try { if (_fromDoubleCreator != null) { return _fromDoubleCreator.call1(Double.valueOf(value)); } } catch (Exception e) { throw wrapException(e); } throw new JsonMappingException("Can not instantiate value of type "+getValueTypeDesc() +" from JSON floating-point number; no one-double/Double-arg constructor/factory method"); }
@Override public Object createFromBoolean(boolean value) throws IOException, JsonProcessingException { try { if (_fromBooleanCreator != null) { return _fromBooleanCreator.call1(Boolean.valueOf(value)); } } catch (Exception e) { throw wrapException(e); } throw new JsonMappingException("Can not instantiate value of type "+getValueTypeDesc() +" from JSON boolean value; no single-boolean/Boolean-arg constructor/factory method"); }
@Override public Object createFromLong(long value) throws IOException, JsonProcessingException { try { if (_fromLongCreator != null) { return _fromLongCreator.call1(Long.valueOf(value)); } } catch (Exception e) { throw wrapException(e); } throw new JsonMappingException("Can not instantiate value of type "+getValueTypeDesc() +" from JSON long integral number; no single-long-arg constructor/factory method"); }
@Override public Object createFromDouble(double value) throws IOException, JsonProcessingException { try { if (_fromDoubleCreator != null) { return _fromDoubleCreator.call1(Double.valueOf(value)); } } catch (Exception e) { throw wrapException(e); } throw new JsonMappingException("Can not instantiate value of type "+getValueTypeDesc() +" from JSON floating-point number; no one-double/Double-arg constructor/factory method"); }