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.
This commit is contained in:
Inderjeet Singh 2016-09-15 18:24:21 -07:00
parent 2271525dd5
commit 688f918a35
4 changed files with 8 additions and 0 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {