From 25b7f9082b5cccf437c122a8ba13f0732a784a41 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Fri, 17 Dec 2021 06:02:11 +0100 Subject: Use API Guardian annotations. Change-Id: Icfd30e9b06e5c7ee9f51c6879bfe4978a6f44600 --- pom.xml | 7 +++++++ src/main/java/eu/mulk/jgvariant/core/Decoder.java | 3 +++ src/main/java/eu/mulk/jgvariant/core/Signature.java | 3 +++ src/main/java/eu/mulk/jgvariant/core/Variant.java | 4 ++++ src/main/java/module-info.java | 1 + 5 files changed, 18 insertions(+) diff --git a/pom.xml b/pom.xml index 7d4ce60..1623195 100644 --- a/pom.xml +++ b/pom.xml @@ -58,6 +58,7 @@ 2.17.6 3.0.0-M5 + 1.1.2 2.10.0 1.13.0 22.0.0 @@ -94,6 +95,12 @@ ${jetbrains-annotations.version} true + + org.apiguardian + apiguardian-api + ${apiguardian.version} + true + 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 the type that the {@link Decoder} can decode. */ @SuppressWarnings("java:S1610") +@API(status = Status.EXPERIMENTAL) public abstract class Decoder { 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 * */ +@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; } -- cgit v1.2.3