Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
Jackson Data Binding Source Code
Jackson is "the Java JSON library" or "the best JSON parser for Java". Or simply as "JSON for Java".
Jackson Databind Source Code files are provided in the source packge (jackson-databind-2.14.0-sources.jar). You can download it at Jackson Maven Website.
You can also browse Jackson Databind Source Code below:
✍: FYIcenter.com
⏎ com/fasterxml/jackson/databind/deser/std/ArrayBlockingQueueDeserializer.java
package com.fasterxml.jackson.databind.deser.std;
import java.io.IOException;
import java.util.*;
import java.util.concurrent.ArrayBlockingQueue;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.deser.NullValueProvider;
import com.fasterxml.jackson.databind.deser.ValueInstantiator;
import com.fasterxml.jackson.databind.jsontype.TypeDeserializer;
/**
* We need a custom deserializer both because {@link ArrayBlockingQueue} has no
* default constructor AND because it has size limit used for constructing
* underlying storage automatically.
*/
public class ArrayBlockingQueueDeserializer
extends CollectionDeserializer
{
private static final long serialVersionUID = 1;
/*
/**********************************************************
/* Life-cycle
/**********************************************************
*/
public ArrayBlockingQueueDeserializer(JavaType containerType,
JsonDeserializer<Object> valueDeser, TypeDeserializer valueTypeDeser,
ValueInstantiator valueInstantiator)
{
super(containerType, valueDeser, valueTypeDeser, valueInstantiator);
}
/**
* Constructor used when creating contextualized instances.
*/
protected ArrayBlockingQueueDeserializer(JavaType containerType,
JsonDeserializer<Object> valueDeser, TypeDeserializer valueTypeDeser,
ValueInstantiator valueInstantiator,
JsonDeserializer<Object> delegateDeser,
NullValueProvider nuller, Boolean unwrapSingle)
{
super(containerType, valueDeser, valueTypeDeser, valueInstantiator, delegateDeser,
nuller, unwrapSingle);
}
/**
* Copy-constructor that can be used by sub-classes to allow
* copy-on-write styling copying of settings of an existing instance.
*/
protected ArrayBlockingQueueDeserializer(ArrayBlockingQueueDeserializer src) {
super(src);
}
/**
* Fluent-factory method call to construct contextual instance.
*/
@Override
@SuppressWarnings("unchecked")
protected ArrayBlockingQueueDeserializer withResolved(JsonDeserializer<?> dd,
JsonDeserializer<?> vd, TypeDeserializer vtd,
NullValueProvider nuller, Boolean unwrapSingle)
{
return new ArrayBlockingQueueDeserializer(_containerType,
(JsonDeserializer<Object>) vd, vtd,
_valueInstantiator, (JsonDeserializer<Object>) dd,
nuller, unwrapSingle);
}
/*
/**********************************************************
/* JsonDeserializer API
/**********************************************************
*/
@Override
protected Collection<Object> createDefaultInstance(DeserializationContext ctxt)
throws IOException
{
// 07-Nov-2016, tatu: Important: cannot create using default ctor (one
// does not exist); and also need to know exact size. Hence, return
// null from here
return null;
}
// NOTE: implementation changed between 2.11 and 2.12
@Override
protected Collection<Object> _deserializeFromArray(JsonParser p, DeserializationContext ctxt,
Collection<Object> result0)
throws IOException
{
if (result0 == null) { // usual case
result0 = new ArrayList<>();
}
result0 = super._deserializeFromArray(p, ctxt, result0);
if (result0.isEmpty()) {
return new ArrayBlockingQueue<>(1, false);
}
return new ArrayBlockingQueue<>(result0.size(), false, result0);
}
@Override
public Object deserializeWithType(JsonParser p, DeserializationContext ctxt, TypeDeserializer typeDeserializer) throws IOException {
// In future could check current token... for now this should be enough:
return typeDeserializer.deserializeTypedFromArray(p, ctxt);
}
}
⏎ com/fasterxml/jackson/databind/deser/std/ArrayBlockingQueueDeserializer.java
Or download all of them as a single archive file:
File name: jackson-databind-2.14.0-sources.jar File size: 1187952 bytes Release date: 2022-11-05 Download
⇒ Jackson Annotations Source Code
⇐ Download and Install Jackson Binary Package
2022-03-29, ≈298🔥, 0💬
Popular Posts:
JDK 17 jdk.hotspot.agent.jmod is the JMOD file for JDK 17 Hotspot Agent module. JDK 17 Hotspot Agent...
JDK 11 jdk.scripting.nashorn.jm odis the JMOD file for JDK 11 Scripting Nashorn module. JDK 11 Scrip...
JDK 17 jdk.jdi.jmod is the JMOD file for JDK 17 JDI (Java Debug Interface) tool. JDK 17 JDI tool com...
What Is HttpComponents httpclient-4.2.2.jar? HttpComponents httpclient-4.2.2.jar is the JAR file for...
JLayer is a library that decodes/plays/converts MPEG 1/2/2.5 Layer 1/2/3 (i.e. MP3) in real time for...