/** * @since 1.8 */ public JavaType constructType(Class<?> cls) { return _config.constructType(cls); }
/** * Method for constructing a new reader instance that is configured * to data bind into specified type. *<p> * Note that the method does NOT change state of this reader, but * rather construct and returns a newly configured instance. */ public ObjectReader withType(Class<?> valueType) { return withType(_config.constructType(valueType)); }
/** * Method for constructing a new instance with configuration that * updates passed Object (as root value), instead of constructing * a new value. *<p> * Note that the method does NOT change state of this reader, but * rather construct and returns a newly configured instance. */ public ObjectReader withValueToUpdate(Object value) { if (value == _valueToUpdate) return this; if (value == null) { throw new IllegalArgumentException("cat not update null value"); } JavaType t = (_valueType == null) ? _config.constructType(value.getClass()) : _valueType; return new ObjectReader(this, _config, t, value, _schema, _injectableValues); }
/** * @since 1.8 */ public JavaType constructType(Class<?> cls) { return _config.constructType(cls); }
/** * Method for constructing a new reader instance that is configured * to data bind into specified type. *<p> * Note that the method does NOT change state of this reader, but * rather construct and returns a newly configured instance. */ public ObjectReader withType(Class<?> valueType) { return withType(_config.constructType(valueType)); }
/** * Method for constructing a new instance with configuration that * updates passed Object (as root value), instead of constructing * a new value. *<p> * Note that the method does NOT change state of this reader, but * rather construct and returns a newly configured instance. */ public ObjectReader withValueToUpdate(Object value) { if (value == _valueToUpdate) return this; if (value == null) { throw new IllegalArgumentException("cat not update null value"); } JavaType t = (_valueType == null) ? _config.constructType(value.getClass()) : _valueType; return new ObjectReader(this, _config, t, value, _schema, _injectableValues); }
/** * @since 1.8 */ public JavaType constructType(Class<?> cls) { return _config.constructType(cls); }
/** * @since 1.8 */ public JavaType constructType(Class<?> cls) { return _config.constructType(cls); }
/** * @since 1.8 */ public JavaType constructType(Class<?> cls) { return _config.constructType(cls); }
/** * Method for constructing a new reader instance that is configured * to data bind into specified type. *<p> * Note that the method does NOT change state of this reader, but * rather construct and returns a newly configured instance. */ public ObjectReader withType(Class<?> valueType) { return withType(_config.constructType(valueType)); }
public ObjectReader withValueToUpdate(Object value) { if (value == _valueToUpdate) return this; if (value == null) { throw new IllegalArgumentException("cat not update null value"); } JavaType t = _config.constructType(value.getClass()); return new ObjectReader(this, _config, t, value, _schema, _injectableValues); }
public ObjectReader withValueToUpdate(Object value) { if (value == _valueToUpdate) return this; if (value == null) { throw new IllegalArgumentException("cat not update null value"); } JavaType t = _config.constructType(value.getClass()); return new ObjectReader(this, _config, t, value, _schema); }
public ObjectReader withType(Class<?> valueType) { return withType(_config.constructType(valueType)); }
public ObjectReader withType(Class<?> valueType) { return withType(_config.constructType(valueType)); }
/** * Method for constructing a new instance with configuration that * updates passed Object (as root value), instead of constructing * a new value. *<p> * Note that the method does NOT change state of this reader, but * rather construct and returns a newly configured instance. */ public ObjectReader withValueToUpdate(Object value) { if (value == _valueToUpdate) return this; if (value == null) { throw new IllegalArgumentException("cat not update null value"); } JavaType t = (_valueType == null) ? _config.constructType(value.getClass()) : _valueType; return new ObjectReader(this, _config, t, value, _schema, _injectableValues); }
@Override public JavaType resolveAbstractType(DeserializationConfig config, JavaType type) { /* 19-Feb-2011, tatu: Future plans may include calling of this method for all kinds * of abstract types. So as simple precaution, let's limit kinds of types we * will try materializa implementations for. */ /* We won't be handling any container types (Collections, Maps and arrays), * Throwables or enums. */ if (type.isContainerType() || type.isPrimitive() || type.isEnumType() || type.isThrowable()) { return null; } Class<?> cls = type.getRawClass(); /* [JACKSON-683] Fail on non-public classes, since we can't easily force * access to such classes (unless we tried to generate impl classes in that * package) */ if (!Modifier.isPublic(cls.getModifiers())) { if (isEnabled(Feature.FAIL_ON_NON_PUBLIC_TYPES)) { throw new IllegalArgumentException("Can not materialize implementation of "+cls+" since it is not public "); } return null; } // might want to skip proxies, local types too... but let them be for now: //if (intr.findTypeResolver(beanDesc.getClassInfo(), type) == null) { return config.constructType(materializeClass(config, cls)); }