jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Phillips <notificati...@github.com>
Subject Re: [jclouds] JCLOUDS-750 Revert customizing FieldNamingStrategy in favor of tighter contract on @SerializedNames. (#596)
Date Sun, 02 Nov 2014 06:42:48 GMT
> @@ -25,9 +24,31 @@
>  
>  import com.google.common.annotations.Beta;
>  
> -/** An ordered list of json field names that correspond to factory method or constructor
parameters. */
> -@Beta @Target({ CONSTRUCTOR, METHOD }) @Retention(RUNTIME)
> +/**
> + * This annotation identifies the canonical factory method on an {@code AutoValue} type
used for json.
> + * It also dictates the serialized naming convention of the fields. This is required
as there's currently
> + * no way to add annotations to the fields generated by {@code AutoValue}.
> + *
> + * <p/>Example:
> + * <pre>{@code @AutoValue class Resource {
> + *   abstract String id();
> + *   @Nullable abstract Map<String, String> metadata();
> + *
> + *   @AutoValueSerializedNames({ "Id", "Metadata" }) // Note case format is controlled
here!

[minor] Should this be `@SeriablizedNames`?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/596/files#r19710059
Mime
View raw message