From 7c42ef3e5d736ae1a74c88f0dc5fc1207c55c8af Mon Sep 17 00:00:00 2001 From: Joel Leitch Date: Mon, 4 Apr 2011 23:16:44 +0000 Subject: [PATCH] Update incomplete comment. --- .../main/java/com/google/gson/ExclusionStrategy.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gson/src/main/java/com/google/gson/ExclusionStrategy.java b/gson/src/main/java/com/google/gson/ExclusionStrategy.java index dfa7f9b7..6f78e629 100644 --- a/gson/src/main/java/com/google/gson/ExclusionStrategy.java +++ b/gson/src/main/java/com/google/gson/ExclusionStrategy.java @@ -71,10 +71,18 @@ package com.google.gson; * .setExclusionStrategies(excludeStrings) * .create(); * - * + * *

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; - * however, you would register it with the + * however, you would register it with the + * {@link GsonBuilder#addDeserializationExclusionStrategies(ExclusionStrategy...)} method. + * For example: + *

+ * ExclusionStrategy excludeStrings = new UserDefinedExclusionStrategy(String.class);
+ * Gson gson = new GsonBuilder()
+ *     .addDeserializationExclusionStrategies(excludeStrings)
+ *     .create();
+ * 
* * @author Inderjeet Singh * @author Joel Leitch