com.dyuproject.json
Interface ConvertorCache

All Superinterfaces:
org.mortbay.util.ajax.JSON.Convertor
All Known Implementing Classes:
DefaultConvertorCache, OverloadConvertorCache, StandardConvertorCache

public interface ConvertorCache
extends org.mortbay.util.ajax.JSON.Convertor

A convertor cache to allow re-use of convertors.

Author:
David Yu
Date created:
Feb 21, 2009

Method Summary
 boolean addConvertor(Class<?> clazz, org.mortbay.util.ajax.JSON.Convertor convertor)
          Adds the convertor mapped to the given clazz.
 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.
 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.
 
Methods inherited from interface org.mortbay.util.ajax.JSON.Convertor
fromJSON, toJSON
 

Method Detail

getConvertor

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


getConvertor

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.


getConvertor

org.mortbay.util.ajax.JSON.Convertor getConvertor(Class<?> clazz)
Gets a convertor from the given clazz.


addConvertor

boolean addConvertor(Class<?> clazz,
                     org.mortbay.util.ajax.JSON.Convertor convertor)
Adds the convertor mapped to the given clazz.


hasConvertor

boolean hasConvertor(Class<?> clazz)
Checks if a convertor is mapped to the given clazz.


newConvertor

org.mortbay.util.ajax.JSON.Convertor newConvertor(Class<?> clazz)
Creats a convertor based from the given clazz.


newConvertor

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.



Copyright © 2008-2013. All Rights Reserved.