@Override public CollectionLikeType withContentValueHandler(Object h) { return new CollectionLikeType(_class, _elementType.withValueHandler(h), _valueHandler, _typeHandler); }
@Override public MapLikeType withContentValueHandler(Object h) { return new MapLikeType(_class, _keyType, _valueType.withValueHandler(h), _valueHandler, _typeHandler); }
@Override public CollectionType withContentValueHandler(Object h) { return new CollectionType(_class, _elementType.withValueHandler(h), _valueHandler, _typeHandler); }
@Override public MapType withContentValueHandler(Object h) { return new MapType(_class, _keyType, _valueType.withValueHandler(h), _valueHandler, _typeHandler); }
/** * @since 1.9 */ public MapLikeType withKeyValueHandler(Object h) { return new MapLikeType(_class, _keyType.withValueHandler(h), _valueType, _valueHandler, _typeHandler); }
/** * @since 1.9 */ @Override public MapType withKeyValueHandler(Object h) { return new MapType(_class, _keyType.withValueHandler(h), _valueType, _valueHandler, _typeHandler); }
@Override public ArrayType withContentValueHandler(Object h) { if (h == _componentType.getValueHandler()) { return this; } return new ArrayType(_componentType.withValueHandler(h), _emptyArray, _valueHandler, _typeHandler); }
if (h != null) { subtype = subtype.withValueHandler(h);
/** * More efficient version of {@link #narrowBy}, called by * internal framework in cases where compatibility checks * are to be skipped. * * @since 1.5 */ public JavaType forcedNarrowBy(Class<?> subclass) { if (subclass == _class) { // can still optimize for simple case return this; } JavaType result = _narrow(subclass); // TODO: these checks should NOT actually be needed; above should suffice: if (_valueHandler != result.getValueHandler()) { result = result.withValueHandler(_valueHandler); } if (_typeHandler != result.getTypeHandler()) { result = result.withTypeHandler(_typeHandler); } return result; }
/** * Method that can be called to do a "narrowing" conversions; that is, * to return a type with a raw class that is assignable to the raw * class of this type. If this is not possible, an * {@link IllegalArgumentException} is thrown. * If class is same as the current raw class, instance itself is * returned. */ public JavaType narrowBy(Class<?> subclass) { // First: if same raw class, just return this instance if (subclass == _class) { return this; } // Otherwise, ensure compatibility _assertSubclass(subclass, _class); JavaType result = _narrow(subclass); // TODO: these checks should NOT actually be needed; above should suffice: if (_valueHandler != result.getValueHandler()) { result = result.withValueHandler(_valueHandler); } if (_typeHandler != result.getTypeHandler()) { result = result.withTypeHandler(_typeHandler); } return result; }
@Override public MapLikeType withContentValueHandler(Object h) { return new MapLikeType(_class, _keyType, _valueType.withValueHandler(h), _valueHandler, _typeHandler); }
/** * @since 1.9 */ public MapLikeType withKeyValueHandler(Object h) { return new MapLikeType(_class, _keyType.withValueHandler(h), _valueType, _valueHandler, _typeHandler); }
/** * @since 1.9 */ @Override public MapType withKeyValueHandler(Object h) { return new MapType(_class, _keyType.withValueHandler(h), _valueType, _valueHandler, _typeHandler); }
@Override public CollectionLikeType withContentValueHandler(Object h) { return new CollectionLikeType(_class, _elementType.withValueHandler(h), _valueHandler, _typeHandler); }
@Override public CollectionType withContentValueHandler(Object h) { return new CollectionType(_class, _elementType.withValueHandler(h), _valueHandler, _typeHandler); }
@Override public MapType withContentValueHandler(Object h) { return new MapType(_class, _keyType, _valueType.withValueHandler(h), _valueHandler, _typeHandler); }
@Override public ArrayType withContentValueHandler(Object h) { if (h == _componentType.getValueHandler()) { return this; } return new ArrayType(_componentType.withValueHandler(h), _emptyArray, _valueHandler, _typeHandler); }
if (h != null) { subtype = subtype.withValueHandler(h);
/** * More efficient version of {@link #narrowBy}, called by * internal framework in cases where compatibility checks * are to be skipped. * * @since 1.5 */ public JavaType forcedNarrowBy(Class<?> subclass) { if (subclass == _class) { // can still optimize for simple case return this; } JavaType result = _narrow(subclass); // TODO: these checks should NOT actually be needed; above should suffice: if (_valueHandler != result.getValueHandler()) { result = result.withValueHandler(_valueHandler); } if (_typeHandler != result.getTypeHandler()) { result = result.withTypeHandler(_typeHandler); } return result; }
/** * Method that can be called to do a "narrowing" conversions; that is, * to return a type with a raw class that is assignable to the raw * class of this type. If this is not possible, an * {@link IllegalArgumentException} is thrown. * If class is same as the current raw class, instance itself is * returned. */ public JavaType narrowBy(Class<?> subclass) { // First: if same raw class, just return this instance if (subclass == _class) { return this; } // Otherwise, ensure compatibility _assertSubclass(subclass, _class); JavaType result = _narrow(subclass); // TODO: these checks should NOT actually be needed; above should suffice: if (_valueHandler != result.getValueHandler()) { result = result.withValueHandler(_valueHandler); } if (_typeHandler != result.getTypeHandler()) { result = result.withTypeHandler(_typeHandler); } return result; }