aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pom.xml7
-rw-r--r--src/main/java/eu/mulk/jgvariant/core/Decoder.java3
-rw-r--r--src/main/java/eu/mulk/jgvariant/core/Signature.java3
-rw-r--r--src/main/java/eu/mulk/jgvariant/core/Variant.java4
-rw-r--r--src/main/java/module-info.java1
5 files changed, 18 insertions, 0 deletions
diff --git a/pom.xml b/pom.xml
index 7d4ce60..1623195 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,6 +58,7 @@
<spotless-plugin.version>2.17.6</spotless-plugin.version>
<surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
+ <apiguardian.version>1.1.2</apiguardian.version>
<errorprone.version>2.10.0</errorprone.version>
<google-java-format.version>1.13.0</google-java-format.version>
<jetbrains-annotations.version>22.0.0</jetbrains-annotations.version>
@@ -94,6 +95,12 @@
<version>${jetbrains-annotations.version}</version>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>org.apiguardian</groupId>
+ <artifactId>apiguardian-api</artifactId>
+ <version>${apiguardian.version}</version>
+ <optional>true</optional>
+ </dependency>
<!-- Testing -->
<dependency>
diff --git a/src/main/java/eu/mulk/jgvariant/core/Decoder.java b/src/main/java/eu/mulk/jgvariant/core/Decoder.java
index d0c0323..d30366e 100644
--- a/src/main/java/eu/mulk/jgvariant/core/Decoder.java
+++ b/src/main/java/eu/mulk/jgvariant/core/Decoder.java
@@ -12,6 +12,8 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
+import org.apiguardian.api.API;
+import org.apiguardian.api.API.Status;
import org.jetbrains.annotations.Nullable;
/**
@@ -42,6 +44,7 @@ import org.jetbrains.annotations.Nullable;
* @param <T> the type that the {@link Decoder} can decode.
*/
@SuppressWarnings("java:S1610")
+@API(status = Status.EXPERIMENTAL)
public abstract class Decoder<T> {
private Decoder() {}
diff --git a/src/main/java/eu/mulk/jgvariant/core/Signature.java b/src/main/java/eu/mulk/jgvariant/core/Signature.java
index bb03b94..d9de5f1 100644
--- a/src/main/java/eu/mulk/jgvariant/core/Signature.java
+++ b/src/main/java/eu/mulk/jgvariant/core/Signature.java
@@ -6,6 +6,8 @@ import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import org.apiguardian.api.API;
+import org.apiguardian.api.API.Status;
/**
* A GVariant signature string.
@@ -24,6 +26,7 @@ import java.util.Objects;
* an array of 32-bit integers
* </dl>
*/
+@API(status = Status.STABLE)
public final class Signature {
private final String signatureString;
diff --git a/src/main/java/eu/mulk/jgvariant/core/Variant.java b/src/main/java/eu/mulk/jgvariant/core/Variant.java
index 134a5e8..1438d9d 100644
--- a/src/main/java/eu/mulk/jgvariant/core/Variant.java
+++ b/src/main/java/eu/mulk/jgvariant/core/Variant.java
@@ -1,5 +1,8 @@
package eu.mulk.jgvariant.core;
+import org.apiguardian.api.API;
+import org.apiguardian.api.API.Status;
+
/**
* A dynamically typed GVariant value carrying a {@link Signature} describing its type.
*
@@ -23,4 +26,5 @@ package eu.mulk.jgvariant.core;
* Integer}, {@link Long}, {@link String}, {@link java.util.Optional}, {@link java.util.List},
* {@link Object[]}, {@link Variant}.
*/
+@API(status = Status.EXPERIMENTAL)
public record Variant(Signature signature, Object value) {}
diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java
index 39e91b8..c0debad 100644
--- a/src/main/java/module-info.java
+++ b/src/main/java/module-info.java
@@ -8,6 +8,7 @@
module eu.mulk.jgvariant.core {
requires com.google.errorprone.annotations;
requires org.jetbrains.annotations;
+ requires org.apiguardian.api;
exports eu.mulk.jgvariant.core;
}