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/util/TypeKey.java
package com.fasterxml.jackson.databind.util; import com.fasterxml.jackson.databind.JavaType; /** * Key that offers two "modes"; one with raw class, as used for * cases were raw class type is available (for example, when using * runtime type); and one with full generics-including. */ public class TypeKey { protected int _hashCode; protected Class<?> _class; protected JavaType _type; /** * Indicator of whether serializer stored has a type serializer * wrapper around it or not; if not, it is "untyped" serializer; * if it has, it is "typed" */ protected boolean _isTyped; public TypeKey() { } public TypeKey(TypeKey src) { _hashCode = src._hashCode; _class = src._class; _type = src._type; _isTyped = src._isTyped; } public TypeKey(Class<?> key, boolean typed) { _class = key; _type = null; _isTyped = typed; _hashCode = typed ? typedHash(key) : untypedHash(key); } public TypeKey(JavaType key, boolean typed) { _type = key; _class = null; _isTyped = typed; _hashCode = typed ? typedHash(key) : untypedHash(key); } public final static int untypedHash(Class<?> cls) { return cls.getName().hashCode(); } public final static int typedHash(Class<?> cls) { return cls.getName().hashCode()+1; } public final static int untypedHash(JavaType type) { return type.hashCode() - 1; } public final static int typedHash(JavaType type) { return type.hashCode() - 2; } public final void resetTyped(Class<?> cls) { _type = null; _class = cls; _isTyped = true; _hashCode = typedHash(cls); } public final void resetUntyped(Class<?> cls) { _type = null; _class = cls; _isTyped = false; _hashCode = untypedHash(cls); } public final void resetTyped(JavaType type) { _type = type; _class = null; _isTyped = true; _hashCode = typedHash(type); } public final void resetUntyped(JavaType type) { _type = type; _class = null; _isTyped = false; _hashCode = untypedHash(type); } public boolean isTyped() { return _isTyped; } public Class<?> getRawType() { return _class; } public JavaType getType() { return _type; } @Override public final int hashCode() { return _hashCode; } @Override public final String toString() { if (_class != null) { return "{class: "+_class.getName()+", typed? "+_isTyped+"}"; } return "{type: "+_type+", typed? "+_isTyped+"}"; } // note: we assume key is never used for anything other than as map key, so: @Override public final boolean equals(Object o) { if (o == null) return false; if (o == this) return true; if (o.getClass() != getClass()) { return false; } TypeKey other = (TypeKey) o; if (other._isTyped == _isTyped) { if (_class != null) { return other._class == _class; } return _type.equals(other._type); } return false; } }
⏎ com/fasterxml/jackson/databind/util/TypeKey.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, 110717👍, 0💬
Popular Posts:
How to download and install ojdbc14.jar for Oracle 10g R2? ojdbc14.jar for Oracle 10g R2 is a Java 1...
JLayer is a library that decodes/plays/converts MPEG 1/2/2.5 Layer 1/2/3 (i.e. MP3) in real time for...
What Is HttpComponents commons-httpclient-3.1.j ar?HttpComponents commons-httpclient-3.1.j aris the ...
ANTLR is a powerful parser generator for multiple programming languages including Java. ANTLR contai...
JDK 11 jdk.crypto.cryptoki.jmod is the JMOD file for JDK 11 Crypto Cryptoki module. JDK 11 Crypto KI...