org.exoplatform.json
Class BeanToJSONPlugin<T>

java.lang.Object
  extended by org.exoplatform.json.BeanToJSONPlugin<T>
Direct Known Subclasses:
ArrayToJSONPlugin, MapToJSONPlugin, ReflectToJSONPlugin

public abstract class BeanToJSONPlugin<T>
extends java.lang.Object

Created by The eXo Platform SARL Author : Tuan Nguyen tuan.nguyen@exoplatform.com Mar 20, 2007


Field Summary
protected  java.text.DateFormat dateFormat_
           
protected  JSONService service_
           
 
Constructor Summary
BeanToJSONPlugin()
           
 
Method Summary
protected  void appendIndentation(java.lang.StringBuilder builder, int indentLevel)
           
protected  java.lang.String encode(java.lang.CharSequence seq)
           
protected  boolean isCharacterType(java.lang.Class type)
           
protected  boolean isDateType(java.lang.Class type)
           
protected  boolean isPrimitiveType(java.lang.Class type)
           
 void setDateFormat(java.text.DateFormat dateFormat)
           
 void setService(JSONService service)
           
protected  void toDateValue(java.lang.StringBuilder builder, java.lang.Object value)
           
abstract  void toJSONScript(T object, java.lang.StringBuilder builder, int indentLevel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

service_

protected JSONService service_

dateFormat_

protected java.text.DateFormat dateFormat_
Constructor Detail

BeanToJSONPlugin

public BeanToJSONPlugin()
Method Detail

toJSONScript

public abstract void toJSONScript(T object,
                                  java.lang.StringBuilder builder,
                                  int indentLevel)
                           throws java.lang.Exception
Throws:
java.lang.Exception

appendIndentation

protected void appendIndentation(java.lang.StringBuilder builder,
                                 int indentLevel)

setService

public void setService(JSONService service)

isCharacterType

protected boolean isCharacterType(java.lang.Class type)

isDateType

protected boolean isDateType(java.lang.Class type)

isPrimitiveType

protected boolean isPrimitiveType(java.lang.Class type)

encode

protected java.lang.String encode(java.lang.CharSequence seq)

toDateValue

protected void toDateValue(java.lang.StringBuilder builder,
                           java.lang.Object value)

setDateFormat

public void setDateFormat(java.text.DateFormat dateFormat)


Copyright © 2010 eXo Platform SAS. All Rights Reserved.