Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
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 (309)
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/ClassKey.java
package com.fasterxml.jackson.databind.type; /** * Key class, used as an efficient and accurate key * for locating per-class values, such as * {@link com.fasterxml.jackson.databind.JsonSerializer}s. *<p> * The reason for having a separate key class instead of * directly using {@link Class} as key is mostly * to allow for redefining <code>hashCode</code> method -- * for some strange reason, {@link Class} does not * redefine {@link Object#hashCode} and thus uses identity * hash, which is pretty slow. This makes key access using * {@link Class} unnecessarily slow. *<p> * Note: since class is not strictly immutable, caller must * know what it is doing, if changing field values. */ public final class ClassKey implements Comparable<ClassKey>, java.io.Serializable // since 2.1 { private static final long serialVersionUID = 1L; private String _className; private Class<?> _class; /** * Let's cache hash code straight away, since we are * almost certain to need it. */ private int _hashCode; public ClassKey() { _class = null; _className = null; _hashCode = 0; } public ClassKey(Class<?> clz) { _class = clz; _className = clz.getName(); _hashCode = _className.hashCode(); } public void reset(Class<?> clz) { _class = clz; _className = clz.getName(); _hashCode = _className.hashCode(); } /* /********************************************************** /* Comparable /********************************************************** */ @Override public int compareTo(ClassKey other) { // Just need to sort by name, ok to collide (unless used in TreeMap/Set!) return _className.compareTo(other._className); } /* /********************************************************** /* Standard methods /********************************************************** */ @Override public boolean equals(Object o) { if (o == this) return true; if (o == null) return false; if (o.getClass() != getClass()) return false; ClassKey other = (ClassKey) o; /* Is it possible to have different Class object for same name + class loader combo? * Let's assume answer is no: if this is wrong, will need to uncomment following functionality */ /* return (other._className.equals(_className)) && (other._class.getClassLoader() == _class.getClassLoader()); */ return other._class == _class; } @Override public int hashCode() { return _hashCode; } @Override public String toString() { return _className; } }
⏎ com/fasterxml/jackson/databind/type/ClassKey.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, 111389👍, 0💬
Popular Posts:
What is jxl.jar 2.6.12? jxl.jar 2.6.12 is the JAR file for Java Excel API 2.6.12, which is a Java li...
What Is jaxb-api-2.1.6.jar? Java Architecture for XML Binding (JAXB) is a Java API that allows Java ...
JSP(tm) Standard Tag Library 1.0 implementation - Jakarta Taglibs hosts the Standard Taglib 1.0, an ...
Snappy-Java is a Java port of the "snappy", a fast C++ compresser/decompresser developed by Google. ...
JDK 11 jdk.charsets.jmod is the JMOD file for JDK 11 Charsets module. JDK 11 Charsets module compile...