Made the GsonBuilder registerTypeHierarchyAdapter a public method.
Updated the Gson version number to 1.6 and added @since tag for the new classes
This commit is contained in:
parent
2d7367364b
commit
2b993d83b6
@ -4,7 +4,7 @@
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.5</version>
|
||||
<version>1.6</version>
|
||||
<inceptionYear>2008</inceptionYear>
|
||||
<name>Gson</name>
|
||||
<url>http://code.google.com/p/google-gson/</url>
|
||||
|
@ -429,9 +429,9 @@ public final class GsonBuilder {
|
||||
* @param typeAdapter This object must implement at least one of the {@link InstanceCreator},
|
||||
* {@link JsonSerializer}, and a {@link JsonDeserializer} interfaces.
|
||||
* @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern
|
||||
* @since 1.5
|
||||
* @since 1.6
|
||||
*/
|
||||
GsonBuilder registerTypeHierarchyAdapter(Class<?> baseType, Object typeAdapter) {
|
||||
public GsonBuilder registerTypeHierarchyAdapter(Class<?> baseType, Object typeAdapter) {
|
||||
Preconditions.checkArgument(typeAdapter instanceof JsonSerializer<?>
|
||||
|| typeAdapter instanceof JsonDeserializer<?> || typeAdapter instanceof InstanceCreator<?>);
|
||||
if (typeAdapter instanceof InstanceCreator<?>) {
|
||||
|
@ -179,8 +179,9 @@ import java.util.List;
|
||||
*
|
||||
* <p>Each {@code JsonReader} may be used to read a single JSON stream. Instances
|
||||
* of this class are not thread safe.
|
||||
*
|
||||
*
|
||||
* @author Jesse Wilson
|
||||
* @since 1.6
|
||||
*/
|
||||
public final class JsonReader implements Closeable {
|
||||
|
||||
|
@ -20,6 +20,7 @@ package com.google.gson.stream;
|
||||
* Lexical scoping elements within a JSON reader or writer.
|
||||
*
|
||||
* @author Jesse Wilson
|
||||
* @since 1.6
|
||||
*/
|
||||
enum JsonScope {
|
||||
|
||||
|
@ -20,6 +20,7 @@ package com.google.gson.stream;
|
||||
* A structure, name or value type in a JSON-encoded string.
|
||||
*
|
||||
* @author Jesse Wilson
|
||||
* @since 1.6
|
||||
*/
|
||||
public enum JsonToken {
|
||||
|
||||
|
@ -116,8 +116,9 @@ import java.util.List;
|
||||
* <p>Each {@code JsonWriter} may be used to write a single JSON stream.
|
||||
* Instances of this class are not thread safe. Calls that would result in a
|
||||
* malformed JSON string will fail with an {@link IllegalStateException}.
|
||||
*
|
||||
*
|
||||
* @author Jesse Wilson
|
||||
* @since 1.6
|
||||
*/
|
||||
public final class JsonWriter implements Closeable {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user