Updated JavaDoc formatting
This commit is contained in:
parent
81e6ae25f1
commit
6387c9028e
@ -25,12 +25,12 @@ package com.google.gson;
|
|||||||
*
|
*
|
||||||
* <p>The following are a few examples that shows how you can use this exclusion mechanism.
|
* <p>The following are a few examples that shows how you can use this exclusion mechanism.
|
||||||
*
|
*
|
||||||
* <p><strong>Exclude fields and objects based on a particular class type:<strong>
|
* <p><strong>Exclude fields and objects based on a particular class type:</strong>
|
||||||
* <pre class="code">
|
* <pre class="code">
|
||||||
* private static class SpecificClassExclusionStrategy implements ExclusionStrategy {
|
* private static class SpecificClassExclusionStrategy implements ExclusionStrategy {
|
||||||
* private final Class<?> excludedThisClass;
|
* private final Class<?> excludedThisClass;
|
||||||
*
|
*
|
||||||
* public pecificClassExclusionStrategy(Class<?> excludedThisClass) {
|
* public SpecificClassExclusionStrategy(Class<?> excludedThisClass) {
|
||||||
* this.excludedThisClass = excludedThisClass;
|
* this.excludedThisClass = excludedThisClass;
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
@ -64,7 +64,8 @@ package com.google.gson;
|
|||||||
*
|
*
|
||||||
* <p>Now if you want to configure {@code Gson} to use a user defined exclusion strategy, then
|
* <p>Now if you want to configure {@code Gson} to use a user defined exclusion strategy, then
|
||||||
* the {@code GsonBuilder} is required. The following is an example of how you can use the
|
* the {@code GsonBuilder} is required. The following is an example of how you can use the
|
||||||
* {@code GsonBuilder} to configure Gson to use one of the above sample
|
* {@code GsonBuilder} to configure Gson to use one of the above sample:
|
||||||
|
* <pre class="code">
|
||||||
* ExclusionStrategy excludeStrings = new UserDefinedExclusionStrategy(String.class);
|
* ExclusionStrategy excludeStrings = new UserDefinedExclusionStrategy(String.class);
|
||||||
* Gson gson = new GsonBuilder()
|
* Gson gson = new GsonBuilder()
|
||||||
* .setExclusionStrategies(excludeStrings)
|
* .setExclusionStrategies(excludeStrings)
|
||||||
|
@ -229,7 +229,7 @@ public final class GsonBuilder {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Configures Gson to apply a set of exclusion strategies during both serialization and
|
* Configures Gson to apply a set of exclusion strategies during both serialization and
|
||||||
* deserialization. Each of the {@code strategies} will be applied as a disjunctive rule.
|
* deserialization. Each of the {@code strategies} will be applied as a disjunction rule.
|
||||||
* This means that if one of the {@code strategies} suggests that a field (or class) should be
|
* This means that if one of the {@code strategies} suggests that a field (or class) should be
|
||||||
* skipped then that field (or object) is skipped during serializaiton/deserialization.
|
* skipped then that field (or object) is skipped during serializaiton/deserialization.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user