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 Data Binding module allows you to converts JSON to and from POJO (Plain Old Java Object) using property accessor or using annotations.
  • Jackson Databind Source Code files are provided in the source packge (jackson-databind-2.12.4-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/Annotated.java

    package com.fasterxml.jackson.databind.introspect;
    
    import java.lang.annotation.Annotation;
    import java.lang.reflect.AnnotatedElement;
    import java.lang.reflect.Modifier;
    
    import com.fasterxml.jackson.databind.JavaType;
    
    /**
     * Shared base class used for anything on which annotations (included
     * within a {@link AnnotationMap}).
     */
    public abstract class Annotated
    {
        protected Annotated() { }
    
        public abstract <A extends Annotation> A getAnnotation(Class<A> acls);
    
        public abstract boolean hasAnnotation(Class<?> acls);
    
        /**
         * @since 2.7
         */
        public abstract boolean hasOneOf(Class<? extends Annotation>[] annoClasses);
    
        /**
         * Method that can be used to find actual JDK element that this instance
         * represents. It is non-null, except for method/constructor parameters
         * which do not have a JDK counterpart.
         */
        public abstract AnnotatedElement getAnnotated();
    
        protected abstract int getModifiers();
    
        public boolean isPublic() {
            return Modifier.isPublic(getModifiers());
        }
    
        public abstract String getName();
    
        /**
         * Full generic type of the annotated element; definition
         * of what exactly this means depends on sub-class.
         *
         * @since 2.7
         */
        public abstract JavaType getType();
    
        /**
         * "Raw" type (type-erased class) of the annotated element; definition
         * of what exactly this means depends on sub-class.
         */
        public abstract Class<?> getRawType();
    
        /**
         * Accessor that can be used to iterate over all the annotations
         * associated with annotated component.
         *
         * @since 2.3
         * @deprecated Since 2.9 should instead use {@link #getAnnotated()}
         */
        @Deprecated
        public abstract Iterable<Annotation> annotations();
    
        // Also: ensure we can use #equals, #hashCode
        
        @Override
        public abstract boolean equals(Object o);
    
        @Override
        public abstract int hashCode();
    
        @Override
        public abstract String toString();
    }
    

    com/fasterxml/jackson/databind/introspect/Annotated.java

     

    ⇒ Jackson Annotations Source Code

    ⇐ Download and Install Jackson Binary Package

    ⇑ Downloading and Reviewing jackson-*.jar

    ⇑⇑ Jackson - Java JSON library

    2022-03-29, 32068👍, 0💬