Skip to content

Commit d693b45

Browse files
committed
Javadoc improvements
1 parent 13eb647 commit d693b45

1 file changed

Lines changed: 17 additions & 10 deletions

File tree

src/main/java/tools/jackson/databind/ext/javatime/JavaTimeInitializer.java

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,14 @@
3535
import tools.jackson.databind.ser.std.ToStringSerializer;
3636

3737
/**
38-
* Class that registers capability of serializing {@code java.time} objects with the Jackson core.
38+
* Class that registers capability of deserializing and serializing (reading and writing)
39+
* {@code java.time} values with the Jackson core.
3940
*<p>
4041
* In Jackson 3, the module is embedded in databind and handlers are automatically
4142
* registered: approach is similar to one used by full {@link JacksonModule}s.
4243
*<p>
4344
* Most {@code java.time} types are serialized as numbers (integers or decimals as appropriate) if the
44-
* {@link tools.jackson.databind.SerializationFeature#WRITE_DATES_AS_TIMESTAMPS} feature is enabled
45+
* {@link SerializationFeature#WRITE_DATES_AS_TIMESTAMPS} feature is enabled
4546
* (or, for {@link Duration}, {@link tools.jackson.databind.SerializationFeature#WRITE_DURATIONS_AS_TIMESTAMPS}),
4647
* and otherwise are serialized in standard
4748
* <a href="http://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO-8601</a> string representation.
@@ -50,8 +51,8 @@
5051
* have built-in translation to and from ISO-8601 formats.
5152
* <p>
5253
* Granularity of timestamps is controlled through the companion features
53-
* {@link tools.jackson.databind.SerializationFeature#WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS} and
54-
* {@link tools.jackson.databind.DeserializationFeature#READ_DATE_TIMESTAMPS_AS_NANOSECONDS}. For serialization, timestamps are
54+
* {@link SerializationFeature#WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS} and
55+
* {@link DeserializationFeature#READ_DATE_TIMESTAMPS_AS_NANOSECONDS}. For serialization, timestamps are
5556
* written as fractional numbers (decimals), where the number is seconds and the decimal is fractional seconds, if
5657
* {@code WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS} is enabled (it is by default), with resolution as fine as nanoseconds depending on the
5758
* underlying JDK implementation. If {@code WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS} is disabled, timestamps are written as a whole number of
@@ -61,13 +62,19 @@
6162
* <p>
6263
* Some exceptions to this standard serialization/deserialization rule:
6364
* <ul>
64-
* <li>{@link Period}, which always results in an ISO-8601 format because Periods must be represented in years, months, and/or days.</li>
65-
* <li>{@link Year}, which only contains a year and cannot be represented with a timestamp.</li>
66-
* <li>{@link YearMonth}, which only contains a year and a month and cannot be represented with a timestamp.</li>
67-
* <li>{@link MonthDay}, which only contains a month and a day and cannot be represented with a timestamp.</li>
68-
* <li>{@link ZoneId} and {@link ZoneOffset}, which do not actually store dates and times but are supported with this module nonetheless.</li>
65+
* <li>{@link Period}, which always results in an ISO-8601 format because Periods must be represented in years, months, and/or days.
66+
* </li>
67+
* <li>{@link Year}, which only contains a year and cannot be represented with a timestamp.
68+
* </li>
69+
* <li>{@link YearMonth}, which only contains a year and a month and cannot be represented with a timestamp.
70+
* </li>
71+
* <li>{@link MonthDay}, which only contains a month and a day and cannot be represented with a timestamp.
72+
* </li>
73+
* <li>{@link ZoneId} and {@link ZoneOffset}, which do not actually store dates and times but are supported with this module nonetheless.
74+
* </li>
6975
* <li>{@link LocalDate}, {@link LocalTime}, {@link LocalDateTime}, and {@link OffsetTime}, which cannot portably be converted to timestamps
70-
* and are instead represented as arrays when WRITE_DATES_AS_TIMESTAMPS is enabled.</li>
76+
* and are instead represented as arrays when WRITE_DATES_AS_TIMESTAMPS is enabled.
77+
* </li>
7178
* </ul>
7279
*/
7380
public final class JavaTimeInitializer

0 commit comments

Comments
 (0)