Constructor and Description |
---|
WSUtils() |
Modifier and Type | Method and Description |
---|---|
abstract String |
encodeUrl(String url) |
abstract String |
format(Date date,
String format) |
abstract Object |
getArrayElement(Object array,
int i) |
abstract int |
getArraySize(Object array) |
abstract Boolean |
getBoolean(Object json,
String field) |
abstract Date |
getDateTime(Object json,
String field) |
abstract Double |
getDouble(Object json,
String field) |
abstract Object |
getField(Object json,
String field) |
abstract Set<String> |
getFields(Object json) |
static WSUtils |
getINSTANCE() |
abstract Integer |
getInteger(Object json,
String field) |
abstract Long |
getLong(Object json,
String field) |
abstract String |
getString(Object json,
String field) |
abstract Object |
parse(String jsonStr) |
static void |
setInstance(WSUtils utils) |
public WSUtils()
public static void setInstance(WSUtils utils)
public static WSUtils getINSTANCE()
public abstract Object getField(Object json, String field)
null
if field does not existpublic abstract String getString(Object json, String field)
null
if field does not existpublic abstract Boolean getBoolean(Object json, String field)
null
if field does not existpublic abstract Integer getInteger(Object json, String field)
null
if field does not existpublic abstract Double getDouble(Object json, String field)
null
if field does not existpublic abstract Long getLong(Object json, String field)
null
if field does not existpublic abstract Date getDateTime(Object json, String field)
null
if field does not existpublic abstract int getArraySize(Object array)
public abstract Object getArrayElement(Object array, int i)
Copyright © 2009-2012 SonarSource. All Rights Reserved.