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/introspect/AnnotatedParameter.java
package com.fasterxml.jackson.databind.introspect; import java.lang.reflect.*; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.util.ClassUtil; /** * Object that represents method parameters, mostly so that associated * annotations can be processed conveniently. Note that many of accessors * cannot return meaningful values since parameters do not have stand-alone * JDK objects associated; so access should mostly be limited to checking * annotation values which are properly aggregated and included. */ public final class AnnotatedParameter extends AnnotatedMember { private static final long serialVersionUID = 1L; /** * Member (method, constructor) that this parameter belongs to */ protected final AnnotatedWithParams _owner; /** * JDK type of the parameter, possibly contains generic type information */ protected final JavaType _type; /** * Index of the parameter within argument list */ protected final int _index; /* /********************************************************** /* Life-cycle /********************************************************** */ public AnnotatedParameter(AnnotatedWithParams owner, JavaType type, TypeResolutionContext typeContext, AnnotationMap annotations, int index) { super(typeContext, annotations); _owner = owner; _type = type; _index = index; } @Override public AnnotatedParameter withAnnotations(AnnotationMap ann) { if (ann == _annotations) { return this; } return _owner.replaceParameterAnnotations(_index, ann); } /* /********************************************************** /* Annotated impl /********************************************************** */ /** * Since there is no matching JDK element, this method will * always return null */ @Override public AnnotatedElement getAnnotated() { return null; } /** * Returns modifiers of the constructor, as parameters do not * have independent modifiers. */ @Override public int getModifiers() { return _owner.getModifiers(); } /** * Parameters have no names in bytecode (unlike in source code), * will always return empty String (""). */ @Override public String getName() { return ""; } @Override public Class<?> getRawType() { return _type.getRawClass(); } @Override public JavaType getType() { return _type; } /* /********************************************************** /* AnnotatedMember extras /********************************************************** */ @Override public Class<?> getDeclaringClass() { return _owner.getDeclaringClass(); } @Override public Member getMember() { // This is bit tricky: since there is no JDK equivalent; can either // return null or owner... let's do latter, for now. return _owner.getMember(); } @Override public void setValue(Object pojo, Object value) throws UnsupportedOperationException { throw new UnsupportedOperationException("Cannot call setValue() on constructor parameter of " +getDeclaringClass().getName()); } @Override public Object getValue(Object pojo) throws UnsupportedOperationException { throw new UnsupportedOperationException("Cannot call getValue() on constructor parameter of " +getDeclaringClass().getName()); } /* /********************************************************** /* Extended API /********************************************************** */ public Type getParameterType() { return _type; } /** * Accessor for 'owner' of this parameter; method or constructor that * has this parameter as member of its argument list. * * @return Owner (member or creator) object of this parameter */ public AnnotatedWithParams getOwner() { return _owner; } /** * Accessor for index of this parameter within argument list * * @return Index of this parameter within argument list */ public int getIndex() { return _index; } /* /******************************************************** /* Other /******************************************************** */ @Override public int hashCode() { return _owner.hashCode() + _index; } @Override public boolean equals(Object o) { if (o == this) return true; if (!ClassUtil.hasClass(o, getClass())) { return false; } AnnotatedParameter other = (AnnotatedParameter) o; return other._owner.equals(_owner) && (other._index == _index); } @Override public String toString() { return "[parameter #"+getIndex()+", annotations: "+_annotations+"]"; } }
⏎ com/fasterxml/jackson/databind/introspect/AnnotatedParameter.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, 109314👍, 0💬
Popular Posts:
What Is activation.jar? I heard it's related to JAF (JavaBeans Activation Framework) 1.1? The if you...
layout.jar is a component in iText Java library to provide layout functionalities. iText Java librar...
JDK 17 java.xml.jmod is the JMOD file for JDK 17 XML (eXtensible Markup Language) module. JDK 17 XML...
JSP(tm) Standard Tag Library 1.0 implementation - Jakarta Taglibs hosts the Standard Taglib 1.0, an ...
How to download and install JDK (Java Development Kit) 6? If you want to write Java applications, yo...