public class EnumClassFactory extends Object implements JsonReader.ClassFactory
Constructor and Description |
---|
EnumClassFactory() |
Modifier and Type | Method and Description |
---|---|
protected String |
findEnumName(JsonObject job) |
protected Object |
fromJsonObject(Class<?> c,
JsonObject job) |
protected Enum |
fromString(Class<?> c,
String s) |
Object |
newInstance(Class<?> c,
JsonObject jObj)
Implement this method to return a new instance of the passed in Class.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
gatherRemainingValues, isObjectFinal
public Object newInstance(Class<?> c, JsonObject jObj)
JsonReader.ClassFactory
newInstance
in interface JsonReader.ClassFactory
c
- Class of the object that needs to be createdjObj
- JsonObject (if primitive type do jObj.getPrimitiveValue();protected Object fromJsonObject(Class<?> c, JsonObject job)
protected String findEnumName(JsonObject job)
Copyright © 2023. All rights reserved.