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/AccessorNamingStrategy.java
package com.fasterxml.jackson.databind.introspect; import com.fasterxml.jackson.databind.BeanDescription; import com.fasterxml.jackson.databind.cfg.MapperConfig; /** * API for handlers used to "mangle" names of "getter" and "setter" methods to * find implicit property names. * * @since 2.12 */ public abstract class AccessorNamingStrategy { /** * Method called to find whether given method would be considered an "is-getter" * getter method in context of * type introspected, and if so, what is the logical property it is associated with * (which in turn suggest external name for property) *<p> * Note that signature acceptability has already been checked (no arguments, * has return value) but NOT the specific limitation that return type should * be of boolean type -- implementation should apply latter check, if so desired * (some languages may use different criteria). It is also possible that some * implementations allow different return types than boolean types. *<p> * Note that visibility checks are applied separately; strategy does not need * to be concerned with that aspect. * * @param method Method to check * @param name Name to check (usually same as {@link AnnotatedMethod#getName()} * * @return Implied property name for is-getter method, if match; {@code null} to indicate * that the name does not conform to expected naming convention */ public abstract String findNameForIsGetter(AnnotatedMethod method, String name); /** * Method called to find whether given method would be considered a "regular" * getter method in context of * type introspected, and if so, what is the logical property it is associated with * (which in turn suggest external name for property) *<p> * Note that signature acceptability has already been checked (no arguments, * does have a return value) by caller. *<p> * Note that this method MAY be called for potential "is-getter" methods too * (before {@link #findNameForIsGetter}) *<p> * Note that visibility checks are applied separately; strategy does not need * to be concerned with that aspect. * * @param method Method to check * @param name Name to check (usually same as {@link AnnotatedMethod#getName()} * * @return Implied property name for getter method, if match; {@code null} to indicate * that the name does not conform to expected naming convention */ public abstract String findNameForRegularGetter(AnnotatedMethod method, String name); /** * Method called to find whether given method would be considered a "mutator" * (usually setter, but for builders "with-method" or similar) in context of * type introspected, and if so, what is the logical property it is associated with * (which in turn suggest external name for property) *<p> * Note that signature acceptability has already been checked (exactly one parameter) * by caller. *<p> * Note that visibility checks are applied separately; strategy does not need * to be concerned with that aspect. * * @param method Method to check * @param name Name to check (usually same as {@link AnnotatedMethod#getName()} * * @return Implied property name for mutator method, if match; {@code null} * to indicate that the name does not conform to expected naming convention */ public abstract String findNameForMutator(AnnotatedMethod method, String name); /** * Method called to find the name of logical property that given field should * be associated with, if any. *<p> * Note that visibility checks are applied separately; strategy does not need * to be concerned with that aspect. * * @param field Field to check * @param name Name to check (usually same as {@link AnnotatedField#getName()} * * @return Implied property name matching given field (often field name as-is) or {@code null} * to indicate that the name does not conform to expected naming convention * (and will not be considered for property access) */ public abstract String modifyFieldName(AnnotatedField field, String name); /** * Helper class that implements all abstract methods with dummy implementations. * Behavior is as follows: *<ul> * <li>No getter or is-getter methods are recognized: relevant methods return {@code null} * <li> * <li>No setter methods are recognized: relevant methods return {@code null} * <li> * <li>Names of fields are returned as-is, without modifications (meaning they may be * discovered if they are otherwise visible * <li> * </ul> */ public static class Base extends AccessorNamingStrategy implements java.io.Serializable // since one configured with Mapper/MapperBuilder { private static final long serialVersionUID = 1L; @Override public String findNameForIsGetter(AnnotatedMethod method, String name) { return null; } @Override public String findNameForRegularGetter(AnnotatedMethod method, String name) { return null; } @Override public String findNameForMutator(AnnotatedMethod method, String name) { return null; } @Override public String modifyFieldName(AnnotatedField field, String name) { return name; } } /** * Interface for provider (factory) for constructing {@link AccessorNamingStrategy} * for given type of deserialization target */ public abstract static class Provider implements java.io.Serializable // since one configured with Mapper/MapperBuilder { private static final long serialVersionUID = 1L; /** * Factory method for creating strategy instance for a "regular" POJO, * called if none of the other factory methods is applicable. * * @param config Current mapper configuration * @param valueClass Information about value type * * @return Naming strategy instance to use */ public abstract AccessorNamingStrategy forPOJO(MapperConfig<?> config, AnnotatedClass valueClass); /** * Factory method for creating strategy instance for POJOs * that are deserialized using Builder type: in this case eventual * target (value) type is different from type of "builder" object that is * used by databinding to accumulate state. * * @param config Current mapper configuration * @param builderClass Information about builder type * @param valueTypeDesc Information about the eventual target (value) type * * @return Naming strategy instance to use */ public abstract AccessorNamingStrategy forBuilder(MapperConfig<?> config, AnnotatedClass builderClass, BeanDescription valueTypeDesc); /** * Factory method for creating strategy instance for special {@code java.lang.Record} * type (new in JDK 14). * * @param config Current mapper configuration * @param recordClass Information about value type (of type {@code java.lang.Record}) * * @return Naming strategy instance to use */ public abstract AccessorNamingStrategy forRecord(MapperConfig<?> config, AnnotatedClass recordClass); } }
⏎ com/fasterxml/jackson/databind/introspect/AccessorNamingStrategy.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, 109464👍, 0💬
Popular Posts:
JasperReports, the world's most popular open source business intelligence and reporting engine and J...
JSP(tm) Standard Tag Library 1.0 implementation - Jakarta Taglibs hosts the Standard Taglib 1.0, an ...
What Is commons-fileupload-1.3.3 .jar?commons-fileupload-1.3.3 .jaris the JAR file for Apache Common...
Apache ZooKeeper is an open-source server which enables highly reliable distributed coordination. Ap...
The Apache FontBox library is an open source Java tool to obtain low level information from font fil...