Better javadoc

This commit is contained in:
Emmanuel Cron 2015-10-06 16:57:13 -07:00
parent 21d7f0681e
commit b395da26b7
2 changed files with 9 additions and 9 deletions

View File

@ -56,7 +56,8 @@ import java.util.Set;
* You can specify which case representation is used for the proto fields when writing/reading the * You can specify which case representation is used for the proto fields when writing/reading the
* JSON payload by calling {@link Builder#setFieldNameSerializationFormat(CaseFormat, CaseFormat)}. * JSON payload by calling {@link Builder#setFieldNameSerializationFormat(CaseFormat, CaseFormat)}.
* <p> * <p>
* An example of default serialization/deserialization using custom proto field names is show below: * An example of default serialization/deserialization using custom proto field names is shown
* below:
* *
* <pre> * <pre>
* message MyMessage { * message MyMessage {
@ -130,16 +131,15 @@ public class ProtoTypeAdapter
/** /**
* Adds a field proto annotation that, when set, overrides the default field name * Adds a field proto annotation that, when set, overrides the default field name
* serialization/deserialization. For example, if you add the ' {@code serialized_name}' * serialization/deserialization. For example, if you add the '{@code serialized_name}'
* annotation and you define a field in your proto like the one below: * annotation and you define a field in your proto like the one below:
* *
* <pre> * <pre>
* string client_app_id = 1[(serialized_name) = "appId"]; * string client_app_id = 1 [(serialized_name) = "appId"];
* </pre> * </pre>
* *
* ...the adapter will serialize the field using '{@code appId}' instead of the default ' * ...the adapter will serialize the field using '{@code appId}' instead of the default '
* {@code clientAppId}'. This lets you customize the name serialization of any field of your * {@code clientAppId}'. This lets you customize the name serialization of any proto field.
* proto.
*/ */
public Builder addSerializedNameExtension( public Builder addSerializedNameExtension(
Extension<FieldOptions, String> serializedNameExtension) { Extension<FieldOptions, String> serializedNameExtension) {
@ -148,8 +148,8 @@ public class ProtoTypeAdapter
} }
/** /**
* Adds an enum proto annotation that, when set, overrides the default <b>enum</b> value * Adds an enum value proto annotation that, when set, overrides the default <b>enum</b> value
* serialization/deerialization of this adapter. For example, if you add the ' * serialization/deserialization of this adapter. For example, if you add the '
* {@code serialized_value}' annotation and you define an enum in your proto like the one below: * {@code serialized_value}' annotation and you define an enum in your proto like the one below:
* *
* <pre> * <pre>
@ -297,7 +297,7 @@ public class ProtoTypeAdapter
return (GeneratedMessage) protoBuilder.build(); return (GeneratedMessage) protoBuilder.build();
} catch (SecurityException e) { } catch (SecurityException e) {
throw new JsonParseException(e); throw new JsonParseException(e);
} catch (NoSuchMethodException e) { } catch (NoSuchMethodException e) {
throw new JsonParseException(e); throw new JsonParseException(e);
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
throw new JsonParseException(e); throw new JsonParseException(e);

View File

@ -29,4 +29,4 @@ extend google.protobuf.FieldOptions {
extend google.protobuf.EnumValueOptions { extend google.protobuf.EnumValueOptions {
// Indicates a field value that overrides the default for serialization // Indicates a field value that overrides the default for serialization
optional string serialized_value = 92066888; optional string serialized_value = 92066888;
} }