Properly document jgvariant-ostree.
Change-Id: I0aa3b1df512ef99d0e25d73efdd34a1b488e7d0d
diff --git a/jgvariant-ostree/src/main/java/eu/mulk/jgvariant/ostree/Summary.java b/jgvariant-ostree/src/main/java/eu/mulk/jgvariant/ostree/Summary.java
index 8f4ddf6..bc94436 100644
--- a/jgvariant-ostree/src/main/java/eu/mulk/jgvariant/ostree/Summary.java
+++ b/jgvariant-ostree/src/main/java/eu/mulk/jgvariant/ostree/Summary.java
@@ -11,11 +11,29 @@
* <p>Stored as a file named {@code summary} in the OSTree repository root.
*
* <p>Reference: {@code ostree-core.h#OSTREE_SUMMARY_GVARIANT_STRING}
+ *
+ * @param entries an entry in the summary file.
+ * @param metadata additional keys and values contained in the summary.
*/
public record Summary(List<Entry> entries, Metadata metadata) {
+ /**
+ * An entry in the summary file of an OSTree repository, describing a ref.
+ *
+ * @param ref a ref name.
+ * @param value data describing the ref.
+ */
public record Entry(String ref, Value value) {
+ /**
+ * The value part of an entry in the summary file of an OSTree repository.
+ *
+ * <p>Describes the {@link Commit} currently named by the corresponding ref.
+ *
+ * @param size the size of the commit.
+ * @param checksum the checksum of the commit.
+ * @param metadata additional metadata describing the commit.
+ */
public record Value(long size, Checksum checksum, Metadata metadata) {
private static final Decoder<Value> DECODER =
@@ -25,6 +43,11 @@
Checksum.decoder(),
Metadata.decoder());
+ /**
+ * Acquires a {@link Decoder} for the enclosing type.
+ *
+ * @return a possibly shared {@link Decoder}.
+ */
public static Decoder<Value> decoder() {
return DECODER;
}
@@ -33,6 +56,11 @@
private static final Decoder<Entry> DECODER =
Decoder.ofStructure(Entry.class, Decoder.ofString(StandardCharsets.UTF_8), Value.decoder());
+ /**
+ * Acquires a {@link Decoder} for the enclosing type.
+ *
+ * @return a possibly shared {@link Decoder}.
+ */
public static Decoder<Entry> decoder() {
return DECODER;
}
@@ -41,6 +69,11 @@
private static final Decoder<Summary> DECODER =
Decoder.ofStructure(Summary.class, Decoder.ofArray(Entry.decoder()), Metadata.decoder());
+ /**
+ * Acquires a {@link Decoder} for the enclosing type.
+ *
+ * @return a possibly shared {@link Decoder}.
+ */
public static Decoder<Summary> decoder() {
return DECODER;
}