Skip to content

Commit 0779964

Browse files
committed
Improve Javadoc
1 parent 7879316 commit 0779964

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

log4j-core/src/main/java/org/apache/logging/log4j/core/util/internal/instant/InstantPatternDynamicFormatter.java

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -270,30 +270,32 @@ private static boolean isDynamicPatternLetter(final char c) {
270270
/**
271271
* Merges pattern sequences using {@link PatternSequence#tryMerge}.
272272
*
273+
* <h2>Example</h2>
274+
*
273275
* <p>
274-
* For example, given the {@code yyyy-MM-dd'T'HH:mm:ss.SSS} pattern and a precision threshold of {@link ChronoUnit#MINUTES},
276+
* For example, given the {@code yyyy-MM-dd'T'HH:mm:ss.SSS} pattern, a precision threshold of {@link ChronoUnit#MINUTES}
277+
* and the three implementations ({@link DateTimeFormatterPatternSequence}, {@link StaticPatternSequence} and
278+
* {@link SecondPatternSequence}) from this class,
275279
* this method will combine pattern sequences associated with {@code yyyy-MM-dd'T'HH:mm:} into a single sequence,
276280
* since these are consecutive and effectively constant sequences.
277281
* </p>
278282
*
279-
* <h2>Example</h2>
280-
*
281283
* <pre>{@code
282284
* [
283-
* dynamic(pattern="yyyy", precision=YEARS),
285+
* dateTimeFormatter(pattern="yyyy", precision=YEARS),
284286
* static(literal="-"),
285-
* dynamic(pattern="MM", precision=MONTHS),
287+
* dateTimeFormatter(pattern="MM", precision=MONTHS),
286288
* static(literal="-"),
287-
* dynamic(pattern="dd", precision=DAYS),
289+
* dateTimeFormatter(pattern="dd", precision=DAYS),
288290
* static(literal="T"),
289-
* dynamic(pattern="HH", precision=HOURS),
291+
* dateTimeFormatter(pattern="HH", precision=HOURS),
290292
* static(literal=":"),
291-
* dynamic(pattern="mm", precision=MINUTES),
293+
* dateTimeFormatter(pattern="mm", precision=MINUTES),
292294
* static(literal=":"),
293-
* dynamic(pattern="ss", precision=SECONDS),
295+
* second(pattern="ss", precision=SECONDS),
294296
* static(literal="."),
295-
* dynamic(pattern="SSS", precision=MILLISECONDS)
296-
* dynamic(pattern="X", precision=HOURS),
297+
* second(pattern="SSS", precision=MILLISECONDS)
298+
* dateTimeFormatter(pattern="X", precision=HOURS),
297299
* ]
298300
* }</pre>
299301
*
@@ -304,9 +306,9 @@ private static boolean isDynamicPatternLetter(final char c) {
304306
*
305307
* <pre>{@code
306308
* [
307-
* dynamic(pattern="yyyy-MM-dd'T'HH:mm", precision=MINUTES),
308-
* dynamic(pattern="ss.SSS", precision=MILLISECONDS),
309-
* dynamic(pattern="X", precision=MINUTES)
309+
* dateTimeFormatter(pattern="yyyy-MM-dd'T'HH:mm", precision=MINUTES),
310+
* second(pattern="ss.SSS", precision=MILLISECONDS),
311+
* dateTimeFormatter(pattern="X", precision=MINUTES)
310312
* ]
311313
* }</pre>
312314
*

0 commit comments

Comments
 (0)