Package com.cedarsoftware.util.io
Class JsonReader.MapFactory
java.lang.Object
com.cedarsoftware.util.io.JsonReader.MapFactory
- All Implemented Interfaces:
JsonReader.ClassFactory
- Enclosing class:
- JsonReader
Use to create new instances of Map interfaces (needed for empty Maps). Used
internally to handle Map, SortedMap when they are within parameterized types.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnewInstance
(Class<?> c, JsonObject jObj) Implement this method to return a new instance of the passed in Class.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.cedarsoftware.util.io.JsonReader.ClassFactory
isObjectFinal
-
Constructor Details
-
MapFactory
public MapFactory()
-
-
Method Details
-
newInstance
Description copied from interface:JsonReader.ClassFactory
Implement this method to return a new instance of the passed in Class. Use the passed in JsonObject to supply values to the construction of the object.- Specified by:
newInstance
in interfaceJsonReader.ClassFactory
- Parameters:
c
- Map interface that was requested for instantiation.jObj
- JsonObject (if primitive type do jObj.getPrimitiveValue();- Returns:
- a concrete Map type.
-