From edaf59e178301fc2cdc5523cd703121cfcd4c009 Mon Sep 17 00:00:00 2001 From: Egor N Date: Fri, 19 Feb 2016 16:14:55 +0200 Subject: [PATCH] Fix RuntimeTypeAdapterFactory javadoc --- .../gson/typeadapters/RuntimeTypeAdapterFactory.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extras/src/main/java/com/google/gson/typeadapters/RuntimeTypeAdapterFactory.java b/extras/src/main/java/com/google/gson/typeadapters/RuntimeTypeAdapterFactory.java index 5bdf6e51..f9ee32b4 100644 --- a/extras/src/main/java/com/google/gson/typeadapters/RuntimeTypeAdapterFactory.java +++ b/extras/src/main/java/com/google/gson/typeadapters/RuntimeTypeAdapterFactory.java @@ -94,11 +94,11 @@ import com.google.gson.stream.JsonWriter; * "Rectangle"}) are configurable. * *

Registering Types

- * Create a {@code RuntimeTypeAdapter} by passing the base type and type field + * Create a {@code RuntimeTypeAdapterFactory} by passing the base type and type field * name to the {@link #of} factory method. If you don't supply an explicit type * field name, {@code "type"} will be used.
   {@code
- *   RuntimeTypeAdapter shapeAdapter
- *       = RuntimeTypeAdapter.of(Shape.class, "type");
+ *   RuntimeTypeAdapterFactory shapeAdapter
+ *       = RuntimeTypeAdapterFactory.of(Shape.class, "type");
  * }
* Next register all of your subtypes. Every subtype must be explicitly * registered. This protects your application from injection attacks. If you @@ -115,7 +115,7 @@ import com.google.gson.stream.JsonWriter; * .create(); * } * Like {@code GsonBuilder}, this API supports chaining:
   {@code
- *   RuntimeTypeAdapter shapeAdapter = RuntimeTypeAdapterFactory.of(Shape.class)
+ *   RuntimeTypeAdapterFactory shapeAdapter = RuntimeTypeAdapterFactory.of(Shape.class)
  *       .registerSubtype(Rectangle.class)
  *       .registerSubtype(Circle.class)
  *       .registerSubtype(Diamond.class);