public class LongMapper extends Object implements JSONMapper<Long>
| Constructor and Description |
|---|
LongMapper() |
| Modifier and Type | Method and Description |
|---|---|
void |
componentFromJSON(Object arr,
org.json.JSONArray json,
int index)
Convert Java array component from JSON array component.
|
void |
componentToJSON(org.json.JSONArray json,
Object arr,
int index)
Convert JSON array component to Java array component.
|
Object |
createJSON(Long obj)
Convert object to JSON.
|
Long |
createObject(Object json)
Create object from JSON representation.
|
void |
fieldFromJSON(Object obj,
Field field,
org.json.JSONObject json)
Convert component of JSON object to field of Java object.
|
void |
fieldToJSON(org.json.JSONObject json,
Object obj,
Field field)
Convert object field to component of JSON object.
|
void |
getFromJSON(Object obj,
Method setter,
org.json.JSONObject json,
String name)
Set bean attribute from component of JSON object.
|
void |
setToJSON(org.json.JSONObject json,
String name,
Object obj,
Method getter)
Convert bean attribute to component of JSON object.
|
public Object createJSON(Long obj)
JSONMappercreateJSON in interface JSONMapper<Long>obj - object to be convertedpublic Long createObject(Object json)
JSONMappercreateObject in interface JSONMapper<Long>json - JSON representation.public void componentFromJSON(Object arr, org.json.JSONArray json, int index)
JSONMappercomponentFromJSON in interface JSONMapper<Long>arr - a Java array with components of type Tjson - the JSON arrayindex - the index used to access both arrayspublic void componentToJSON(org.json.JSONArray json,
Object arr,
int index)
JSONMappercomponentToJSON in interface JSONMapper<Long>json - the JSON arrayarr - a Java array with components of type Tindex - the index used to access both arrayspublic void fieldToJSON(org.json.JSONObject json,
Object obj,
Field field)
JSONMapperfieldToJSON in interface JSONMapper<Long>json - the JSON objectobj - the Java objectfield - field of this Java objectpublic void fieldFromJSON(Object obj, Field field, org.json.JSONObject json)
JSONMapperfieldFromJSON in interface JSONMapper<Long>obj - the Java objectfield - field of this Java objectjson - the JSON objectpublic void setToJSON(org.json.JSONObject json,
String name,
Object obj,
Method getter)
JSONMappersetToJSON in interface JSONMapper<Long>json - the JSON objectname - the attribute nameobj - the beangetter - the getter of the attributepublic void getFromJSON(Object obj, Method setter, org.json.JSONObject json, String name)
JSONMappergetFromJSON in interface JSONMapper<Long>obj - the beansetter - the setter of the attribtejson - the JSON objectname - the attribute nameCopyright © 2014 Tomas Teubner. All rights reserved.