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/type/ClassStack.java
package com.fasterxml.jackson.databind.type;
import java.util.ArrayList;
import com.fasterxml.jackson.databind.JavaType;
/**
* Simple helper class used to keep track of 'call stack' for classes being referenced
* (as well as unbound variables)
*
* @since 2.7
*/
public final class ClassStack
{
protected final ClassStack _parent;
protected final Class<?> _current;
private ArrayList<ResolvedRecursiveType> _selfRefs;
public ClassStack(Class<?> rootType) {
this(null, rootType);
}
private ClassStack(ClassStack parent, Class<?> curr) {
_parent = parent;
_current = curr;
}
/**
* @return New stack frame, if addition is ok; null if not
*/
public ClassStack child(Class<?> cls) {
return new ClassStack(this, cls);
}
/**
* Method called to indicate that there is a self-reference from
* deeper down in stack pointing into type this stack frame represents.
*/
public void addSelfReference(ResolvedRecursiveType ref)
{
if (_selfRefs == null) {
_selfRefs = new ArrayList<ResolvedRecursiveType>();
}
_selfRefs.add(ref);
}
/**
* Method called when type that this stack frame represents is
* fully resolved, allowing self-references to be completed
* (if there are any)
*/
public void resolveSelfReferences(JavaType resolved)
{
if (_selfRefs != null) {
for (ResolvedRecursiveType ref : _selfRefs) {
ref.setReference(resolved);
}
}
}
public ClassStack find(Class<?> cls)
{
if (_current == cls) return this;
for (ClassStack curr = _parent; curr != null; curr = curr._parent) {
if (curr._current == cls) {
return curr;
}
}
return null;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("[ClassStack (self-refs: ")
.append((_selfRefs == null) ? "0" : String.valueOf(_selfRefs.size()))
.append(')')
;
for (ClassStack curr = this; curr != null; curr = curr._parent) {
sb.append(' ').append(curr._current.getName());
}
sb.append(']');
return sb.toString();
}
}
⏎ com/fasterxml/jackson/databind/type/ClassStack.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, ≈171🔥, 0💬
Popular Posts:
What is the dom\ElementPrinter.java provided in the Apache Xerces package? I have Apache Xerces 2.11...
What Is log4j-1.2.15.jar? I got the JAR file from apache-log4j-1.2.15.zip. log4j-1.2.15.jar is the v...
JDK 17 java.management.jmod is the JMOD file for JDK 17 Management module. JDK 17 Management module ...
What Is mail.jar of JavaMail 1.4.2? I got the JAR file from javamail-1.4.2.zip. mail.jar in javamail...
Apache Log4j Core Implementation provides the functional components of the logging system. Users are...