com.avaje.ebean.text.json
Class JsonElementObject

java.lang.Object
  extended by com.avaje.ebean.text.json.JsonElementObject
All Implemented Interfaces:
JsonElement

public class JsonElementObject
extends Object
implements JsonElement

JSON Object element.

You will only use the JsonElements when you register a JsonReadBeanVisitor. The JSON elements that are not mapped to a bean property are made available to the JsonReadBeanVisitor.

Author:
rbygrave
See Also:
JsonReadBeanVisitor

Constructor Summary
JsonElementObject()
           
 
Method Summary
 Set<Map.Entry<String,JsonElement>> entrySet()
           
 Object eval(String exp)
           
 boolean evalBoolean(String exp)
           
 int evalInt(String exp)
           
 String evalString(String exp)
           
 JsonElement get(String key)
           
 JsonElement getValue(String key)
           
 boolean isPrimitive()
          Return true if this is a JSON primitive type (null, boolean, number or string).
 Set<String> keySet()
           
 void put(String key, JsonElement value)
           
 String toPrimitiveString()
          Return the string value of this primitive JSON element.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JsonElementObject

public JsonElementObject()
Method Detail

put

public void put(String key,
                JsonElement value)

eval

public Object eval(String exp)
Specified by:
eval in interface JsonElement

evalInt

public int evalInt(String exp)
Specified by:
evalInt in interface JsonElement

evalString

public String evalString(String exp)
Specified by:
evalString in interface JsonElement

evalBoolean

public boolean evalBoolean(String exp)
Specified by:
evalBoolean in interface JsonElement

get

public JsonElement get(String key)

getValue

public JsonElement getValue(String key)

keySet

public Set<String> keySet()

entrySet

public Set<Map.Entry<String,JsonElement>> entrySet()

toString

public String toString()
Overrides:
toString in class Object

isPrimitive

public boolean isPrimitive()
Description copied from interface: JsonElement
Return true if this is a JSON primitive type (null, boolean, number or string).

Specified by:
isPrimitive in interface JsonElement

toPrimitiveString

public String toPrimitiveString()
Description copied from interface: JsonElement
Return the string value of this primitive JSON element.

This can not be used for JsonElementObject or JsonElementArray.

Specified by:
toPrimitiveString in interface JsonElement


Copyright © 2012. All Rights Reserved.