|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dyuproject.json.StandardConvertorCache
public class StandardConvertorCache
The standard convertor cache.
Field Summary | |
---|---|
static org.mortbay.util.ajax.JSON.Convertor |
UNRESOLVED_CONVERTOR
The convertor for classes that cannot be loaded/resolved. |
Constructor Summary | |
---|---|
StandardConvertorCache()
|
Method Summary | |
---|---|
boolean |
addConvertor(Class<?> clazz,
org.mortbay.util.ajax.JSON.Convertor convertor)
Adds the convertor mapped to the given clazz . |
Object |
fromJSON(Map map)
|
org.mortbay.util.ajax.JSON.Convertor |
getConvertor(Class<?> clazz)
Gets a convertor from the given clazz . |
org.mortbay.util.ajax.JSON.Convertor |
getConvertor(Class<?> clazz,
boolean create)
Gets a convertor from the given clazz and will create one if
not found the flag create is true |
org.mortbay.util.ajax.JSON.Convertor |
getConvertor(Class<?> clazz,
boolean create,
boolean addClass)
Gets a convertor from the given clazz and will create one if
not found the flag create is true; If addClass is true,
the convertor will be configured to include the classname upon serialization. |
protected org.mortbay.util.ajax.JSON.Convertor |
getConvertor(String className)
|
boolean |
hasConvertor(Class<?> clazz)
Checks if a convertor is mapped to the given clazz . |
org.mortbay.util.ajax.JSON.Convertor |
newConvertor(Class<?> clazz)
Creats a convertor based from the given clazz . |
org.mortbay.util.ajax.JSON.Convertor |
newConvertor(Class<?> clazz,
boolean addClass)
Creats a convertor based from the given clazz ; If addClass is true,
the convertor will be configured to include the classname upon serialization. |
void |
toJSON(Object obj,
org.mortbay.util.ajax.JSON.Output out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.mortbay.util.ajax.JSON.Convertor UNRESOLVED_CONVERTOR
Constructor Detail |
---|
public StandardConvertorCache()
Method Detail |
---|
public org.mortbay.util.ajax.JSON.Convertor newConvertor(Class<?> clazz, boolean addClass)
ConvertorCache
clazz
; If addClass
is true,
the convertor will be configured to include the classname upon serialization.
newConvertor
in interface ConvertorCache
public org.mortbay.util.ajax.JSON.Convertor newConvertor(Class<?> clazz)
ConvertorCache
clazz
.
newConvertor
in interface ConvertorCache
public org.mortbay.util.ajax.JSON.Convertor getConvertor(Class<?> clazz, boolean create)
ConvertorCache
clazz
and will create one if
not found the flag create
is true
getConvertor
in interface ConvertorCache
public org.mortbay.util.ajax.JSON.Convertor getConvertor(Class<?> clazz, boolean create, boolean addClass)
ConvertorCache
clazz
and will create one if
not found the flag create
is true; If addClass
is true,
the convertor will be configured to include the classname upon serialization.
getConvertor
in interface ConvertorCache
public org.mortbay.util.ajax.JSON.Convertor getConvertor(Class<?> clazz)
ConvertorCache
clazz
.
getConvertor
in interface ConvertorCache
public boolean addConvertor(Class<?> clazz, org.mortbay.util.ajax.JSON.Convertor convertor)
ConvertorCache
convertor
mapped to the given clazz
.
addConvertor
in interface ConvertorCache
public boolean hasConvertor(Class<?> clazz)
ConvertorCache
clazz
.
hasConvertor
in interface ConvertorCache
protected org.mortbay.util.ajax.JSON.Convertor getConvertor(String className)
public Object fromJSON(Map map)
fromJSON
in interface org.mortbay.util.ajax.JSON.Convertor
public void toJSON(Object obj, org.mortbay.util.ajax.JSON.Output out)
toJSON
in interface org.mortbay.util.ajax.JSON.Convertor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |