/** * Method for constructing an instance that has specified * value for attribute for given key. * * @since 2.3 */ public T withAttribute(Object key, Object value) { return with(getAttributes().withSharedAttribute(key, value)); }
/** * Method for getting {@link AnnotationIntrospector} configured * to introspect annotation values used for configuration. *<p> * Non-final since it is actually overridden by sub-classes (for now?) */ public AnnotationIntrospector getAnnotationIntrospector() { if (isEnabled(MapperFeature.USE_ANNOTATIONS)) { return _base.getAnnotationIntrospector(); } return NopAnnotationIntrospector.instance; }
/** * Method for constructing an instance that has only specified * attributes, removing any attributes that exist before the call. * * @since 2.3 */ public T withAttributes(Map<?,?> attributes) { return with(getAttributes().withSharedAttributes(attributes)); }
/** * Method for constructing and returning a new instance with different * {@link ClassIntrospector} * to use. *<p> * NOTE: make sure to register new instance with <code>ObjectMapper</code> * if directly calling this method. */ public final T with(ClassIntrospector ci) { return _withBase(_base.withClassIntrospector(ci)); }
/** * Method for constructing an instance that has no * value for attribute for given key. * * @since 2.3 */ public T withoutAttribute(Object key) { return with(getAttributes().withoutSharedAttribute(key)); }
/** * Method for constructing and returning a new instance with different * {@link AnnotationIntrospector} to use (replacing old one). *<p> * NOTE: make sure to register new instance with <code>ObjectMapper</code> * if directly calling this method. */ public final T with(AnnotationIntrospector ai) { return _withBase(_base.withAnnotationIntrospector(ai)); }
/** * Method for constructing and returning a new instance with different * {@link TypeFactory} * to use. */ public final T with(TypeFactory tf) { return _withBase( _base.withTypeFactory(tf)); }
/** * Method for constructing and returning a new instance with additional * {@link AnnotationIntrospector} inserted (as the highest priority one) */ public final T withInsertedAnnotationIntrospector(AnnotationIntrospector ai) { return _withBase(_base.withInsertedAnnotationIntrospector(ai)); }
/** * Method for constructing and returning a new instance with different * {@link PropertyNamingStrategy} * to use. *<p> * NOTE: make sure to register new instance with <code>ObjectMapper</code> * if directly calling this method. */ public final T with(PropertyNamingStrategy pns) { return _withBase(_base.withPropertyNamingStrategy(pns)); }
/** * Method for constructing and returning a new instance with additional * {@link AnnotationIntrospector} appended (as the lowest priority one) */ public final T withAppendedAnnotationIntrospector(AnnotationIntrospector ai) { return _withBase(_base.withAppendedAnnotationIntrospector(ai)); }
/** * Method for constructing and returning a new instance with different * {@link TypeResolverBuilder} to use. */ public final T with(TypeResolverBuilder<?> trb) { return _withBase(_base.withTypeResolverBuilder(trb)); }
/** * Method for constructing and returning a new instance with different * {@link DateFormat} * to use. *<p> * NOTE: non-final since <code>SerializationConfig</code> needs to override this */ public T with(DateFormat df) { return _withBase(_base.withDateFormat(df)); }
/** * Method for constructing and returning a new instance with different * {@link HandlerInstantiator} * to use. *<p> * NOTE: make sure to register new instance with <code>ObjectMapper</code> * if directly calling this method. */ public final T with(HandlerInstantiator hi) { return _withBase(_base.withHandlerInstantiator(hi)); }
@Override public Boolean getDefaultMergeable(Class<?> baseType) { Boolean b; ConfigOverride cfg = _configOverrides.findOverride(baseType); if (cfg != null) { b = cfg.getMergeable(); if (b != null) { return b; } } return _configOverrides.getDefaultMergeable(); }
@Override public final JsonFormat.Value getDefaultPropertyFormat(Class<?> type) { ConfigOverride overrides = _configOverrides.findOverride(type); if (overrides != null) { JsonFormat.Value v = overrides.getFormat(); if (v != null) { return v; } } return EMPTY_FORMAT; }
@Override public final JsonIgnoreProperties.Value getDefaultPropertyIgnorals(Class<?> type) { ConfigOverride overrides = _configOverrides.findOverride(type); if (overrides != null) { JsonIgnoreProperties.Value v = overrides.getIgnorals(); if (v != null) { return v; } } // 01-May-2015, tatu: Could return `Value.empty()` but for now `null` // seems simpler as callers can avoid processing. return null; }
/** * Method for accessing the default {@link java.util.Locale} to use * for formatting, unless overridden by local annotations. * Initially set to {@link Locale#getDefault()}. */ public final Locale getLocale() { return _base.getLocale(); }