|
eXo WS :: Framework :: JSON 2.4.0-Alpha1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.ws.frameworks.json.impl.ObjectBuilder
public class ObjectBuilder
| Constructor Summary | |
|---|---|
ObjectBuilder()
|
|
| Method Summary | ||
|---|---|---|
static Object |
createArray(Class<?> clazz,
JsonValue jsonArray)
Create array of Java Object from JSON source include multi-dimension array. |
|
static
|
createCollection(Class<T> collectionClass,
Type genericType,
JsonValue jsonArray)
Create instance of collectionClass from JSON representation. |
|
static
|
createObject(Class<T> clazz,
JsonValue jsonValue)
Create Java Bean from Json Source. |
|
static
|
createObject(Class<T> mapClass,
Type genericType,
JsonValue jsonObject)
Create instance of mapClass from JSON representation. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectBuilder()
| Method Detail |
|---|
public static Object createArray(Class<?> clazz,
JsonValue jsonArray)
throws JsonException
clazz - the Class of target Object.jsonArray - the JSON representation of array
JsonException - if any errors occurs
public static <T extends Collection<?>> T createCollection(Class<T> collectionClass,
Type genericType,
JsonValue jsonArray)
throws JsonException
collectionClass from JSON representation.
If collectionClass is interface then appropriate
implementation of interface will be returned.
collectionClass - collection typegenericType - generic type of collectionjsonArray - the JSON representation of collection
JsonException - if any errors occurs
public static <T extends Map<String,?>> T createObject(Class<T> mapClass,
Type genericType,
JsonValue jsonObject)
throws JsonException
mapClass from JSON representation. If
mapClass is interface then appropriate implementation of
interface will be returned.
mapClass - map typegenericType - actual type of mapjsonObject - source JSON object
JsonException - if any errors occurs
public static <T> T createObject(Class<T> clazz,
JsonValue jsonValue)
throws JsonException
clazz - the Class of target Object.jsonValue - the Json representation.
JsonException - if any errors occurs.
|
eXo WS :: Framework :: JSON 2.4.0-Alpha1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||