Fix method name by making it singular.

This commit is contained in:
Joel Leitch 2011-04-11 18:44:19 +00:00
parent c266097310
commit 49e7ee05fc
3 changed files with 5 additions and 5 deletions

View File

@ -75,7 +75,7 @@ package com.google.gson;
* <p>For certain model classes, you may only want to serialize a field, but exclude it for * <p>For certain model classes, you may only want to serialize a field, but exclude it for
* deserialization. To do that, you can write an {@code ExclusionStrategy} as per normal; * deserialization. To do that, you can write an {@code ExclusionStrategy} as per normal;
* however, you would register it with the * however, you would register it with the
* {@link GsonBuilder#addDeserializationExclusionStrategies(ExclusionStrategy...)} method. * {@link GsonBuilder#addDeserializationExclusionStrategy(ExclusionStrategy...)} method.
* For example: * For example:
* <pre class="code"> * <pre class="code">
* ExclusionStrategy excludeStrings = new UserDefinedExclusionStrategy(String.class); * ExclusionStrategy excludeStrings = new UserDefinedExclusionStrategy(String.class);

View File

@ -364,7 +364,7 @@ public final class GsonBuilder {
* @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern
* @since 1.7 * @since 1.7
*/ */
public GsonBuilder addSerializationExclusionStrategies(ExclusionStrategy strategy) { public GsonBuilder addSerializationExclusionStrategy(ExclusionStrategy strategy) {
serializeExclusionStrategies.add(strategy); serializeExclusionStrategies.add(strategy);
return this; return this;
} }
@ -379,7 +379,7 @@ public final class GsonBuilder {
* @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern
* @since 1.7 * @since 1.7
*/ */
public GsonBuilder addDeserializationExclusionStrategies(ExclusionStrategy strategy) { public GsonBuilder addDeserializationExclusionStrategy(ExclusionStrategy strategy) {
deserializeExclusionStrategies.add(strategy); deserializeExclusionStrategies.add(strategy);
return this; return this;
} }

View File

@ -91,9 +91,9 @@ public class ExclusionStrategyFunctionalTest extends TestCase {
private static Gson createGson(ExclusionStrategy exclusionStrategy, boolean serialization) { private static Gson createGson(ExclusionStrategy exclusionStrategy, boolean serialization) {
GsonBuilder gsonBuilder = new GsonBuilder(); GsonBuilder gsonBuilder = new GsonBuilder();
if (serialization) { if (serialization) {
gsonBuilder.addSerializationExclusionStrategies(exclusionStrategy); gsonBuilder.addSerializationExclusionStrategy(exclusionStrategy);
} else { } else {
gsonBuilder.addDeserializationExclusionStrategies(exclusionStrategy); gsonBuilder.addDeserializationExclusionStrategy(exclusionStrategy);
} }
return gsonBuilder return gsonBuilder
.serializeNulls() .serializeNulls()