diff --git a/gson/docs/javadocs/com/google/gson/ExclusionStrategy.html b/gson/docs/javadocs/com/google/gson/ExclusionStrategy.html
new file mode 100644
index 00000000..494eb42d
--- /dev/null
+++ b/gson/docs/javadocs/com/google/gson/ExclusionStrategy.html
@@ -0,0 +1,288 @@
+
+
+
+
+
+
+
+ExclusionStrategy (Gson 1.4 API)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+com.google.gson
+
+Interface ExclusionStrategy
+
+
+public interface ExclusionStrategy
+
+
+
+A strategy (or policy) definition that is used to decide whether or not a field or top-level
+ class should be serialized or deserialized as part of the JSON output/input. For serialization,
+ if the shouldSkipClass(Class)
method returns false then that class or field type
+ will not be part of the JSON output. For deserialization, if shouldSkipClass(Class)
+ returns false, then it will not be set as part of the Java object structure.
+
+
The following are a few examples that shows how you can use this exclusion mechanism.
+
+
Exclude fields and objects based on a particular class type:
+
+ private static class SpecificClassExclusionStrategy implements ExclusionStrategy {
+ private final Class<?> excludedThisClass;
+
+ public SpecificClassExclusionStrategy(Class<?> excludedThisClass) {
+ this.excludedThisClass = excludedThisClass;
+ }
+
+ public boolean shouldSkipClass(Class<?> clazz) {
+ return excludedThisClass.equals(clazz);
+ }
+
+ public boolean shouldSkipField(FieldAttributes f) {
+ return excludedThisClass.equals(f.getDeclaredClass());
+ }
+ }
+
+
+ Excludes fields and objects based on a particular annotation:
+
+ public @interface FooAnnotation {
+ // some implementation here
+ }
+
+ // Excludes any field (or class) that is tagged with an "@FooAnnotation"
+ private static class FooAnnotationExclusionStrategy implements ExclusionStrategy {
+ public boolean shouldSkipClass(Class<?> clazz) {
+ return clazz.getAnnotation(FooAnnotation.class) != null;
+ }
+
+ public boolean shouldSkipField(FieldAttributes f) {
+ return f.getAnnotation(FooAnnotation.class) != null;
+ }
+ }
+
+
+ Now if you want to configure Gson
to use a user defined exclusion strategy, then
+ the GsonBuilder
is required. The following is an example of how you can use the
+ GsonBuilder
to configure Gson to use one of the above sample:
+
+ ExclusionStrategy excludeStrings = new UserDefinedExclusionStrategy(String.class);
+ Gson gson = new GsonBuilder()
+ .setExclusionStrategies(excludeStrings)
+ .create();
+
+
+
+
+
+Since:
+ 1.4
+Author:
+ Inderjeet Singh, Joel Leitch
+See Also: GsonBuilder.setExclusionStrategies(ExclusionStrategy...)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+shouldSkipField
+
+boolean shouldSkipField (FieldAttributes f)
+
+
+Parameters: f
- the field object that is under test
+Returns: true if the field should be ignored; otherwise false
+
+
+
+
+
+shouldSkipClass
+
+boolean shouldSkipClass (Class <?> clazz)
+
+
+Parameters: clazz
- the class object that is under test
+Returns: true if the class should be ignored; otherwise false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Copyright © 2008-2009. All Rights Reserved.
+
+
diff --git a/gson/docs/javadocs/com/google/gson/FieldAttributes.html b/gson/docs/javadocs/com/google/gson/FieldAttributes.html
new file mode 100644
index 00000000..2f6077e9
--- /dev/null
+++ b/gson/docs/javadocs/com/google/gson/FieldAttributes.html
@@ -0,0 +1,362 @@
+
+
+
+
+
+
+
+FieldAttributes (Gson 1.4 API)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+com.google.gson
+
+Class FieldAttributes
+
+java.lang.Object
+ com.google.gson.FieldAttributes
+
+
+
+public final class FieldAttributes extends Object
+
+
+
+A data object that stores attributes of a field.
+
+
This class is immutable; therefore, it can be safely shared across threads.
+
+
+
+
+Since:
+ 1.4
+Author:
+ Inderjeet Singh, Joel Leitch
+
+
+
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+
+
+getAnnotation (Class <T> annotation)
+
+
+ Return the T
annotation object from this field if it exist; otherwise returns
+ null
.
+
+
+
+ Class <?>
+getDeclaredClass ()
+
+
+ Returns the Class<?>
object that was declared for this field.
+
+
+
+ Type
+getDeclaredType ()
+
+
+ For example, assume the following class definition:
+
+ public class Foo {
+ private String bar;
+ private List<String> red;
+ }
+
+ Type listParmeterizedType = new TypeToken>() {}.getType();
+
+
+
+ String
+getName ()
+
+
+
+
+
+
+ boolean
+hasModifier (int modifier)
+
+
+ Returns true
if the field is defined with the modifier
.
+
+
+
+
+
+
+
+
+
+
+
+
+
+getName
+
+public String getName ()
+
+
+
+Returns: the name of the field
+
+
+
+
+
+getDeclaredType
+
+public Type getDeclaredType ()
+
+For example, assume the following class definition:
+
+ public class Foo {
+ private String bar;
+ private List<String> red;
+ }
+
+ Type listParmeterizedType = new TypeToken>() {}.getType();
+
+
+ This method would return String.class
for the bar
field and
+ listParameterizedType
for the red
field.
+
+
+
+Returns: the specific type declared for this field
+
+
+
+
+
+getDeclaredClass
+
+public Class <?> getDeclaredClass ()
+
+Returns the Class<?>
object that was declared for this field.
+
+ For example, assume the following class definition:
+
+ public class Foo {
+ private String bar;
+ private List<String> red;
+ }
+
+
+ This method would return String.class
for the bar
field and
+ List.class
for the red
field.
+
+
+
+Returns: the specific class object that was declared for the field
+
+
+
+
+
+getAnnotation
+
+public <T extends Annotation > T getAnnotation (Class <T> annotation)
+
+Return the T
annotation object from this field if it exist; otherwise returns
+ null
.
+
+
+Parameters: annotation
- the class of the annotation that will be retrieved
+Returns: the annotation instance if it is bound to the field; otherwise null
+
+
+
+
+
+hasModifier
+
+public boolean hasModifier (int modifier)
+
+Returns true
if the field is defined with the modifier
.
+
+ This method is meant to be called as:
+
+ boolean hasPublicModifier = fieldAttribute.hasModifier(java.lang.reflect.Modifier.PUBLIC);
+
+
+
+See Also: Modifier
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Copyright © 2008-2009. All Rights Reserved.
+
+
diff --git a/gson/docs/javadocs/com/google/gson/JsonStreamParser.html b/gson/docs/javadocs/com/google/gson/JsonStreamParser.html
new file mode 100644
index 00000000..4df82084
--- /dev/null
+++ b/gson/docs/javadocs/com/google/gson/JsonStreamParser.html
@@ -0,0 +1,366 @@
+
+
+
+
+
+
+
+JsonStreamParser (Gson 1.4 API)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+com.google.gson
+
+Class JsonStreamParser
+
+java.lang.Object
+ com.google.gson.JsonStreamParser
+
+
+All Implemented Interfaces: Iterator <JsonElement >
+
+
+
+public final class JsonStreamParser extends Object implements Iterator <JsonElement >
+
+
+
+A streaming parser that allows reading of multiple JsonElement
s from the specified reader
+ asynchronously.
+
+
This class is conditionally thread-safe (see Item 70, Effective Java second edition). To
+ properly use this class across multiple threads, you will need to add some external
+ synchronization. For example:
+
+
+ JsonStreamParser parser = new JsonStreamParser("['first'] {'second':10} 'third'");
+ JsonElement element;
+ synchronized (parser) { // synchronize on an object shared by threads
+ if (parser.hasNext()) {
+ element = parser.next();
+ }
+ }
+
+
+
+
+
+Since:
+ 1.4
+Author:
+ Inderjeet Singh, Joel Leitch
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+ boolean
+hasNext ()
+
+
+ Returns true if a JsonElement
is available on the input for consumption
+
+
+
+ JsonElement
+next ()
+
+
+ Returns the next available JsonElement
on the reader.
+
+
+
+ void
+remove ()
+
+
+ This optional Iterator
method is not relevant for stream parsing and hence is not
+ implemented.
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Detail
+
+
+
+
+JsonStreamParser
+
+public JsonStreamParser (String json)
+
+
+Parameters: json
- The string containing JSON elements concatenated to each other.Since:
+ 1.4
+
+
+
+
+
+JsonStreamParser
+
+public JsonStreamParser (Reader reader)
+
+
+Parameters: reader
- The data stream containing JSON elements concatenated to each other.Since:
+ 1.4
+
+
+
+
+
+
+
+
+
+next
+
+public JsonElement next ()
+ throws JsonParseException
+
+Returns the next available JsonElement
on the reader. Null if none available.
+
+
+Specified by: next
in interface Iterator <JsonElement >
+
+
+
+Returns: the next available JsonElement
on the reader. Null if none available.
+ Throws:
+JsonParseException
- if the incoming stream is malformed JSON.Since:
+ 1.4
+
+
+
+
+
+
+hasNext
+
+public boolean hasNext ()
+
+Returns true if a JsonElement
is available on the input for consumption
+
+
+Specified by: hasNext
in interface Iterator <JsonElement >
+
+
+
+Returns: true if a JsonElement
is available on the input, false otherwise Since:
+ 1.4
+
+
+
+
+
+
+remove
+
+public void remove ()
+
+This optional Iterator
method is not relevant for stream parsing and hence is not
+ implemented.
+
+
+Specified by: remove
in interface Iterator <JsonElement >
+
+
+Since:
+ 1.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Copyright © 2008-2009. All Rights Reserved.
+
+
diff --git a/gson/docs/javadocs/com/google/gson/class-use/ExclusionStrategy.html b/gson/docs/javadocs/com/google/gson/class-use/ExclusionStrategy.html
new file mode 100644
index 00000000..d31aa6c0
--- /dev/null
+++ b/gson/docs/javadocs/com/google/gson/class-use/ExclusionStrategy.html
@@ -0,0 +1,179 @@
+
+
+
+
+
+
+
+Uses of Interface com.google.gson.ExclusionStrategy (Gson 1.4 API)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Uses of Interface com.google.gson.ExclusionStrategy
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Copyright © 2008-2009. All Rights Reserved.
+
+
diff --git a/gson/docs/javadocs/com/google/gson/class-use/FieldAttributes.html b/gson/docs/javadocs/com/google/gson/class-use/FieldAttributes.html
new file mode 100644
index 00000000..0956676c
--- /dev/null
+++ b/gson/docs/javadocs/com/google/gson/class-use/FieldAttributes.html
@@ -0,0 +1,178 @@
+
+
+
+
+
+
+
+Uses of Class com.google.gson.FieldAttributes (Gson 1.4 API)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Uses of Class com.google.gson.FieldAttributes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Copyright © 2008-2009. All Rights Reserved.
+
+
diff --git a/gson/docs/javadocs/com/google/gson/class-use/JsonStreamParser.html b/gson/docs/javadocs/com/google/gson/class-use/JsonStreamParser.html
new file mode 100644
index 00000000..636ca967
--- /dev/null
+++ b/gson/docs/javadocs/com/google/gson/class-use/JsonStreamParser.html
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+Uses of Class com.google.gson.JsonStreamParser (Gson 1.4 API)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Uses of Class com.google.gson.JsonStreamParser
+
+No usage of com.google.gson.JsonStreamParser
+
+
+
+
+
+
+
+
+
+
+
+
+Copyright © 2008-2009. All Rights Reserved.
+
+
diff --git a/gson/docs/javadocs/index-files/index-16.html b/gson/docs/javadocs/index-files/index-16.html
new file mode 100644
index 00000000..0033f3ac
--- /dev/null
+++ b/gson/docs/javadocs/index-files/index-16.html
@@ -0,0 +1,138 @@
+
+
+
+
+
+
+U-Index
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+A C D E F G H I J L N P R S T U V
+
+U
+
+Until - Annotation Type in com.google.gson.annotations An annotation that indicates the version number until a member or a type should be present.
+
+
+
+
+
+
+
+
+
+
+A C D E F G H I J L N P R S T U V
+
+
+
diff --git a/gson/docs/javadocs/index-files/index-17.html b/gson/docs/javadocs/index-files/index-17.html
new file mode 100644
index 00000000..0d2cfe0b
--- /dev/null
+++ b/gson/docs/javadocs/index-files/index-17.html
@@ -0,0 +1,152 @@
+
+
+
+
+
+
+V-Index
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+A C D E F G H I J L N P R S T U V
+
+V
+
+valueOf(String) -
+Static method in enum com.google.gson.FieldNamingPolicy
+Returns the enum constant of this type with the specified name.
+ valueOf(String) -
+Static method in enum com.google.gson.LongSerializationPolicy
+Returns the enum constant of this type with the specified name.
+ values() -
+Static method in enum com.google.gson.FieldNamingPolicy
+Returns an array containing the constants of this enum type, in
+the order they're declared.
+ values() -
+Static method in enum com.google.gson.LongSerializationPolicy
+Returns an array containing the constants of this enum type, in
+the order they're declared.
+
+
+
+
+
+
+
+
+
+
+
+A C D E F G H I J L N P R S T U V
+
+
+