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()
@CheckForNull public abstract Object getField(Object json, String field)
null
if field does not exist@CheckForNull public abstract String getString(Object json, String field)
null
if field does not exist@CheckForNull public abstract Boolean getBoolean(Object json, String field)
null
if field does not exist@CheckForNull public abstract Integer getInteger(Object json, String field)
null
if field does not exist@CheckForNull public abstract Double getDouble(Object json, String field)
null
if field does not exist@CheckForNull public abstract Long getLong(Object json, String field)
null
if field does not exist@CheckForNull public 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–2015 SonarSource. All rights reserved.