org.apache.struts2.json
Class JSONPopulator

java.lang.Object
  extended by org.apache.struts2.json.JSONPopulator

public class JSONPopulator
extends java.lang.Object

Isolate the process of populating JSON objects from the Interceptor class itself.


Constructor Summary
JSONPopulator()
           
JSONPopulator(java.lang.String dateFormat)
           
 
Method Summary
 java.lang.Object convert(java.lang.Class clazz, java.lang.reflect.Type type, java.lang.Object value, java.lang.reflect.Method method)
           
 java.lang.String getDateFormat()
           
 void populateObject(java.lang.Object object, java.util.Map elements)
           
 void setDateFormat(java.lang.String dateFormat)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSONPopulator

public JSONPopulator()

JSONPopulator

public JSONPopulator(java.lang.String dateFormat)
Method Detail

getDateFormat

public java.lang.String getDateFormat()

setDateFormat

public void setDateFormat(java.lang.String dateFormat)

populateObject

public void populateObject(java.lang.Object object,
                           java.util.Map elements)
                    throws java.lang.IllegalAccessException,
                           java.lang.reflect.InvocationTargetException,
                           java.lang.NoSuchMethodException,
                           java.beans.IntrospectionException,
                           java.lang.IllegalArgumentException,
                           JSONException,
                           java.lang.InstantiationException
Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.beans.IntrospectionException
java.lang.IllegalArgumentException
JSONException
java.lang.InstantiationException

convert

public java.lang.Object convert(java.lang.Class clazz,
                                java.lang.reflect.Type type,
                                java.lang.Object value,
                                java.lang.reflect.Method method)
                         throws java.lang.IllegalArgumentException,
                                JSONException,
                                java.lang.IllegalAccessException,
                                java.lang.reflect.InvocationTargetException,
                                java.lang.InstantiationException,
                                java.lang.NoSuchMethodException,
                                java.beans.IntrospectionException
Throws:
java.lang.IllegalArgumentException
JSONException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.InstantiationException
java.lang.NoSuchMethodException
java.beans.IntrospectionException


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.