public class JSONResolvable extends Object implements Resolvable
JSONObject
and Resolvable
. Wraps an
instance of JSONObject
and resolves properties.Modifier and Type | Field and Description |
---|---|
protected org.json.JSONObject |
jsonObject
wapped JSON object
|
Constructor and Description |
---|
JSONResolvable(org.json.JSONObject jsonObject)
Create an instance of the JSON Resolvable wrapper
|
Modifier and Type | Method and Description |
---|---|
boolean |
canResolve()
Check whether the resolvable is capable of resolving properties right
now.
|
Object |
get(String key)
Get the property named by key or null if the property does not exist or
is not set.
|
Object |
getProperty(String key)
Get the property named by key or null if the property does not exist or
is not set.
|
protected static Object |
transformValue(Object value)
Helper method to transform the given value from JSON to Resolvable
|
public JSONResolvable(org.json.JSONObject jsonObject)
jsonObject
- wrapped JSON objectpublic boolean canResolve()
Resolvable
Resolvable.getProperty(String)
or Resolvable.get(String)
will return null.canResolve
in interface Resolvable
public Object get(String key)
Resolvable
get
in interface Resolvable
key
- key of the propertypublic Object getProperty(String key)
Resolvable
Resolvable.get(String)
.getProperty
in interface Resolvable
key
- key of the propertyCopyright © 2015 Gentics Software GmbH. All Rights Reserved.