/** * Constructor used when creating a new instance (compared to * that of creating fluent copies) * * @since 2.8 */ protected MapperConfigBase(BaseSettings base, SubtypeResolver str, SimpleMixInResolver mixins, RootNameLookup rootNames, ConfigOverrides configOverrides) { super(base, DEFAULT_MAPPER_FEATURES); _mixIns = mixins; _subtypeResolver = str; _rootNames = rootNames; _rootName = null; _view = null; // default to "no attributes" _attributes = ContextAttributes.getEmpty(); _configOverrides = configOverrides; }
@Override public Object getAttribute(Object key) { return _attributes.getAttribute(key); }
/** * 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)); }
.with(ContextAttributes.getEmpty() .withSharedAttribute("project", project) .withSharedAttribute("useHeader", useHeader) .withSharedAttribute("collection", query.collection) .withSharedAttribute("apiKey", masterKey)) .with(builder.build()).readValue(url); } else if (query.type == AVRO) {
@Override public DeserializationContext setAttribute(Object key, Object value) { _attributes = _attributes.withPerCallAttribute(key, value); return this; }
public static ContextAttributes from(Map<?, ?> options) { return ContextAttributes .getEmpty() .withSharedAttributes(options == null ? new HashMap<>(): new HashMap<>(options)); }
/** * 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 an instance that has no * value for attribute for given key. * * @since 2.3 */ public T withoutAttribute(Object key) { return with(getAttributes().withoutSharedAttribute(key)); }
.with(ContextAttributes.getEmpty() .withSharedAttribute("project", project) .withSharedAttribute("useHeader", useHeader) .withSharedAttribute("collection", collection) .withSharedAttribute("apiKey", apiKey)) .with(builder.build()).readValue(buff);
@Override public SerializerProvider setAttribute(Object key, Object value) { _attributes = _attributes.withPerCallAttribute(key, value); return this; }
public static ContextAttributes from(Map<?, ?> options) { return ContextAttributes .getEmpty() .withSharedAttributes(options == null ? new HashMap<>(): new HashMap<>(options)); }
/** * 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<Object,Object> attributes) { return with(getAttributes().withSharedAttributes(attributes)); }
/** * 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)); }
.with(ContextAttributes.getEmpty() .withSharedAttribute("project", key.project)) .readValue(stringify.toString()); if (event != null) {
@Override public Object getAttribute(Object key) { return _attributes.getAttribute(key); }
@Override public DeserializationContext setAttribute(Object key, Object value) { _attributes = _attributes.withPerCallAttribute(key, value); return this; }
/** * Constructor used when creating a new instance (compared to * that of creating fluent copies) */ protected MapperConfigBase(BaseSettings base, SubtypeResolver str, Map<ClassKey,Class<?>> mixins) { super(base, DEFAULT_MAPPER_FEATURES); _mixInAnnotations = mixins; _subtypeResolver = str; _rootName = null; _view = null; // default to "no attributes" _attributes = ContextAttributes.getEmpty(); }
/** * 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 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 an instance that has no * value for attribute for given key. * * @since 2.3 */ public T withoutAttribute(Object key) { return with(getAttributes().withoutSharedAttribute(key)); }