|
SMILA API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.datamodel.util.AnyUtil
public final class AnyUtil
utility class for handling / conversion of Any objects. Hint: The Any-to-JSON conversion for Date(Time)s is not symmetric. If the Any object contains Date(Time) values, they will be serialized to String values in simple timestamp format. But when parsing JSON to an Any object, Date(Time) strings will not be recognized anymore, but just read as String values.
| Field Summary | |
|---|---|
static AnyMap |
EMPTY_MAP
Immutable empty AnyMap instance. |
| Method Summary | |
|---|---|
static java.lang.Object |
anyToNative(Any any)
Converts an Any object into a native java object. |
static AnyMap |
exceptionToAny(java.lang.Throwable e)
convert an exception to an any object. |
static Any |
objectToAny(java.lang.Object object)
Converts an object to an Any. |
static Any |
saveGet(Any any,
java.lang.String[] path)
get value for given path(list of keys) from AnyMap object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final AnyMap EMPTY_MAP
| Method Detail |
|---|
public static java.lang.Object anyToNative(Any any)
any - the Any object
public static Any objectToAny(java.lang.Object object)
object - The object to be converted. Maps inside this object have to be Map<String, ?>
public static Any saveGet(Any any,
java.lang.String[] path)
any - the Any object.path - path to the entry.
public static AnyMap exceptionToAny(java.lang.Throwable e)
e - exception to convert
|
SMILA API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||