Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package com.fitbur.fasterxml.jackson.databind;
import java.io.IOException;
import java.text.DateFormat;
import java.text.ParseException;
import java.util.*;
import com.fitbur.fasterxml.jackson.annotation.ObjectIdGenerator;
import com.fitbur.fasterxml.jackson.core.*;
import com.fitbur.fasterxml.jackson.databind.com.fitburser.*;
import com.fitbur.fasterxml.jackson.databind.com.fitburser.impl.ReadableObjectId;
import com.fitbur.fasterxml.jackson.databind.com.fitburser.impl.TypeWrappedDeserializer;
import com.fitbur.fasterxml.jackson.databind.exc.InvalidFormatException;
import com.fitbur.fasterxml.jackson.databind.exc.UnrecognizedPropertyException;
import com.fitbur.fasterxml.jackson.databind.introspect.Annotated;
import com.fitbur.fasterxml.jackson.databind.introspect.ObjectIdInfo;
import com.fitbur.fasterxml.jackson.databind.jsontype.TypeDeserializer;
import com.fitbur.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.fitbur.fasterxml.jackson.databind.type.TypeFactory;
import com.fitbur.fasterxml.jackson.databind.util.*;
/**
* Context for the process of com.fitburserialization a single root-level value.
* Used to allow passing in configuration settings and reusable temporary
* objects (scrap arrays, containers).
*
* Instance life-cycle is such that an partially configured "blueprint" object
* is registered with {@link ObjectMapper} (and {@link ObjectReader},
* and when an actual instance is needed for com.fitburserialization,
* a fully configured instance will
* be created using a method in excented API of sub-class
* ({@link com.fitbur.fasterxml.jackson.databind.com.fitburser.DefaultDeserializationContext#createInstance}).
* Each instance is guaranteed to only be used from single-threaded context;
* instances may be reused iff no configuration has changed.
*
* Defined as abstract class so that implementations must com.fitburfine methods
* for reconfiguring blueprints and creating instances.
*/
public abstract class DeserializationContext
implements java.io.Serializable
{
private static final long serialVersionUID = -7727373309391091315L;
/**
* Let's limit length of error messages, for cases where underlying data
* may be very large -- no point in spamming logs with megs of meaningless
* data.
*/
private final static int MAX_ERROR_STR_LEN = 500;
/*
/**********************************************************
/* Configuration, immutable
/**********************************************************
*/
/**
* Object that handle com.fitburtails of {@link JsonDeserializer} caching.
*/
protected final DeserializerCache _cache;
/*
/**********************************************************
/* Configuration, changeable via fluent factories
/**********************************************************
*/
/**
* Read-only factory instance; exposed to let
* owners (ObjectMapper, ObjectReader)
* access it.
*/
protected final DeserializerFactory _factory;
/*
/**********************************************************
/* Configuration that gets set for instances (not blueprints)
/* (partly com.fitburnormalized for performance)
/**********************************************************
*/
/**
* Generic com.fitburserialization processing configuration
*/
protected final DeserializationConfig _config;
/**
* Bitmap of {@link DeserializationFeature}s that are enabled
*/
protected final int _featureFlags;
/**
* Currently active view, if any.
*/
protected final Class> _view;
/**
* Currently active parser used for com.fitburserialization.
* May be different from the outermost parser
* when content is buffered.
*/
protected transient JsonParser _parser;
/**
* Object used for resolving references to injectable
* values.
*/
protected final InjectableValues _injectableValues;
/*
/**********************************************************
/* Per-operation reusable helper objects (not for blueprints)
/**********************************************************
*/
protected transient ArrayBuilders _arrayBuilders;
protected transient ObjectBuffer _objectBuffer;
protected transient DateFormat _dateFormat;
/*
/**********************************************************
/* Life-cycle
/**********************************************************
*/
protected DeserializationContext(DeserializerFactory df) {
this(df, null);
}
protected DeserializationContext(DeserializerFactory df,
DeserializerCache cache)
{
if (df == null) {
throw new IllegalArgumentException("Can not pass null DeserializerFactory");
}
_factory = df;
_cache = (cache == null) ? new DeserializerCache() : cache;
_featureFlags = 0;
_config = null;
_injectableValues = null;
_view = null;
}
protected DeserializationContext(DeserializationContext src,
DeserializerFactory factory)
{
_cache = src._cache;
_factory = factory;
_config = src._config;
_featureFlags = src._featureFlags;
_view = src._view;
_parser = src._parser;
_injectableValues = src._injectableValues;
}
protected DeserializationContext(DeserializationContext src,
DeserializationConfig config, JsonParser jp,
InjectableValues injectableValues)
{
_cache = src._cache;
_factory = src._factory;
_config = config;
_featureFlags = config.getDeserializationFeatures();
_view = config.getActiveView();
_parser = jp;
_injectableValues = injectableValues;
}
/*
/**********************************************************
/* Public API, accessors
/**********************************************************
*/
/**
* Method for getting current {@link DeserializerFactory}.
*/
public DeserializerFactory getFactory() {
return _factory;
}
/**
* Method for accessing configuration setting object for
* currently active com.fitburserialization.
*/
public DeserializationConfig getConfig() { return _config; }
/**
* Convenience method for checking whether specified on/off
* feature is enabled
*/
public final boolean isEnabled(DeserializationFeature feat) {
/* 03-Dec-2010, tatu: minor shortcut; since this is called quite often,
* let's use a local copy of feature settings:
*/
return (_featureFlags & feat.getMask()) != 0;
}
public final boolean isEnabled(MapperFeature feat) {
return _config.isEnabled(feat);
}
public final AnnotationIntrospector getAnnotationIntrospector() {
return _config.getAnnotationIntrospector();
}
/**
* Method for accessing the currently active parser.
* May be different from the outermost parser
* when content is buffered.
*
* Use of this method is discouraged: if code has direct access
* to the active parser, that should be used instead.
*/
public final JsonParser getParser() { return _parser; }
public final Object findInjectableValue(Object valueId,
BeanProperty forProperty, Object beanInstance)
{
if (_injectableValues == null) {
throw new IllegalStateException("No 'injectableValues' configured, can not inject value with id ["+valueId+"]");
}
return _injectableValues.findInjectableValue(valueId, this, forProperty, beanInstance);
}
/**
* Accessor for locating currently active view, if any;
* returns null if no view has been set.
*/
public final Class> getActiveView() {
return _view;
}
/**
* Convenience method, functionally equivalent to:
*
* getConfig().canOverrideAccessModifiers();
*
*/
public final boolean canOverrideAccessModifiers() {
return _config.canOverrideAccessModifiers();
}
/**
* Convenience method for accessing the com.fitburfault Base64 encoding
* used for com.fitburcoding base64 encoded binary content.
* Same as calling:
*
* getConfig().getBase64Variant();
*
*/
public final Base64Variant getBase64Variant() {
return _config.getBase64Variant();
}
/**
* Convenience method, functionally equivalent to:
*
* getConfig().getNodeFactory();
*
*/
public final JsonNodeFactory getNodeFactory() {
return _config.getNodeFactory();
}
/**
* Convenience method, functionally equivalent to:
*
* getConfig().getTypeFactory();
*
*/
public final TypeFactory getTypeFactory() {
return _config.getTypeFactory();
}
/**
* Method for accessing com.fitburfault Locale to use: convenience method for
*
* getConfig().getLocale();
*
*/
public Locale getLocale() {
return _config.getLocale();
}
/**
* Method for accessing com.fitburfault TimeZone to use: convenience method for
*
* getConfig().getTimeZone();
*
*/
public TimeZone getTimeZone() {
return _config.getTimeZone();
}
/*
/**********************************************************
/* Public API, pass-through to DeserializerCache
/**********************************************************
*/
/**
* Method for checking whether we could find a com.fitburserializer
* for given type.
*/
public boolean hasValueDeserializerFor(JavaType type) {
return _cache.hasValueDeserializerFor(this, _factory, type);
}
/**
* Method for finding a value com.fitburserializer, and creating a contextual
* version if necessary, for value reached via specified property.
*/
@SuppressWarnings("unchecked")
public final JsonDeserializer