Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
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 (322)
Collections:
Other Resources:
Jackson Annotations Source Code
Jackson is "the Java JSON library" or "the best JSON parser for Java". Or simply as "JSON for Java".
Jackson Annotations Source Code files are provided in the source packge (jackson-annotations-2.14.0-sources.jar). You can download it at Jackson Maven Website.
You can also browse Jackson Annotations Source Code below:
✍: FYIcenter.com
⏎ com/fasterxml/jackson/annotation/OptBoolean.java
package com.fasterxml.jackson.annotation;
/**
* Optional Boolean value ("nullean"). Needed just because Java annotations
* can not take 'null' as a value (even as default), so there is no
* way to distinguish between explicit `true` and `false`, and lack of
* choice (related: annotations are limited to primitives, so
* {@link java.lang.Boolean} not allowed as solution).
*<p>
* Note: although the use of `true` and `false` would be more convenient, they
* can not be chosen since they are Java keyword and compiler won't allow
* the choice. And since enum naming convention suggests all-upper-case,
* that is what is done here.
*
* @since 2.6
*/
public enum OptBoolean
{
/**
* Value that indicates that the annotation property is explicitly defined to
* be enabled, or true.
*/
TRUE,
/**
* Value that indicates that the annotation property is explicitly defined to
* be disabled, or false.
*/
FALSE,
/**
* Value that indicates that the annotation property does NOT have an explicit
* definition of enabled/disabled (or true/false); instead, a higher-level
* configuration value is used; or lacking higher-level global setting,
* default.
*/
DEFAULT;
public Boolean asBoolean() {
if (this == DEFAULT) return null;
return (this == TRUE) ? Boolean.TRUE : Boolean.FALSE;
}
public boolean asPrimitive() {
return (this == TRUE);
}
public static OptBoolean fromBoolean(Boolean b) {
if (b == null) {
return DEFAULT;
}
return b.booleanValue() ? TRUE : FALSE;
}
public static boolean equals(Boolean b1, Boolean b2) {
if (b1 == null) {
return (b2 == null);
}
return b1.equals(b2);
}
}
⏎ com/fasterxml/jackson/annotation/OptBoolean.java
Or download all of them as a single archive file:
File name: jackson-annotations-2.14.0-sources.jar File size: 80402 bytes Release date: 2022-11-05 Download
⇒ Jackson Dataformat Extensions
⇐ Jackson Data Binding Source Code
2022-02-19, ≈121🔥, 0💬
Popular Posts:
JDK 17 java.compiler.jmod is the JMOD file for JDK 17 Compiler module. JDK 17 Compiler module compil...
JDK 17 jdk.jdi.jmod is the JMOD file for JDK 17 JDI (Java Debug Interface) tool. JDK 17 JDI tool com...
maven-compat-3.8.6.jar is the JAR file for Apache Maven 3.8.6 Compact module. The JAR file name may ...
What Is jms.jar? I heard it's related to JMS (Java Message Service) 1.1? The if you have an jms.jar ...
JDK 17 jdk.javadoc.jmod is the JMOD file for JDK 17 Java Document tool, which can be invoked by the ...