Update Javadocs with @snippet blocks.
Change-Id: Id28c226b6882c088f288b247f73041be807be862
diff --git a/jgvariant-core/src/main/java/eu/mulk/jgvariant/core/Decoder.java b/jgvariant-core/src/main/java/eu/mulk/jgvariant/core/Decoder.java
index 8a3741b..2cb36c6 100644
--- a/jgvariant-core/src/main/java/eu/mulk/jgvariant/core/Decoder.java
+++ b/jgvariant-core/src/main/java/eu/mulk/jgvariant/core/Decoder.java
@@ -40,7 +40,7 @@
* <p>To parse a GVariant of type {@code "a(si)"}, which is an array of pairs of {@link String} and
* {@code int}, you can use the following code:
*
- * <pre>{@code
+ * {@snippet lang="java" :
* record ExampleRecord(String s, int i) {}
*
* var decoder =
@@ -50,9 +50,9 @@
* Decoder.ofString(UTF_8),
* Decoder.ofInt().withByteOrder(LITTLE_ENDIAN)));
*
- * byte[] bytes = ...;
+ * byte[] bytes;
* List<ExampleRecord> example = decoder.decode(ByteBuffer.wrap(bytes));
- * }</pre>
+ * }
*
* @param <T> the type that the {@link Decoder} can decode.
*/
diff --git a/jgvariant-core/src/main/java/eu/mulk/jgvariant/core/package-info.java b/jgvariant-core/src/main/java/eu/mulk/jgvariant/core/package-info.java
index a1e0a20..e2e8143 100644
--- a/jgvariant-core/src/main/java/eu/mulk/jgvariant/core/package-info.java
+++ b/jgvariant-core/src/main/java/eu/mulk/jgvariant/core/package-info.java
@@ -14,7 +14,7 @@
* <p>To parse a GVariant of type {@code "a(si)"}, which is an array of pairs of {@link
* java.lang.String} and {@code int}, you can use the following code:
*
- * <pre>{@code
+ * {@snippet lang="java" :
* record ExampleRecord(String s, int i) {}
*
* var decoder =
@@ -24,8 +24,8 @@
* Decoder.ofString(UTF_8),
* Decoder.ofInt().withByteOrder(LITTLE_ENDIAN)));
*
- * byte[] bytes = ...;
+ * byte[] bytes;
* List<ExampleRecord> example = decoder.decode(ByteBuffer.wrap(bytes));
- * }</pre>
+ * }
*/
package eu.mulk.jgvariant.core;
diff --git a/jgvariant-core/src/main/java/module-info.java b/jgvariant-core/src/main/java/module-info.java
index 4df8acd..6b45af0 100644
--- a/jgvariant-core/src/main/java/module-info.java
+++ b/jgvariant-core/src/main/java/module-info.java
@@ -26,7 +26,7 @@
*
* <h3 id="sect-installation-maven">Usage with Maven</h3>
*
- * <pre>{@code
+ * {@snippet lang="xml" :
* <project>
* ...
*
@@ -63,21 +63,21 @@
*
* ...
* </project>
- * }</pre>
+ * }
*
* <h3 id="sect-installation-gradle">Usage with Gradle</h3>
*
- * <pre>{@code
+ * {@snippet lang="groovy" :
* dependencies {
- * ...
+ * // ...
*
- * implementation(platform("eu.mulk.jgvariant:jgvariant-bom:0.1.5")
+ * implementation(platform("eu.mulk.jgvariant:jgvariant-bom:0.1.5"))
* implementation("eu.mulk.jgvariant:jgvariant-core")
* implementation("eu.mulk.jgvariant:jgvariant-ostree")
*
- * ...
+ * // ...
* }
- * }</pre>
+ * }
*/
module eu.mulk.jgvariant.core {
requires com.google.errorprone.annotations;
diff --git a/jgvariant-ostree/src/main/java/module-info.java b/jgvariant-ostree/src/main/java/module-info.java
index 6e6018e..18daf94 100644
--- a/jgvariant-ostree/src/main/java/module-info.java
+++ b/jgvariant-ostree/src/main/java/module-info.java
@@ -25,7 +25,7 @@
*
* <h3 id="sect-installation-maven">Usage with Maven</h3>
*
- * <pre>{@code
+ * {@snippet lang="xml" :
* <project>
* ...
*
@@ -62,21 +62,21 @@
*
* ...
* </project>
- * }</pre>
+ * }
*
* <h3 id="sect-installation-gradle">Usage with Gradle</h3>
*
- * <pre>{@code
+ * {@snippet lang="groovy" :
* dependencies {
- * ...
+ * // ...
*
- * implementation(platform("eu.mulk.jgvariant:jgvariant-bom:0.1.5")
+ * implementation(platform("eu.mulk.jgvariant:jgvariant-bom:0.1.5"))
* implementation("eu.mulk.jgvariant:jgvariant-core")
* implementation("eu.mulk.jgvariant:jgvariant-ostree")
*
- * ...
+ * // ...
* }
- * }</pre>
+ * }
*/
module eu.mulk.jgvariant.ostree {
requires transitive eu.mulk.jgvariant.core;