Adds method scope to Json annotation for use with AutoValue.

This commit is contained in:
Ryan Harter
2015-08-17 10:30:27 -05:00
parent bc9b4f6a55
commit 8d575b3c51

View File

@@ -20,10 +20,11 @@ import java.lang.annotation.Retention;
import java.lang.annotation.Target; import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME; import static java.lang.annotation.RetentionPolicy.RUNTIME;
/** Customizes how a field is encoded as JSON. */ /** Customizes how a field is encoded as JSON. */
@Target(FIELD) @Target({FIELD, METHOD})
@Retention(RUNTIME) @Retention(RUNTIME)
@Documented @Documented
public @interface Json { public @interface Json {