Class EnumClassFactory
java.lang.Object
com.cedarsoftware.util.io.factory.EnumClassFactory
- All Implemented Interfaces:
JsonReader.ClassFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Enum
fromString
(Class<?> c, String s) newInstance
(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
-
EnumClassFactory
public EnumClassFactory()
-
-
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
- Class of the object that needs to be createdjObj
- JsonObject (if primitive type do jObj.getPrimitiveValue();- 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.
-
fromString
-