From 688f918a353e57f11405fab17d82d506a4e7dc4c Mon Sep 17 00:00:00 2001 From: Inderjeet Singh Date: Thu, 15 Sep 2016 18:24:21 -0700 Subject: [PATCH] Added @Documented to Gson annotations. This is useful since it shows the JSON format for a class which the user of that class should typically know. --- gson/src/main/java/com/google/gson/annotations/Expose.java | 2 ++ .../main/java/com/google/gson/annotations/SerializedName.java | 2 ++ gson/src/main/java/com/google/gson/annotations/Since.java | 2 ++ gson/src/main/java/com/google/gson/annotations/Until.java | 2 ++ 4 files changed, 8 insertions(+) diff --git a/gson/src/main/java/com/google/gson/annotations/Expose.java b/gson/src/main/java/com/google/gson/annotations/Expose.java index 1b9c70df..b66dc4f2 100644 --- a/gson/src/main/java/com/google/gson/annotations/Expose.java +++ b/gson/src/main/java/com/google/gson/annotations/Expose.java @@ -16,6 +16,7 @@ package com.google.gson.annotations; +import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -57,6 +58,7 @@ import java.lang.annotation.Target; * @author Inderjeet Singh * @author Joel Leitch */ +@Documented @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface Expose { diff --git a/gson/src/main/java/com/google/gson/annotations/SerializedName.java b/gson/src/main/java/com/google/gson/annotations/SerializedName.java index 363b95a3..9e8e4b8d 100644 --- a/gson/src/main/java/com/google/gson/annotations/SerializedName.java +++ b/gson/src/main/java/com/google/gson/annotations/SerializedName.java @@ -16,6 +16,7 @@ package com.google.gson.annotations; +import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -76,6 +77,7 @@ import java.lang.annotation.Target; * @author Inderjeet Singh * @author Joel Leitch */ +@Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHOD}) public @interface SerializedName { diff --git a/gson/src/main/java/com/google/gson/annotations/Since.java b/gson/src/main/java/com/google/gson/annotations/Since.java index 541f154b..c6b21825 100644 --- a/gson/src/main/java/com/google/gson/annotations/Since.java +++ b/gson/src/main/java/com/google/gson/annotations/Since.java @@ -16,6 +16,7 @@ package com.google.gson.annotations; +import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -50,6 +51,7 @@ import java.lang.annotation.Target; * @author Inderjeet Singh * @author Joel Leitch */ +@Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.TYPE}) public @interface Since { diff --git a/gson/src/main/java/com/google/gson/annotations/Until.java b/gson/src/main/java/com/google/gson/annotations/Until.java index 4648b8a2..676a4b95 100644 --- a/gson/src/main/java/com/google/gson/annotations/Until.java +++ b/gson/src/main/java/com/google/gson/annotations/Until.java @@ -16,6 +16,7 @@ package com.google.gson.annotations; +import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -54,6 +55,7 @@ import java.lang.annotation.Target; * @author Joel Leitch * @since 1.3 */ +@Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.TYPE}) public @interface Until {