Package org.apache.struts2.json

# Class JSONPopulator

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

public class JSONPopulator extends Object
Isolate the process of populating JSON objects from the Interceptor class itself.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JSONPopulator()`
  `JSONPopulator(String dateFormat)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `convert(Class clazz, Type type, Object value, Method method)`
  `String`
  `getDateFormat()`
  `void`
  `populateObject(Object object, Map elements)`
  `void`
  `setDateFormat(String dateFormat)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### JSONPopulator

    public JSONPopulator()

  - ### JSONPopulator

    public JSONPopulator(String dateFormat)

- ## Method Details

  - ### getDateFormat

    public String getDateFormat()

  - ### setDateFormat

    public void setDateFormat(String dateFormat)

  - ### populateObject

    public void populateObject(Object object, Map elements) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException, IntrospectionException, IllegalArgumentException, JSONException, InstantiationException
    Throws:
      `IllegalAccessException`
      `InvocationTargetException`
      `NoSuchMethodException`
      `IntrospectionException`
      `IllegalArgumentException`
      `JSONException`
      `InstantiationException`

  - ### convert

    public Object convert(Class clazz, Type type, Object value, Method method) throws IllegalArgumentException, JSONException, IllegalAccessException, InvocationTargetException, InstantiationException, NoSuchMethodException, IntrospectionException
    Throws:
      `IllegalArgumentException`
      `JSONException`
      `IllegalAccessException`
      `InvocationTargetException`
      `InstantiationException`
      `NoSuchMethodException`
      `IntrospectionException`