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/ser/impl/PropertyBasedObjectIdGenerator.java
package com.fasterxml.jackson.databind.ser.impl; import com.fasterxml.jackson.annotation.ObjectIdGenerator; import com.fasterxml.jackson.annotation.ObjectIdGenerators; import com.fasterxml.jackson.databind.introspect.ObjectIdInfo; import com.fasterxml.jackson.databind.ser.*; public class PropertyBasedObjectIdGenerator extends ObjectIdGenerators.PropertyGenerator { private static final long serialVersionUID = 1L; protected final BeanPropertyWriter _property; public PropertyBasedObjectIdGenerator(ObjectIdInfo oid, BeanPropertyWriter prop) { this(oid.getScope(), prop); } protected PropertyBasedObjectIdGenerator(Class<?> scope, BeanPropertyWriter prop) { super(scope); _property = prop; } /** * We must override this method, to prevent errors when scopes are the same, * but underlying class (on which to access property) is different. */ @Override public boolean canUseFor(ObjectIdGenerator<?> gen) { if (gen.getClass() == getClass()) { PropertyBasedObjectIdGenerator other = (PropertyBasedObjectIdGenerator) gen; if (other.getScope() == _scope) { /* 26-Jul-2012, tatu: This is actually not enough, because the property * accessor within BeanPropertyWriter won't work for other property fields * (see [https://github.com/FasterXML/jackson-module-jaxb-annotations/issues/9] * for details). * So we need to verify that underlying property is actually the same. */ return (other._property == _property); } } return false; } @Override public Object generateId(Object forPojo) { try { return _property.get(forPojo); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new IllegalStateException("Problem accessing property '" +_property.getName()+"': "+e.getMessage(), e); } } @Override public ObjectIdGenerator<Object> forScope(Class<?> scope) { return (scope == _scope) ? this : new PropertyBasedObjectIdGenerator(scope, _property); } @Override public ObjectIdGenerator<Object> newForSerialization(Object context) { // No state, can return this return this; } @Override public com.fasterxml.jackson.annotation.ObjectIdGenerator.IdKey key(Object key) { if (key == null) { return null; } // should we use general type for all; or type of property itself? return new IdKey(getClass(), _scope, key); } }
⏎ com/fasterxml/jackson/databind/ser/impl/PropertyBasedObjectIdGenerator.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, 111361👍, 0💬
Popular Posts:
JAX-RPC is an API for building Web services and clients that used remote procedure calls (RPC) and X...
What Is poi-5.2.3.jar? poi-5.2.3.jar is one of the JAR files for Apache POI 5.2.3, which provides an...
What Is commons-fileupload-1.3.3 .jar?commons-fileupload-1.3.3 .jaris the JAR file for Apache Common...
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
itextpdf.jar is a component in iText 5 Java library to provide core functionalities. iText Java libr...