Class CollectionFactory
java.lang.Object
com.cedarsoftware.util.io.factory.CollectionFactory
- All Implemented Interfaces:
JsonReader.ClassFactory
Deprecated.
Use to create new instances of collection interfaces (needed for empty collections)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnewInstance(Class<?> c, JsonObject jObj, ReaderContext context) Deprecated.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, waitMethods inherited from interface com.cedarsoftware.util.io.JsonReader.ClassFactory
gatherRemainingValues, isObjectFinal, newInstance
-
Constructor Details
-
CollectionFactory
public CollectionFactory()Deprecated.
-
-
Method Details
-
newInstance
Deprecated.Description copied from interface:JsonReader.ClassFactoryImplement 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:
newInstancein interfaceJsonReader.ClassFactory- Parameters:
c- Class of the object that needs to be createdjObj- JsonObject (if primitive type do jObj.getPrimitiveValue();context- ReaderContext for creating objects an getting read options- Returns:
- a new instance of C. If you completely fill the new instance using the value(s) from object, and no further work is needed for construction, then override the isObjectFinal() method below and return true.
-