public abstract class JsonEntity extends Entity
| Modifier and Type | Field and Description |
|---|---|
protected LinkedList<String> |
sortOrder |
changeSupport| Constructor and Description |
|---|
JsonEntity() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendSortOrder(String name) |
protected abstract Object |
buildJson() |
protected abstract void |
doParse(Object obj) |
void |
fromJson(File file) |
void |
fromJson(Object json) |
void |
fromJson(Reader reader) |
void |
fromJson(String json) |
protected Field |
getFieldByName(Class entity,
String fieldName) |
protected String |
getFieldName(Field field) |
protected List<String> |
getFieldNames(Class entity) |
protected ArrayList<Field> |
getFields(Class entity) |
protected Object |
getJsonValue(Object value) |
protected void |
initialize() |
protected void |
listen() |
String |
toJson() |
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, removePropertyChangeListener, removePropertyChangeListenerprotected transient LinkedList<String> sortOrder
protected void initialize()
protected void listen()
protected void appendSortOrder(String name)
protected abstract void doParse(Object obj)
public void fromJson(Object json)
public void fromJson(String json) throws ParseException
ParseExceptionpublic void fromJson(File file) throws IOException, ParseException
IOExceptionParseExceptionpublic void fromJson(Reader reader) throws IOException, ParseException
IOExceptionParseExceptionprotected abstract Object buildJson()
public String toJson()
Copyright © 2014. All rights reserved.