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 Core Source Code
Jackson is "the Java JSON library" or "the best JSON parser for Java". Or simply as "JSON for Java".
Jackson Core Source Code files are provided in the source packge (jackson-core-2.14.0-sources.jar). You can download it at Jackson Maven Website.
You can also browse Jackson Core Source Code below:
✍: FYIcenter.com
⏎ com/fasterxml/jackson/core/type/TypeReference.java
package com.fasterxml.jackson.core.type; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; /** * This generic abstract class is used for obtaining full generics type information * by sub-classing; it must be converted to {@link ResolvedType} implementation * (implemented by <code>JavaType</code> from "databind" bundle) to be used. * Class is based on ideas from * <a href="http://gafter.blogspot.com/2006/12/super-type-tokens.html" * >http://gafter.blogspot.com/2006/12/super-type-tokens.html</a>, * Additional idea (from a suggestion made in comments of the article) * is to require bogus implementation of <code>Comparable</code> * (any such generic interface would do, as long as it forces a method * with generic type to be implemented). * to ensure that a Type argument is indeed given. *<p> * Usage is by sub-classing: here is one way to instantiate reference * to generic type <code>List<Integer></code>: *<pre> * TypeReference ref = new TypeReference<List<Integer>>() { }; *</pre> * which can be passed to methods that accept TypeReference, or resolved * using <code>TypeFactory</code> to obtain {@link ResolvedType}. */ public abstract class TypeReference<T> implements Comparable<TypeReference<T>> { protected final Type _type; protected TypeReference() { Type superClass = getClass().getGenericSuperclass(); if (superClass instanceof Class<?>) { // sanity check, should never happen throw new IllegalArgumentException("Internal error: TypeReference constructed without actual type information"); } /* 22-Dec-2008, tatu: Not sure if this case is safe -- I suspect * it is possible to make it fail? * But let's deal with specific * case when we know an actual use case, and thereby suitable * workarounds for valid case(s) and/or error to throw * on invalid one(s). */ _type = ((ParameterizedType) superClass).getActualTypeArguments()[0]; } public Type getType() { return _type; } /** * The only reason we define this method (and require implementation * of <code>Comparable</code>) is to prevent constructing a * reference without type information. */ @Override public int compareTo(TypeReference<T> o) { return 0; } // just need an implementation, not a good one... hence ^^^ }
⏎ com/fasterxml/jackson/core/type/TypeReference.java
Or download all of them as a single archive file:
File name: jackson-core-2.14.0-sources.jar File size: 497693 bytes Release date: 2022-11-05 Download
⇒ Download and Install Jackson Binary Package
2016-02-03, 34626👍, 1💬
Popular Posts:
JDK 11 java.sql.rowset.jmod is the JMOD file for JDK 11 SQL Rowset module. JDK 11 SQL Rowset module ...
How to download and install Apache XMLBeans Source Package? The source package contains Java source ...
ZooKeeper is a centralized service for maintaining configuration information, naming, providing dist...
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
Apache Avalon began in 1999 as the Java Apache Server Framework and in late 2002 separated from the ...